unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: michael_heerdegen@web.de, 57163@debbugs.gnu.org
Subject: bug#57163: completing-read not allow cycling of the options by default
Date: Sat, 13 Aug 2022 16:09:53 +0000	[thread overview]
Message-ID: <EvabBbc3HxYVN02fRQlSyhYi8qg3-ddCAQ0dK581qa0wVeG0AEodIczyq1y5xibUa0FTbgInZnMysL5a300dbd9PlbRD9q_LOYwQeiojTVM=@proton.me> (raw)
In-Reply-To: <834jygmazg.fsf@gnu.org>

------- 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]








  reply	other threads:[~2022-08-13 16:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 22:14 bug#57163: completing-read not allow cycling of the options by default uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13  4:52 ` Michael Heerdegen
2022-08-13  6:01   ` Eli Zaretskii
2022-08-13 14:32     ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 15:14       ` Eli Zaretskii
2022-08-13 16:09         ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-08-13 17:21           ` Eli Zaretskii
2022-08-13 18:15             ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 18:20               ` Eli Zaretskii
2022-08-13 18:28                 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 18:46                   ` Eli Zaretskii
2022-08-13 19:31                     ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-14  5:55                       ` Eli Zaretskii
2022-08-14 16:14                         ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-14 16:18                           ` Eli Zaretskii
2022-08-14 16:34                             ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-14 16:51                               ` Eli Zaretskii
2022-08-14 17:11                                 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-16  5:24                               ` Jean Louis
2022-08-16  4:48                           ` Jean Louis
2022-08-16  5:07                             ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors

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='EvabBbc3HxYVN02fRQlSyhYi8qg3-ddCAQ0dK581qa0wVeG0AEodIczyq1y5xibUa0FTbgInZnMysL5a300dbd9PlbRD9q_LOYwQeiojTVM=@proton.me' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=57163@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=uzibalqa@proton.me \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).