[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: completing-read() on list of vectors
From: |
Nikolaj Schumacher |
Subject: |
Re: completing-read() on list of vectors |
Date: |
Fri, 12 Sep 2008 19:58:44 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin) |
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