Function: shell-command-with-editor-mode
shell-command-with-editor-mode is an autoloaded, interactive and
byte-compiled function defined in with-editor.el.
Signature
(shell-command-with-editor-mode &optional ARG)
Documentation
Teach shell-command to use current Emacs instance as editor.
Teach shell-command, and all commands that ultimately call that
command, to use the current Emacs instance as editor by executing
"EDITOR=CLIENT COMMAND&" instead of just "COMMAND&".
CLIENT is automatically generated; EDITOR=CLIENT instructs COMMAND to use to the current Emacs instance as "the editor", assuming no other variable overrides the effect of "$EDITOR". CLIENT may be the path to an appropriate emacsclient executable with arguments, or a script which also works over Tramp.
Alternatively you can use the with-editor-async-shell-command,
which also allows the use of another variable instead of
"EDITOR".
This is a global minor mode. If called interactively, toggle the
Shell-Command-With-Editor mode mode. If the prefix argument is
positive, enable the mode, and if it is zero or negative, disable
the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable
the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate (default-value \=shell-command-with-editor-mode)'.
The mode's hook is called both when the mode is enabled and when it is disabled.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/with-editor-20260301.1317/with-editor.el
;;;###autoload
(define-minor-mode shell-command-with-editor-mode
"Teach `shell-command' to use current Emacs instance as editor.
Teach `shell-command', and all commands that ultimately call that
command, to use the current Emacs instance as editor by executing
\"EDITOR=CLIENT COMMAND&\" instead of just \"COMMAND&\".
CLIENT is automatically generated; EDITOR=CLIENT instructs
COMMAND to use to the current Emacs instance as \"the editor\",
assuming no other variable overrides the effect of \"$EDITOR\".
CLIENT may be the path to an appropriate emacsclient executable
with arguments, or a script which also works over Tramp.
Alternatively you can use the `with-editor-async-shell-command',
which also allows the use of another variable instead of
\"EDITOR\"."
:global t)