emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57787: closed (29.0.50; [PATCH] When using $VAL[INDEX] in Eshell, al


From: GNU bug Tracking System
Subject: bug#57787: closed (29.0.50; [PATCH] When using $VAL[INDEX] in Eshell, allow symbols as the index)
Date: Thu, 15 Sep 2022 00:33:01 +0000

Your message dated Wed, 14 Sep 2022 17:32:32 -0700
with message-id <5bbf0f33-3643-9103-782d-e489bc98d63a@gmail.com>
and subject line Re: bug#57787: 29.0.50; [PATCH] When using $VAL[INDEX] in 
Eshell, allow symbols as the index
has caused the debbugs.gnu.org bug report #57787,
regarding 29.0.50; [PATCH] When using $VAL[INDEX] in Eshell, allow symbols as 
the index
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
57787: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57787
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- 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 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.)

Attachment: 0001-Allow-using-a-symbol-as-an-index-into-an-alist-in-Es.patch
Description: Text document


--- End Message ---
--- Begin Message --- 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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]