Contents

_M.textadept.run

Compile and run/execute source files with Textadept. Typically, language-specific modules populate the compile_command, run_command, and error_detail tables for a particular language’s file extension.


Fields


_G.events.COMPILE_OUTPUT (string)

Called after executing a language’s compile command. By default, compiler output is printed to the message buffer. To override this behavior, connect to the event with an index of 1 and return true. Arguments:


_G.events.RUN_OUTPUT (string)

Called after executing a language’s run command. By default, output is printed to the message buffer. To override this behavior, connect to the event with an index of 1 and return true. Arguments:


cwd (string, Read-only)

The working directory for the most recently executed compile or run command.


Functions


compile()

Compiles the file based on its extension using the command from the compile_command table. Emits a COMPILE_OUTPUT event.

See also:


goto_error(pos, line_num)

Goes to line number line_num in the file an error occurred at based on the error message at position pos in the buffer and displays an annotation with the error message. This is typically called by an event handler for when the user double-clicks on an error message.

Parameters:

See also:


run()

Runs/executes the file based on its extension using the command from the run_command table. Emits a RUN_OUTPUT event.

See also:


Tables


compile_command

Map of file extensions (excluding the leading ‘.’) to their associated “compile” shell command line strings or functions returning such strings. Command line strings may have the following macros:

This table is typically populated by language-specific modules.


error_detail

Map of lexer names to their error string details, tables containing the following fields:

When an error message is double-clicked, the user is taken to the point of error. This table is usually populated by language-specific modules.


run_command

Map of file extensions (excluding the leading ‘.’) to their associated “run” shell command line strings or functions returning such strings. Command line strings may have the following macros:

This table is typically populated by language-specific modules.