Function: with-editor-export-editor

with-editor-export-editor is an autoloaded, interactive and byte-compiled function defined in with-editor.el.

Signature

(with-editor-export-editor &optional (ENVVAR "EDITOR") PROCESS INTERACTIVE)

Documentation

Teach subsequent commands to use current Emacs instance as editor.

Set and export the environment variable ENVVAR, by default "EDITOR". The value is automatically generated to teach commands to use the current Emacs instance as "the editor".

PROCESS is only intended for use by eat-exec-hook. When invoked interactively, INTERACTIVE is non-nil, which suppresses the call to
"clear" (only relevant in vterm-mode and eat-mode).

This command can be used in shell-mode, term-mode, eshell-mode(var)/eshell-mode(fun), vterm-mode and eat-mode.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/with-editor-20261009.1315/with-editor.el
;;; Augmentations

;;;###autoload
(cl-defun with-editor-export-editor
    (&optional (envvar "EDITOR") process interactive)
  "Teach subsequent commands to use current Emacs instance as editor.

Set and export the environment variable ENVVAR, by default \"EDITOR\".
The value is automatically generated to teach commands to use the
current Emacs instance as \"the editor\".

PROCESS is only intended for use by `eat-exec-hook'.  When invoked
interactively, INTERACTIVE is non-nil, which suppresses the call to
\"clear\" (only relevant in `vterm-mode' and `eat-mode').

This command can be used in `shell-mode', `term-mode', `eshell-mode',
`vterm-mode' and `eat-mode'."
  (interactive (list (with-editor-read-envvar) nil t))
  (with-editor--export-editor envvar interactive process)
  (message "Successfully exported %s" envvar))