GNU bug report logs - #60942
30.0.50; [PATCH] Indices in Eshell variable interpolation don't work with async subcommands

Previous Next

Package: emacs;

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

Date: Thu, 19 Jan 2023 03:37:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

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

Bug is archived. No further changes may be made.

Full log


Message #11 received at 60942 <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 60942 <at> debbugs.gnu.org
Subject: Re: bug#60942: 30.0.50; [PATCH] Indices in Eshell variable
 interpolation don't work with async subcommands
Date: Wed, 18 Jan 2023 23:37:12 -0800
On 1/18/2023 10:49 PM, Eli Zaretskii wrote:
> Why do you remove a non-internal function?  We cannot possibly do that
> if this is going to be installed on the emacs-29 branch.  But even if
> you are going to install on master, why not leave that function alone?
> Some code somewhere could be using it, and we don't usually remove
> functions before a period of deprecation.

I can keep 'eshell-eval-indices' around and mark it obsolete if you 
prefer; it wouldn't hurt anything. I could also fix this bug in that 
function, though it would be an inferior fix compared to the new 
'eshell-indices' function, so we definitely want that new function (or 
something very similar). I'm not sure fixing 'eshell-eval-indices' is 
worth it though, since I'd be very surprised if anyone called that 
function directly.

For context, 'eshell-eval-indices' is a function I added in Emacs 29 to 
fix some related issues with indices[1], but at the time I didn't fully 
understand Eshell's internals and so implemented the fix incorrectly 
(though it works for most common cases). It probably could have been 
marked as internal at the time, but Eshell doesn't seem to do that 
regularly, even for functions that external code would be very unlikely 
to find useful.


[1] In particular, the second case in my original message fails even 
more severely in Emacs 28:

  ~/config $ echo $exec-path[${echo 0}]
  Wrong type argument: number-or-marker-p, (eshell-escape-arg (let 
((indices 'nil)) (eshell-convert (eshell-command-to-value 
(eshell-as-subcommand (eshell-trap-errors (eshell-named-command "echo" 
(list #("0" 0 1 (number t))))))))))




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

Previous Next


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