1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00
emacs/lisp/eshell
Jim Porter 498d31e9f0 Support Eshell iterative evaluation in the background
This really just generalizes Eshell's previous support for iterative
evaluation of a single current command to a list of multiple commands,
of which at most one can be in the foreground (bug#66066).

* lisp/eshell/esh-cmd.el (eshell-last-async-procs)
(eshell-current-command): Make obsolete in favor of...
(eshell-foreground-command): ... this
(eshell-background-commands): New variable.
(eshell-interactive-process-p): Make obsolete.
(eshell-head-process, eshell-tail-process): Use
'eshell-foreground-command'.
(eshell-cmd-initialize): Initialize new variables.
(eshell-add-command, eshell-remove-command)
(eshell-commands-for-process): New functions.
(eshell-parse-command): Make 'eshell-do-subjob' the outermost call.
(eshell-do-subjob): Call 'eshell-resume-eval' to split this command
off from its parent forms.
(eshell-eval-command): Use 'eshell-add-command'.
(eshell-resume-command): Use 'eshell-commands-for-process'.
(eshell-resume-eval): Take a COMMAND argument.  Return
':eshell-background' form for deferred background commands.
(eshell-do-eval): Remove check for 'eshell-current-subjob-p'.  This is
handled differently now.

* lisp/eshell/eshell.el (eshell-command): Wait for all processes to
exit when running synchronously.

* lisp/eshell/esh-mode.el (eshell-intercept-commands)
(eshell-watch-for-password-prompt):
* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments):
* lisp/eshell/em-smart.el (eshell-smart-display-move): Use
'eshell-foreground-command'.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/background/simple-command)
(esh-cmd-test/background/subcommand): New tests.
(esh-cmd-test/throw): Use 'eshell-foreground-command'.

* test/lisp/eshell/eshell-tests.el (eshell-test/queue-input): Use
'eshell-foreground-command'.

* test/lisp/eshell/em-script-tests.el
(em-script-test/source-script/background): Make the test script more
complex.

* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/pipeline-wait): New test.

* doc/misc/eshell.texi (Bugs and ideas): Remove implemented feature.
2023-10-02 20:49:41 -07:00
..
em-alias.el
em-banner.el
em-basic.el Add debug instrumentation for Eshell process management 2023-08-31 18:42:03 -07:00
em-cmpl.el Support Eshell iterative evaluation in the background 2023-10-02 20:49:41 -07:00
em-dirs.el Apply Eshell tilde expansion before glob expansion 2023-09-02 16:17:27 -07:00
em-elecslash.el
em-extpipe.el
em-glob.el Apply Eshell tilde expansion before glob expansion 2023-09-02 16:17:27 -07:00
em-hist.el Fix behavior of 'eshell-hist-ignoredups' when set to 'erase' 2023-08-23 18:27:45 -07:00
em-ls.el Don't try to set variable removed in Emacs 21 2023-08-25 01:41:47 +02:00
em-pred.el Apply Eshell tilde expansion before glob expansion 2023-09-02 16:17:27 -07:00
em-prompt.el Display the exit code if the last command failed in Eshell 2023-09-02 15:40:04 -07:00
em-rebind.el Document optional Eshell modules 2023-07-01 12:03:56 -07:00
em-script.el Don't print subjob messages when running an Eshell script in the background 2023-10-02 20:49:40 -07:00
em-smart.el Support Eshell iterative evaluation in the background 2023-10-02 20:49:41 -07:00
em-term.el Add nvim and ncmpcpp to eshell-visual-commands 2023-08-02 21:57:15 +02:00
em-tramp.el
em-unix.el Add 'compile' builtin command for Eshell 2023-08-16 10:01:49 -07:00
em-xtra.el
esh-arg.el ; Simplify how to use 'eshell-debug-command' 2023-09-14 17:54:26 -07:00
esh-cmd.el Support Eshell iterative evaluation in the background 2023-10-02 20:49:41 -07:00
esh-ext.el Add support for explicitly-remote commands in Eshell 2023-07-10 12:27:09 -07:00
esh-io.el ; Adjust Eshell regression tests to avoid SIGPIPE 2023-10-01 13:11:09 -07:00
esh-mode.el Support Eshell iterative evaluation in the background 2023-10-02 20:49:41 -07:00
esh-module.el
esh-opt.el
esh-proc.el Don't print subjob messages when running an Eshell script in the background 2023-10-02 20:49:40 -07:00
esh-util.el ; Simplify how to use 'eshell-debug-command' 2023-09-14 17:54:26 -07:00
esh-var.el Fix documented Eshell behavior of ignoring leading nils in commands 2023-09-15 13:43:07 -07:00
eshell.el Support Eshell iterative evaluation in the background 2023-10-02 20:49:41 -07:00