GNU bug report logs - #57163
completing-read not allow cycling of the options by default

Previous Next

Package: emacs;

Reported by: uzibalqa <uzibalqa <at> proton.me>

Date: Fri, 12 Aug 2022 22:15:02 UTC

Severity: normal

Tags: moreinfo

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: uzibalqa <uzibalqa <at> proton.me>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 57163 <at> debbugs.gnu.org
Subject: bug#57163: completing-read not allow cycling of the options by default
Date: Sat, 13 Aug 2022 14:32:02 +0000
------- Original Message -------
On Saturday, August 13th, 2022 at 6:01 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:


> > Cc: uzibalqa <at> proton.me
> > From: Michael Heerdegen michael_heerdegen <at> web.de
> > Date: Sat, 13 Aug 2022 06:52:54 +0200
> >
> > uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text
> > editors" bug-gnu-emacs <at> gnu.org writes:
> >
> > > Why is it that things like completing-read not allow cycling of the
> > > options by default?
> >
> > 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

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







This bug report was last modified 2 years and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.