GNU bug report logs - #54190
29.0.50; [PATCH] Incorrect/missing documentation for some Eshell "$" syntaxes

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Sun, 27 Feb 2022 21:35:02 UTC

Severity: minor

Tags: patch

Found in version 29.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jim Porter <jporterbugs <at> gmail.com>
Subject: bug#54190: closed (Re: bug#54190: 29.0.50; [PATCH]
 Incorrect/missing documentation for some Eshell "$" syntaxes)
Date: Wed, 07 Sep 2022 03:51:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#54190: 29.0.50; [PATCH] Incorrect/missing documentation for some Eshell "$" syntaxes

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 54190 <at> debbugs.gnu.org.

-- 
54190: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54190
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jim Porter <jporterbugs <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 54190-done <at> debbugs.gnu.org,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#54190: 29.0.50; [PATCH] Incorrect/missing documentation for
 some Eshell "$" syntaxes
Date: Tue, 6 Sep 2022 20:50:14 -0700
On 9/6/2022 4:28 AM, Lars Ingebrigtsen wrote:
> Jim Porter <jporterbugs <at> gmail.com> writes:
> 
>> This doesn't do anything more elaborate like using generator.el's
>> machinery here; while (I think) that would be nice to have eventually,
>> we can address that in a separate bug, since it'd be a pretty big
>> change. We could probably close this bug after this new patch merges.
> 
> This was several months ago, but it doesn't look like this was ever
> merged.  If you still think this is the right solution, please go ahead
> and merge.  (The patch no longer merges cleanly.)

This got merged into Emacs 28 as 
2c3d1b6bf41509bf0ba8995925fec9f20d8ed89d, but I think it was left open 
since there was some discussion about rewriting 'eshell-do-eval' on top 
of generator.el. Let's close this, and I'll file a separate followup for 
the generator.el bit.

[Message part 3 (message/rfc822, inline)]
From: Jim Porter <jporterbugs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; [PATCH] Incorrect/missing documentation for some Eshell "$"
 syntaxes
Date: Sun, 27 Feb 2022 13:34:26 -0800
[Message part 4 (text/plain, inline)]
In the documentation for lisp/eshell/esh-var.el (and 
`eshell-parse-variable-ref' in that file), it says that "$<FOO>" is a 
way of accessing the value of the variable FOO to disambiguate the 
length of the variable name, sort of like "${FOO}" in ordinary shells. 
However, that's not actually true. The correct syntax for that is:

  $"FOO"
  ;; or...
  $'FOO'

In fact, what "$<FOO>" does is to run FOO as a subcommand, writing its 
stdout to a temp file, and returning that file's name. This is (very!) 
subtly implied in the Eshell manual in the "Bugs and ideas" section, 
where it says:

  `grep python $<rpm -qa>' doesn't work, but using `*grep' does

  This happens because the `grep' Lisp function returns immediately,
  and then the asynchronous `grep' process expects to examine the
  temporary file, which has since been deleted.

Attached is a patch which updates the documentation to correctly 
describe the current behavior. Note: since this is just a documentation 
change, it might be worth pushing to the 28 branch.
[0001-Improve-correct-documentation-about-Eshell-variable-.patch (text/plain, attachment)]

This bug report was last modified 2 years and 254 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.