[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57163: completing-read not allow cycling of the options by default
From: |
uzibalqa |
Subject: |
bug#57163: completing-read not allow cycling of the options by default |
Date: |
Sat, 13 Aug 2022 16:09:53 +0000 |
------- Original Message -------
On Saturday, August 13th, 2022 at 3:14 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Sat, 13 Aug 2022 14:32:02 +0000
> > From: uzibalqa uzibalqa@proton.me
> > Cc: Michael Heerdegen michael_heerdegen@web.de, 57163@debbugs.gnu.org
> >
> > > > You mean the completion candidates? M-<up> and M-<down> do that (by
> > > > default).
> >
> > > As does repeatedly pressing TAB, right? Or maybe I don't understand
> > > what is meant by "cycling" in this context? An example of using
> > > completing-read and the lack of cycling would be appreciated.
> >
> > Correct, TAB, M-<up>, M-<down> do not execute any functionality
>
>
> They do here, see below.
>
> > Consider the following function. Call the function with "M-x change-cursor".
> > TAB produces "[Complete, but not unique]"; whilst "M-down" and "M-up" result
> > in [M-down is undefined] and [M-up is undefined].
> >
> > (defun change-cursor (form)
> > "Modify the cursor form."
> >
> > (interactive
> > (list
> > (let ( (cseq '("bar" "hbar" "hollow" "box")) )
> > (completing-read " Cursor: " cseq nil t "box"))))
> >
> > (pcase form
> > ("bar"
> > (set-default 'cursor-type 'bar)
> > ("hbar"
> > (set-default 'cursor-type 'hbar)
> > ("hollow"
> > (set-default 'cursor-type 'hollow)
> > ("box"
> > (set-default 'cursor-type 'box))) )
>
>
> If I evaluate
>
> (let ( (cseq '("bar" "hbar" "hollow" "box")) )
> (completing-read " Cursor: " cseq nil t "box"))
>
> then I can cycle through all the candidates with M-n and M-p. TAB
> doesn't do anything because the window showing the candidates is small
> and shows all of them at once.
M-n and M-p work as you say. Have noticed that when one is using
debug-on-error,
using M-n until the last option gives
Debugger entered--Lisp error: (user-error "End of defaults; no next item")
signal(user-error ("End of defaults; no next item"))
user-error("End of defaults; no next item")
After that, doing M-p gives [M-p is undefined]
- bug#57163: completing-read not allow cycling of the options by default, uzibalqa, 2022/08/12
- bug#57163: completing-read not allow cycling of the options by default, Michael Heerdegen, 2022/08/13
- bug#57163: completing-read not allow cycling of the options by default, Eli Zaretskii, 2022/08/13
- bug#57163: completing-read not allow cycling of the options by default, uzibalqa, 2022/08/13
- bug#57163: completing-read not allow cycling of the options by default, Eli Zaretskii, 2022/08/13
- bug#57163: completing-read not allow cycling of the options by default,
uzibalqa <=
- bug#57163: completing-read not allow cycling of the options by default, Eli Zaretskii, 2022/08/13
- bug#57163: completing-read not allow cycling of the options by default, uzibalqa, 2022/08/13
- bug#57163: completing-read not allow cycling of the options by default, Eli Zaretskii, 2022/08/13
- bug#57163: completing-read not allow cycling of the options by default, uzibalqa, 2022/08/13
- bug#57163: completing-read not allow cycling of the options by default, Eli Zaretskii, 2022/08/13
- bug#57163: completing-read not allow cycling of the options by default, uzibalqa, 2022/08/13
- bug#57163: completing-read not allow cycling of the options by default, Eli Zaretskii, 2022/08/14
- bug#57163: completing-read not allow cycling of the options by default, uzibalqa, 2022/08/14
- bug#57163: completing-read not allow cycling of the options by default, Eli Zaretskii, 2022/08/14
- bug#57163: completing-read not allow cycling of the options by default, uzibalqa, 2022/08/14