1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-12 14:30:42 -08:00
emacs/test/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-tests.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
em-basic-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-cmpl-tests.el Avoid parsing some Eshell forms when performing completion 2023-03-28 12:03:29 -07:00
em-dirs-tests.el Fix listing of directory contents after "cd" in Eshell 2023-08-07 19:35:43 -07:00
em-extpipe-tests.el ; Fix Eshell tests 2023-08-14 09:20:34 -07:00
em-glob-tests.el Allow splicing Eshell globs in-place 2023-08-21 11:42:46 -07:00
em-hist-tests.el Fix behavior of 'eshell-hist-ignoredups' when set to 'erase' 2023-08-23 18:27:45 -07:00
em-ls-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-pred-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-prompt-tests.el Display the exit code if the last command failed in Eshell 2023-09-02 15:40:04 -07:00
em-script-tests.el Support Eshell iterative evaluation in the background 2023-10-02 20:49:41 -07:00
em-tramp-tests.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
em-unix-tests.el Add 'compile' builtin command for Eshell 2023-08-16 10:01:49 -07:00
esh-arg-tests.el Add support for completing special references (e.g. buffers) in Eshell 2023-03-11 18:49:28 -08:00
esh-cmd-tests.el Support Eshell iterative evaluation in the background 2023-10-02 20:49:41 -07:00
esh-ext-tests.el Add support for explicitly-remote commands in Eshell 2023-07-10 12:27:09 -07:00
esh-io-tests.el ; Move some Eshell tests to more-topical files 2023-09-10 10:38:25 -07:00
esh-opt-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
esh-proc-tests.el ; Adjust Eshell regression tests to avoid SIGPIPE 2023-10-01 13:11:09 -07:00
esh-util-tests.el Merge from origin/emacs-29 2023-09-02 04:28:17 -04:00
esh-var-tests.el Fix documented Eshell behavior of ignoring leading nils in commands 2023-09-15 13:43:07 -07:00
eshell-tests-helpers.el ; Fix debug logging for synchronous commands in Eshell tests 2023-09-01 09:26:14 -07:00
eshell-tests-unload.el Allow unloading Eshell 2023-02-15 17:31:52 -08:00
eshell-tests.el Support Eshell iterative evaluation in the background 2023-10-02 20:49:41 -07:00