From: Nikolaj Schumacher <me@nschum.de>
To: Nordlöw <per.nordlow@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: completing-read() on list of vectors
Date: Fri, 12 Sep 2008 19:58:44 +0200 [thread overview]
Message-ID: <m2wshhtfe3.fsf@nschum.de> (raw)
In-Reply-To: <728990ea-9650-49dc-b4c3-4f9578856039@8g2000hse.googlegroups.com> ("Nordlöw"'s message of "Fri\, 12 Sep 2008 03\:30\:53 -0700 \(PDT\)")
Nordlöw <per.nordlow@gmail.com> wrote:
> I guess I need to give it an explicit completion function (as second
> argument) to achieve lookups of list of vectors where for example
> "accumulate" is used as key and the return value is the whole list
> element (vector).
The easiest way would be just to duplicate the first element in a cons.
(a . [a b c d])
Or use a hash map.
Certainly, you could also write your own completion functions, but it
will be significantly slower, because it's written in lisp. (If speed
that's of any concern...)
> Why doesn't completing-read() already work on list of vectors where
> first vector element is a string aswell?
Unfortunately, there are few functions capable of working with vectors.
Consequently, They are rarely used. (Consequently, there are few
functions capable of working with them.)
regards,
Nikolaj Schumacher
prev parent reply other threads:[~2008-09-12 17:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 10:30 completing-read() on list of vectors Nordlöw
2008-09-12 11:19 ` Nordlöw
2008-09-12 17:58 ` Nikolaj Schumacher [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2wshhtfe3.fsf@nschum.de \
--to=me@nschum.de \
--cc=help-gnu-emacs@gnu.org \
--cc=per.nordlow@gmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.