From: Jim Porter <jporterbugs@gmail.com>
To: Milan Zimmermann <milan.zimmermann@gmail.com>, 59545@debbugs.gnu.org
Cc: eliz@gnu.org
Subject: bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file
Date: Tue, 20 Dec 2022 16:29:31 -0800 [thread overview]
Message-ID: <9f56f995-c03d-a10e-ac18-b873af8589dc@gmail.com> (raw)
In-Reply-To: <a58e35a9-56f7-dead-a987-9bf7fb6c2cd1@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 538 bytes --]
On 12/20/2022 4:18 PM, Jim Porter wrote:
> Attached is a patch series to fix this, with a bunch of new tests. I
> also fixed a related issue where redirecting to /dev/null could clobber
> your other redirects. (There's *also* an issue that should be fixed for
> the release branch; I'll send that in a separate message.)
Eli, this is the patch for the release branch (it corresponds to part
0003 of the patch series for master). Is this ok to merge? It's a
regression that was introduced in Emacs 28.1, and the fix is pretty simple.
[-- Attachment #2: 0001-When-redirecting-to-the-null-device-in-Eshell-use-de.patch --]
[-- Type: text/plain, Size: 1263 bytes --]
From b04f42cca272b9a0f3b5e3167ce956523b161a7e Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Tue, 20 Dec 2022 16:20:50 -0800
Subject: [PATCH] When redirecting to the null device in Eshell, use
"/dev/null"
This is so that users can type "cmd ... > /dev/null" in Eshell no
matter what their system's null device is called. This partially
reverts 67a8bdb90c9b5865b7f17290c7135b1a5458c36d.
Do not merge to master.
* lisp/eshell/esh-io.el (eshell-set-output-handle): Use "/dev/null"
literally.
---
lisp/eshell/esh-io.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el
index 4620565f857..6df40914060 100644
--- a/lisp/eshell/esh-io.el
+++ b/lisp/eshell/esh-io.el
@@ -342,7 +342,9 @@ eshell-set-output-handle
(when target
(let ((handles (or handles eshell-current-handles)))
(if (and (stringp target)
- (string= target (null-device)))
+ ;; This should be the literal string "/dev/null", not
+ ;; `null-device'.
+ (string= target "/dev/null"))
(aset handles index nil)
(let ((where (eshell-get-target target mode))
(current (car (aref handles index))))
--
2.25.1
next prev parent reply other threads:[~2022-12-21 0:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 15:49 bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file Milan Zimmermann
2022-12-21 0:18 ` Jim Porter
2022-12-21 0:29 ` Jim Porter [this message]
2022-12-21 9:54 ` Michael Albinus
2022-12-21 18:48 ` Jim Porter
2022-12-21 19:26 ` Eli Zaretskii
2022-12-22 1:20 ` Jim Porter
2022-12-22 20:02 ` Jim Porter
2022-12-24 7:29 ` Jim Porter
2022-12-25 1:36 ` Jim Porter
2022-12-25 21:49 ` Jim Porter
2022-12-26 19:50 ` Jim Porter
2022-12-30 6:40 ` Jim Porter
2022-12-21 12:01 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9f56f995-c03d-a10e-ac18-b873af8589dc@gmail.com \
--to=jporterbugs@gmail.com \
--cc=59545@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=milan.zimmermann@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.