all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#63910: 29.0.91; icomplete-mode ignores minibuffer-completion-confirm
@ 2023-06-05 13:39 Manuel Zimmermann
  2023-06-06 10:13 ` Manuel Zimmermann
  0 siblings, 1 reply; 2+ messages in thread
From: Manuel Zimmermann @ 2023-06-05 13:39 UTC (permalink / raw)
  To: 63910


The problem is that setting the variable `minibuffer-completion-confirm` to
'confirm is not respected by icomplete-mode.

Steps to reproduce:

1. Evaluate following lines:

(setq minibuffer-completion-confirm 'confirm)
(icomplete-mode)

2. C-x C-f /tmp/non-existent-file

The documentation string of `minibuffer-completion-confirm` states:

  If the value is 'confirm', the user may exit with an input that is not a valid
  completion alternative, but Emacs asks for confirmation.

Since a file is opened which does not exist, I would expect that after pressing
RET the first time, Emacs still stays in the minibuffer and appends [Confirm] at
the end of the line. Only when pressing RET a second time Emacs switches to the
new buffer.

The actual behavior is that Emacs directly switches to the new buffer without
confirmation after pressing RET for the first time.


In GNU Emacs 29.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.8) of 2023-06-05 built on host-1
Repository revision: dd2d8ff2f5cf5f495a793c7db0a168474a339613
Repository branch: makepkg
System Description: Arch Linux

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --with-modules --without-libotf --without-m17n-flt --without-gconf
 --with-native-compilation=yes --with-xinput2 --with-pgtk
 --without-xaw3d --with-sound=no --with-tree-sitter --without-gpm
 --without-compress-install
 '--program-transform-name=s/\([ec]tags\)/\1.emacs/'
 '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'
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK
PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
WEBP XIM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: ELisp/d

Minor modes in effect:
  icomplete-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  tab-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(cl-print face-remap misearch multi-isearch bug-reference find-func
shortdoc help-fns radix-tree xref ring gnutls network-stream nsm vc-git
diff-mode easy-mmode vc-dispatcher thingatpt project mailalias smtpmail
textsec uni-scripts url url-proxy url-privacy url-expand url-methods
url-history url-cookie generate-lisp-file url-domsuf url-util url-parse
auth-source eieio eieio-core json map byte-opt url-vars idna-mapping
ucs-normalize uni-confusable textsec-check pp shadow sort mail-extr
emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml
mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils icomplete cl-loaddefs comp
comp-cstr warnings icons subr-x rx cl-seq cl-macs gv cl-extra help-mode
bytecomp byte-compile cl-lib rmc iso-transl tooltip cconv eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/pgtk-win pgtk-win term/common-win pgtk-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 nadvice seq simple cl-generic
indonesian philippine 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 abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
lcms2 multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 291917 41682)
 (symbols 48 9945 7)
 (strings 32 56481 2760)
 (string-bytes 1 1397918)
 (vectors 16 52625)
 (vector-slots 8 879756 35852)
 (floats 8 165 141)
 (intervals 56 2071 1022)
 (buffers 984 19))





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#63910: 29.0.91; icomplete-mode ignores minibuffer-completion-confirm
  2023-06-05 13:39 bug#63910: 29.0.91; icomplete-mode ignores minibuffer-completion-confirm Manuel Zimmermann
@ 2023-06-06 10:13 ` Manuel Zimmermann
  0 siblings, 0 replies; 2+ messages in thread
From: Manuel Zimmermann @ 2023-06-06 10:13 UTC (permalink / raw)
  To: 63910

I want to add that the reason why I tried to customize
`minibuffer-complete-and-exit` is that it is mentioned in the Emacs
manual in chapter 8.4.3 Completion Exit:

  When a command reads an argument using the minibuffer with completion,
  it also controls what happens when you type <RET>
  (‘minibuffer-complete-and-exit’) to submit the argument. There are
  four types of behavior: [...]

While re-reading this chapter today I stumbled upon another variable
`confirm-nonexistent-file-or-buffer`. This one does exactly what I want
and works. The actual issue described in the original post is therefore
solved, but I think the documentation can be improved.

I thought may it is just a problem with icomplete-mode. When I just
evaluate (setq minibuffer-completion-confirm 'confirm) in emacs -Q, it
still does not have any effect. Maybe the variable shouldn't be
mentioned at all or at least the purpose of it should be described
better.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-06 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05 13:39 bug#63910: 29.0.91; icomplete-mode ignores minibuffer-completion-confirm Manuel Zimmermann
2023-06-06 10:13 ` Manuel Zimmermann

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.