GNU bug report logs - #57787
29.0.50; [PATCH] When using $VAL[INDEX] in Eshell, allow symbols as the index

Previous Next

Package: emacs;

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

Date: Tue, 13 Sep 2022 23:24:02 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57787 in the body.
You can then email your comments to 57787 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#57787; Package emacs. (Tue, 13 Sep 2022 23:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Porter <jporterbugs <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 13 Sep 2022 23:24:02 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; [PATCH] When using $VAL[INDEX] in Eshell, allow symbols as
 the index
Date: Tue, 13 Sep 2022 16:23:26 -0700
[Message part 1 (text/plain, inline)]
Eshell variable expansions let you use strings as indices, which will 
treat the outer value as an alist. For example:

  (setq foo '(("a" . 1) ("b" . 2)))
  M-x eshell
  ~ $ echo $foo[a]
  1

However, if the keys in the alist are symbols, that doesn't work:

  (setq foo '((a . 1) (b . 2)))
  M-x eshell
  ~ $ echo $foo[a]
  ;; no output

Attached is a patch to fix this. Now, in the latter case, you'd type:

  ~ $ echo $foo[#'a]
  ;; or
  ~ $ echo $foo[`a]

(Note: "#'a" looks like a sharp quote to denote a function, but the # is 
just Eshell's way of escaping the following single-quote. A bare 
single-quote is the start of a string literal in Eshell.)
[0001-Allow-using-a-symbol-as-an-index-into-an-alist-in-Es.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57787; Package emacs. (Wed, 14 Sep 2022 14:15:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: 57787 <at> debbugs.gnu.org
Subject: Re: bug#57787: 29.0.50; [PATCH] When using $VAL[INDEX] in Eshell,
 allow symbols as the index
Date: Wed, 14 Sep 2022 16:14:42 +0200
Jim Porter <jporterbugs <at> gmail.com> writes:

> Attached is a patch to fix this. Now, in the latter case, you'd type:
>
>   ~ $ echo $foo[#'a]
>   ;; or
>   ~ $ echo $foo[`a]


Makes sense to me.




Reply sent to Jim Porter <jporterbugs <at> gmail.com>:
You have taken responsibility. (Thu, 15 Sep 2022 00:33:01 GMT) Full text and rfc822 format available.

Notification sent to Jim Porter <jporterbugs <at> gmail.com>:
bug acknowledged by developer. (Thu, 15 Sep 2022 00:33:02 GMT) Full text and rfc822 format available.

Message #13 received at 57787-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 57787-done <at> debbugs.gnu.org
Subject: Re: bug#57787: 29.0.50; [PATCH] When using $VAL[INDEX] in Eshell,
 allow symbols as the index
Date: Wed, 14 Sep 2022 17:32:32 -0700
On 9/14/2022 7:14 AM, Lars Ingebrigtsen wrote:
> Makes sense to me.

Thanks for taking a look. Merged as 
b8e9239b47391c6628d94a4e2e91320c5366d27b.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 13 Oct 2022 11:24:15 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 168 days ago.

Previous Next


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