GNU bug report logs - #61286
28.2; No visible candidates after toggle icomplete-vertical-mode

Previous Next

Package: emacs;

Reported by: Fernando de Morais <fernandodemorais.jf <at> gmail.com>

Date: Sun, 5 Feb 2023 01:54:01 UTC

Severity: normal

Tags: notabug

Found in version 28.2

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61286 in the body.
You can then email your comments to 61286 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#61286; Package emacs. (Sun, 05 Feb 2023 01:54:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Fernando de Morais <fernandodemorais.jf <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 05 Feb 2023 01:54:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Fernando de Morais <fernandodemorais.jf <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.2; No visible candidates after toggle icomplete-vertical-mode
Date: Sat, 04 Feb 2023 22:51:50 -0300
To reproduce, which is possible with 'emacs -Q', please:

1. Evaluate the following snippet:

  (progn
    (with-eval-after-load 'icomplete
      (define-key icomplete-minibuffer-map (kbd "C-v") #'icomplete-vertical-mode)
      (customize-set-variable 'icomplete-show-matches-on-no-input t))
    (icomplete-mode))

2. C-x C-f
3. C-v (to toggle `icomplete-vertical-mode' while still in the minibuffer).

Results in:

  - Only the first candidate can be seen in the vertical list.

Completion works as expected.  Quitting and starting a new command, with
`icomplete-vertical-mode' still enabled, displays the completion
candidates correctly.


In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6)
 of 2023-01-02 built on 2
Windowing system distributor 'The X.Org Foundation', version 11.0.12101006
System Description: Arch Linux

Configured using:
 'configure --with-x-toolkit=gtk3 --with-native-compilation
 --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib
 --localstatedir=/var --with-cairo --with-harfbuzz --with-libsystemd
 --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt
 -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection -g
 -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'
 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LC_CTYPE: pt_BR.UTF-8
  value of $LANG: pt_BR.UTF-8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  corfu-mode: t
  flymake-mode: t
  flyspell-mode: t
  goto-address-prog-mode: t
  hl-line-mode: t
  yas-minor-mode: t
  rainbow-delimiters-mode: t
  recentf-mode: t
  savehist-mode: t
  minions-mode: t
  movemail-auto-fetch-mode: t
  marginalia-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  minibuffer-electric-default-mode: t
  minibuffer-depth-indicate-mode: t
  display-time-mode: t
  global-so-long-mode: t
  electric-pair-mode: t
  delete-selection-mode: t
  display-battery-mode: t
  gcmh-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  temp-buffer-resize-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  hs-minor-mode: t

Load-path shadows:
None found.

Features:
(shadow footnote emacsbug sendmail modus-vivendi-theme flow-fill qp
smiley gnus-cite mm-archive mail-extr gnus-bcklg embark-org
embark-consult embark sort gnus-ml disp-table nnmaildir nnagent nnml
nnnil nnrss gnus-topic mairix gnus-dup gnus-draft nndraft nnmh
gnus-demon gnus-async gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg nntp gnus-cache flyspell-correct comp comp-cstr etags
fileloop pulse color view vc-svn misearch multi-isearch vc denote xref
diff shortdoc cl-print help-fns radix-tree org-agenda org-refile
consult-org conf-mode vc-git diff-mode vc-dispatcher org-eldoc
org-indent image-file image-converter gnutls network-stream url-http
url-gw nsm url-cache url-auth ol-eww eww-lnum eww xdg url-queue mm-url
ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt
speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view mml-smime smime
dig gnus-sum shr-tag-pre-highlight language-detection shr kinsoku svg
dom gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range
message rmc puny rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs mail-utils ol-docview doc-view jka-compr image-mode exif
ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi ob-octave org-superstar
org-element avl-tree generator org-contrib org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex
iso8601 ol org-keys oc org-compat advice org-macs org-loaddefs find-func
holidays hol-loaddefs cal-menu calendar cal-loaddefs rx
consult-icomplete consult bookmark cape-keyword cape mule-util shell
pcmpl-args pcmpl-gnu pcmpl-linux pcmpl-unix pcomplete corfu time-date
checkdoc lisp-mnt mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr dired-x dired-aux dired dired-loaddefs flymake-proc flymake
project compile text-property-search exec-path-from-shell comint
ansi-color ring warnings display-line-numbers epa-file epa derived epg
rfc6068 epg-config cl-extra flyspell ispell goto-addr hl-line hideshow
yasnippet help-mode rainbow-delimiters recentf tree-widget cus-start
savehist server minions easy-mmode let-alist ibuf-macs marginalia
icomplete minibuf-eldef mb-depth orderless time so-long edmacro kmacro
elec-pair delsel format-spec battery dbus xml auth-source-pass
modus-operandi-theme modus-themes pcase ffap thingatpt no-littering
compat compat-29 gcmh system-packages tex-site info package browse-url
url url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cus-edit pp
cus-load wid-edit cl-loaddefs cl-lib iso-transl tooltip eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 895084 241351)
 (symbols 48 39621 5)
 (strings 32 192171 41972)
 (string-bytes 1 7515981)
 (vectors 16 265054)
 (vector-slots 8 2938182 234395)
 (floats 8 91443 671)
 (intervals 56 30649 1250)
 (buffers 992 47))

-- 
Regards,
Fernando de Morais.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61286; Package emacs. (Sun, 05 Feb 2023 06:45:01 GMT) Full text and rfc822 format available.

Message #8 received at 61286 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Fernando de Morais <fernandodemorais.jf <at> gmail.com>
Cc: 61286 <at> debbugs.gnu.org
Subject: Re: bug#61286: 28.2;
 No visible candidates after toggle icomplete-vertical-mode
Date: Sun, 05 Feb 2023 08:44:33 +0200
tags 61286 notabug
thanks

> From: Fernando de Morais <fernandodemorais.jf <at> gmail.com>
> Date: Sat, 04 Feb 2023 22:51:50 -0300
> 
> To reproduce, which is possible with 'emacs -Q', please:
> 
> 1. Evaluate the following snippet:
> 
>   (progn
>     (with-eval-after-load 'icomplete
>       (define-key icomplete-minibuffer-map (kbd "C-v") #'icomplete-vertical-mode)
>       (customize-set-variable 'icomplete-show-matches-on-no-input t))
>     (icomplete-mode))
> 
> 2. C-x C-f
> 3. C-v (to toggle `icomplete-vertical-mode' while still in the minibuffer).
> 
> Results in:
> 
>   - Only the first candidate can be seen in the vertical list.
> 
> Completion works as expected.  Quitting and starting a new command, with
> `icomplete-vertical-mode' still enabled, displays the completion
> candidates correctly.

That's because icomplete-vertical-mode adds its own function to
icomplete-minibuffer-setup-hook, but when you invoke C-v in the
minibuffer, that's too late: you already entered the minibuffer, so
the minibuffer is not set up as icomplete-vertical-mode expects.

To solve this, bind C-v to a command that does what
icomplete--vertical-minibuffer-setup does, in addition to turning on
icomplete-vertical-mode, and then it will work as you expect.  Like
this:

  (defun icvsetup ()
    (interactive)
    (setq-local icomplete-hide-common-prefix nil
		icomplete-prospects-height 25
		redisplay-adhoc-scroll-in-resize-mini-windows nil)
    (icomplete-vertical-mode))

  (progn
      (with-eval-after-load 'icomplete
	(define-key icomplete-minibuffer-map (kbd "C-v") #'icvsetup)
	(customize-set-variable 'icomplete-show-matches-on-no-input t))
      (icomplete-mode))

IOW, this is a cockpit error, not a bug in Emacs.




Added tag(s) notabug. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 05 Feb 2023 06:45:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61286; Package emacs. (Sun, 05 Feb 2023 12:02:02 GMT) Full text and rfc822 format available.

Message #13 received at 61286 <at> debbugs.gnu.org (full text, mbox):

From: Fernando de Morais <fernandodemorais.jf <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61286 <at> debbugs.gnu.org
Subject: Re: bug#61286: 28.2; No visible candidates after toggle
 icomplete-vertical-mode
Date: Sun, 05 Feb 2023 09:01:03 -0300
Hello Eli,

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

> That's because icomplete-vertical-mode adds its own function to
> icomplete-minibuffer-setup-hook, but when you invoke C-v in the
> minibuffer, that's too late: you already entered the minibuffer, so
> the minibuffer is not set up as icomplete-vertical-mode expects.
>
> To solve this, bind C-v to a command that does what
> icomplete--vertical-minibuffer-setup does, in addition to turning on
> icomplete-vertical-mode, and then it will work as you expect.  Like
> this:
>
>   (defun icvsetup ()
>     (interactive)
>     (setq-local icomplete-hide-common-prefix nil
> 		icomplete-prospects-height 25
> 		redisplay-adhoc-scroll-in-resize-mini-windows nil)
>     (icomplete-vertical-mode))
>
>   (progn
>       (with-eval-after-load 'icomplete
> 	(define-key icomplete-minibuffer-map (kbd "C-v") #'icvsetup)
> 	(customize-set-variable 'icomplete-show-matches-on-no-input t))
>       (icomplete-mode))
>
> IOW, this is a cockpit error, not a bug in Emacs.

Thanks for explaining the behavior of the `icomplete-vertical-mode'
setup.  I'll adjust my configurations accordingly.  🤝

-- 
Regards,
Fernando de Morais.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 05 Feb 2023 12:05:02 GMT) Full text and rfc822 format available.

Notification sent to Fernando de Morais <fernandodemorais.jf <at> gmail.com>:
bug acknowledged by developer. (Sun, 05 Feb 2023 12:05:02 GMT) Full text and rfc822 format available.

Message #18 received at 61286-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Fernando de Morais <fernandodemorais.jf <at> gmail.com>
Cc: 61286-done <at> debbugs.gnu.org
Subject: Re: bug#61286: 28.2; No visible candidates after toggle
 icomplete-vertical-mode
Date: Sun, 05 Feb 2023 14:04:07 +0200
> From: Fernando de Morais <fernandodemorais.jf <at> gmail.com>
> Cc: 61286 <at> debbugs.gnu.org
> Date: Sun, 05 Feb 2023 09:01:03 -0300
> 
> Thanks for explaining the behavior of the `icomplete-vertical-mode'
> setup.  I'll adjust my configurations accordingly.  🤝

Thanks, I'm therefore closing this bug report.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 05 Mar 2023 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 46 days ago.

Previous Next


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