[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell fi
From: |
Jim Porter |
Subject: |
bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file |
Date: |
Wed, 21 Dec 2022 10:48:18 -0800 |
On 12/21/2022 1:54 AM, Michael Albinus wrote:
And when they want to use another value? (null-device) returns
"/dev/null" for local default-directory's if you're not on MS
Windows. On MS Windows, it returns "NUL".
Right. The intent is for the virtual name for the null device to be the
same in Eshell no matter what the system really calls it. On non-MS
systems, this shouldn't actually be necessary, since you could just
write to the *real* /dev/null. The virtual target in Eshell is just so
that /dev/null also works on MS Windows/DOS.
However, I would have thought that you could write to NUL on MS Windows
without any special handling. The Emacs manual has this to say:
"[On MS Windows,] referencing any file whose name matches a DOS
character device, such as NUL or LPT1 or PRN or CON, with or without any
file-name extension, will always resolve to those character devices, in
any directory. Therefore, only use such file names when you want to use
the corresponding character device."
I'd expect that to mean that if you opened a buffer and tried to save it
as "NUL", it would just work, but instead I get:
Write error: Bad file descriptor, c:/NUL
With that in mind, here are two patches (one for 29 and one for master)
to let Eshell handle both "/dev/null" and (on MS systems) "NUL". That
way, users get the best of both worlds.
29--0001-When-redirecting-to-the-null-device-in-Eshell-allow-.patch
Description: Text document
master--0003-Simplify-handling-of-dev-null-redirection-in-Eshell.patch
Description: Text document
- bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file, Jim Porter, 2022/12/20
- bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file, Jim Porter, 2022/12/20
- bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file, Michael Albinus, 2022/12/21
- bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file,
Jim Porter <=
- bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file, Eli Zaretskii, 2022/12/21
- bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file, Jim Porter, 2022/12/21
- bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file, Jim Porter, 2022/12/22
- bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file, Jim Porter, 2022/12/24
- bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file, Jim Porter, 2022/12/24
- bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file, Jim Porter, 2022/12/25
- bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file, Jim Porter, 2022/12/26
- bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file, Jim Porter, 2022/12/30
bug#59545: 29.0.50; Eshell fails to redirect output of sourced eshell file, Eli Zaretskii, 2022/12/21