]> git.eshelyaron.com Git - emacs.git/commit
Fix calling Eshell scripts outside of Eshell
authorJim Porter <jporterbugs@gmail.com>
Mon, 20 May 2024 15:59:02 +0000 (08:59 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 May 2024 14:27:44 +0000 (16:27 +0200)
commitaa005632aaa3c47ebb04cf6b2369ec96a60019b3
tree41d2f3d83cd6ace3b75ebf4bad0335d33f3e9f34
parentbd9f5472b98183e69ef82ca3f9b7d6d779246eb5
Fix calling Eshell scripts outside of Eshell

* lisp/eshell/em-script.el (eshell-source-file): Make obsolete.
(eshell--source-file): Adapt from 'eshell-source-file'...
(eshell-script-initialize, eshell/source, eshell/.): ... use it.
(eshell-princ-target): New struct.
(eshell-output-object-to-target, eshell-target-line-oriented-p): New
implementations for 'eshell-princ-target'.
(eshell-execute-file, eshell-batch-file): New functions.

* lisp/eshell/esh-mode.el (eshell-mode): Just warn if we can't create
the Eshell directory.

* test/lisp/eshell/em-script-tests.el (em-script-test/execute-file):
(em-script-test/execute-file/args), em-script-test/batch-file): New
tests.

* test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell-settings):
New function...
(with-temp-eshell): ... use it.

* doc/misc/eshell.texi (Control Flow): Update documentation.

* etc/NEWS: Announce this change (bug#70847).

(cherry picked from commit 9280a619ab3141c0b3b8f4ae876f82e6a38c757f)
doc/misc/eshell.texi
etc/NEWS
lisp/eshell/em-script.el
lisp/eshell/esh-mode.el
test/lisp/eshell/em-script-tests.el
test/lisp/eshell/eshell-tests-helpers.el