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


MARK_ERROR_BACK (number)

The background color, in “0xBBGGRR” format, used for a line containing a recognized run or compile error.


_G.events.COMPILE_OUTPUT (string)

Emitted 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)

Emitted 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. It is used for going to error messages with relative file paths.


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(line, next)

Goes to the source of the recognized compile/run error on line number line in the message buffer or the next or previous recognized error depending on boolean next. Displays an annotation with the error message, if available.

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.