unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Heime <heimeborgia@protonmail.com>
Cc: Heime via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Subject: RE: [External] : Use of an associated list with completing-read
Date: Fri, 19 Apr 2024 15:10:04 +0000	[thread overview]
Message-ID: <SJ0PR10MB548864294DFC3FB812470546F30D2@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <1ZznhcKDmGMQcjaA3pyQaBOnYG81YwX4pE1YSoGxi_Vj_UFqz_DzTcdhZ50XnL3lEDivoq5THtGr-ShAq1PMbkmNHxajYrXWeRmti6_BSD4=@protonmail.com>

> 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	other threads:[~2024-04-19 15:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18 23:48 Use of an associated list with completing-read Heime
2024-04-19  2:14 ` [External] : " Drew Adams
2024-04-19  2:59   ` Heime
2024-04-19  3:10     ` Heime
2024-04-19 15:10       ` Drew Adams [this message]
2024-04-19 19:09         ` Heime
2024-04-19 23:32           ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-04-20  1:13             ` Drew Adams
2024-04-20  1:52               ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-04-20  1:59                 ` Emanuel Berg
2024-04-20  6:14                 ` Heime
2024-04-20  6:37                   ` Heime
2024-04-23  4:44 ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR10MB548864294DFC3FB812470546F30D2@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).