help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: [External] : Use of an associated list with completing-read


From: Drew Adams
Subject: RE: [External] : Use of an associated list with completing-read
Date: Fri, 19 Apr 2024 15:10:04 +0000

> How can I get the value associated with a key.
> The following does not get me the value
> associated with my-key.
> 
> (let ( (lnum (cdr (rassoc my-key my-alist))))
>   (when lnum (goto-line lnum))))) )

You don't show your key or alist.
And you include the irrelevant code `goto-line'.

If `my-key' is `((4 score (and 7) years) ago)'
and `my-alist' is `((humpty . dumpty)
(sat . on-a-wall))', then it's no wonder you're
not getting the value associated with `my-key',
because there isn't any.


reply via email to

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