[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make completing-read pick item after initial
From: |
Philip Kaludercic |
Subject: |
Re: Make completing-read pick item after initial |
Date: |
Sun, 14 Apr 2024 10:43:34 +0000 |
Heime <heimeborgia@protonmail.com> writes:
> How can I make completing-read start from an initial "Gramma", but rather than
> starting from "Greek" as the next item, it continues with the next one, namely
> "Flokki". But I would like to retain the order of cseq as "Greek" "Gramma"
> "Flokki" rather than changing it.
I am not entirely sure about this, but the name of the argument
COLLECTION hints that the interface doesn't commit to any order. These
are just different strings that by default, Emacs will expand (and due
to the usage of REQUIRE-MATCH prevent anything else from being
accepted).
> (defun avus-latex (seltr)
> "Display the full documentation of `avus-ams' tools."
>
> (interactive
> (list
> (let ( (cseq '("Greek" "Gramma" "Flokki")) )
> (completing-read "Doc: " cseq nil t "Gramma"))))
>
> (describe-function (pcase seltr
> ("Greek" 'avus-latex-greek)
> ("Gramma" 'avus-latex-gramma)
> ("Flokki" 'avus-latex-flokki))) )
>
>
--
Philip Kaludercic on icterid