[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e97ab1c4133: Use 'eshell-with-handles' when executing an Eshell f
From: |
Jim Porter |
Subject: |
master e97ab1c4133: Use 'eshell-with-handles' when executing an Eshell file |
Date: |
Wed, 28 Aug 2024 17:00:51 -0400 (EDT) |
branch: master
commit e97ab1c41332e179939f457cc010a606a5124ff8
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>
Use 'eshell-with-handles' when executing an Eshell file
This makes sure we close the handles as we should, which is important
for writing the output to an actual file (bug#72857).
* lisp/eshell/em-script.el (esh-cmd): Require this, just to be explicit.
(eshell-execute-file): Use 'eshell-with-handles'.
---
lisp/eshell/em-script.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el
index 80dea16106b..a8662c4a2b7 100644
--- a/lisp/eshell/em-script.el
+++ b/lisp/eshell/em-script.el
@@ -24,6 +24,7 @@
;;; Code:
(require 'esh-mode)
+(require 'esh-cmd)
(require 'esh-io)
;;;###esh-module-autoload
@@ -127,10 +128,9 @@ Comments begin with `#'."
(with-temp-buffer
(eshell-mode)
(eshell-do-eval
- `(let ((eshell-current-handles
- (eshell-create-handles ,stdout 'insert ,stderr 'insert))
- (eshell-current-subjob-p))
- ,(eshell--source-file file args))
+ `(eshell-with-handles (,stdout 'insert ,stderr 'insert)
+ (let ((eshell-current-subjob-p))
+ ,(eshell--source-file file args)))
t))))
(cl-defstruct (eshell-princ-target
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e97ab1c4133: Use 'eshell-with-handles' when executing an Eshell file,
Jim Porter <=