File: comint.el.html
This file defines a general command-interpreter-in-a-buffer package
(comint mode). The idea is that you can build specific process-in-a-buffer
modes on top of comint mode -- e.g., Lisp, shell, scheme, T, soar, ....
This way, all these specific packages share a common base functionality,
and a common set of bindings, which makes them easier to use (and
saves code, implementation time, etc., etc.).
Several packages are already defined using comint mode:
- shell.el defines a shell-in-a-buffer mode.
- cmulisp.el defines a simple lisp-in-a-buffer mode.
- The file cmuscheme.el defines a scheme-in-a-buffer mode.
- The file tea.el tunes scheme and inferior-scheme modes for T.
- The file soar.el tunes Lisp and inferior-lisp modes for Soar.
- cmutex.el defines TeX and LaTeX modes that invoke TeX, LaTeX, BibTeX,
previewers, and printers from within Emacs.
- background.el allows csh-like job control inside Emacs.
It is pretty easy to make new derived modes for other processes.
For documentation on the functionality provided by Comint mode, and the hooks available for customizing it, see the comments below. For further information on the standard derived modes (shell, inferior-lisp, inferior-scheme, ...), see the relevant source files.
For hints on converting existing process modes (e.g., tex-mode, background, dbx, gdb, kermit, prolog, telnet) to use comint-mode instead of shell-mode, see the notes at the end of this file.
Defined variables (77)
comint--indirect-buffer | Indirect buffer used for input fontification. |
comint--prompt-rear-nonsticky | Text properties we set on the prompt and don’t want to leak past it. |
comint-accum-marker | Non-nil if you are accumulating input lines to send as input together. |
comint-buffer-maximum-size | The maximum size in lines for Comint buffers. |
comint-completion-addsuffix | If non-nil, add ‘ ’ to file names. |
comint-completion-autolist | If non-nil, automatically list possibilities on partial completion. |
comint-completion-fignore | List of suffixes to be disregarded during file completion. |
comint-completion-recexact | If non-nil, use shortest completion if characters cannot be added. |
comint-delete-old-input | When non-nil, delete old input on inserting previous input with <mouse-2>. |
comint-delimiter-argument-list | List of characters to recognize as separate arguments in input. |
comint-dynamic-complete-functions | List of functions called to perform completion. |
comint-eol-on-send | Non-nil means go to the end of the line before sending input. |
comint-exec-hook | Hook run each time a process is exec’d by ‘comint-exec’. |
comint-file-name-chars | String of characters valid in a file name. |
comint-file-name-prefix | Prefix prepended to absolute file names taken from process input. |
comint-file-name-quote-list | List of characters to quote with ‘\’ when in a file name. |
comint-fontify-input-mode | Non-nil if Comint-Fontify-Input mode is enabled. |
comint-fontify-input-mode-hook | Hook run after entering or leaving ‘comint-fontify-input-mode’. |
comint-get-old-input | Function that returns old text in Comint mode. |
comint-highlight-input | If non-nil, highlight input with ‘comint-highlight-input’ face. |
comint-history-isearch | Non-nil to Isearch in input history only, not in comint buffer output. |
comint-indirect-setup-function | Function to set up an indirect comint fontification buffer. |
comint-indirect-setup-hook | Hook run in an indirect buffer for input fontification. |
comint-inhibit-carriage-motion | If nil, Comint will interpret ‘carriage control’ characters in output. |
comint-input-autoexpand | If non-nil, expand input command history references on completion. |
comint-input-filter | Predicate for filtering additions to input history. |
comint-input-filter-functions | Abnormal hook run before input is sent to the process. |
comint-input-history-ignore | Regexp for history entries that should be ignored when Comint initializes. |
comint-input-ignoredups | If non-nil, don’t add input matching the last on the input ring. |
comint-input-ring-file-name | If non-nil, name of the file to read/write input history. |
comint-input-ring-file-prefix | The prefix to skip when parsing the input ring file. |
comint-input-ring-index | Index of last matched history element. |
comint-input-ring-separator | Separator between commands in the history file. |
comint-input-ring-size | Size of the input history ring in ‘comint-mode’. |
comint-input-sender | Function to actually send to PROCESS the STRING submitted by user. |
comint-input-sender-no-newline | Non-nil directs the ‘comint-input-sender’ function not to send a newline. |
comint-insert-previous-argument-from-end | If non-nil, ‘comint-insert-previous-argument’ counts args from the end. |
comint-last-prompt | Markers pointing to the last prompt. |
comint-matching-input-from-input-string | Input previously used to match input history. |
comint-max-line-length | Maximum line length, in bytes, accepted by the inferior process. |
comint-mode-abbrev-table | Abbrev table for ‘comint-mode’. |
comint-mode-hook | Hook run upon entry to ‘comint-mode’. |
comint-mode-map | Keymap for ‘comint-mode’. |
comint-mode-syntax-table | Syntax table for ‘comint-mode’. |
comint-move-point-for-matching-input | Controls where to place point after matching input. |
comint-move-point-for-output | Controls whether interpreter output moves point to the end of the output. |
comint-osc-handlers | Alist of handlers for OSC escape sequences. |
comint-osc-hyperlink-map | Keymap used by OSC 8 hyperlink buttons. |
comint-output-filter-functions | Functions to call after output is inserted into the buffer. |
comint-password-function | Abnormal hook run when prompted for a password. |
comint-password-prompt-regexp | Regexp matching prompts for passwords in the inferior process. |
comint-preoutput-filter-functions | List of functions to call before inserting Comint output into the buffer. |
comint-process-echoes | If non-nil, assume that the subprocess echoes any input. |
comint-prompt-read-only | If non-nil, the comint prompt is read only. |
comint-prompt-regexp | Regexp to recognize prompts in the inferior process. |
comint-ptyp | Non-nil if communications via pty; false if by pipe. Buffer local. |
comint-redirect-completed | Non-nil if redirection has completed in the current buffer. |
comint-redirect-echo-input | Non-nil means echo input in the process buffer even during redirection. |
comint-redirect-filter-functions | List of functions to call before inserting redirected process output. |
comint-redirect-finished-regexp | Regular expression that determines when to stop redirection in Comint. |
comint-redirect-insert-matching-regexp | If non-nil, the text that ends a redirection is included in it. |
comint-redirect-original-mode-line-process | Original mode line for redirected process. |
comint-redirect-output-buffer | The buffer or list of buffers to put output into. |
comint-redirect-perform-sanity-check | If non-nil, check that redirection is likely to complete successfully. |
comint-redirect-previous-input-string | Last redirected line of text. |
comint-redirect-subvert-readonly | Non-nil means ‘comint-redirect’ can insert into read-only buffers. |
comint-redirect-verbose | If non-nil, print messages each time the redirection filter is invoked. |
comint-repeat-map | Keymap to repeat comint key sequences. Used in ‘repeat-mode’. |
comint-requote-function | Function to use for completion of quoted data. |
comint-save-input-ring-index | Last input ring index which you copied. |
comint-scroll-show-maximum-output | Controls how to scroll due to interpreter output. |
comint-scroll-to-bottom-on-input | Controls whether input to interpreter causes window to scroll. |
comint-scroll-to-bottom-on-output | Controls whether interpreter output moves point to the end of the output. |
comint-stored-incomplete-input | Stored input for history cycling. |
comint-terminfo-terminal | Value to use for TERM when the system uses terminfo. |
comint-unquote-function | Function to use for completion of quoted data. |
comint-use-prompt-regexp | If non-nil, use ‘comint-prompt-regexp’ to recognize prompts. |
Defined functions (147)
Defined faces (2)
comint-highlight-input | Face to use to highlight user input. |
comint-highlight-prompt | Face to use to highlight prompts. |