GNU bug report logs -
#78746
31.0.50; ido-confirm-unique-completion has no effect
Previous Next
Full log
View this message in rfc822 format
This bug was found by searching the Emacs .el files for misleading
indentation automatically. This code in ido.el:
((and (= 1 (length ido-matches))
(not (and ido-enable-tramp-completion
(string-equal ido-current-directory "/")
(string-match ".[@:]\\'" (ido-name (car ido-matches)))))
(not (ido-local-file-exists-p (ido-name (car ido-matches)))))
;; only one choice, so select it.
(if (not ido-confirm-unique-completion)
(exit-minibuffer)
(setq ido-rescan (not ido-enable-prefix))
(delete-region (minibuffer-prompt-end) (point))
(insert (ido-name (car ido-matches)))))
is indented correctly, but the parentheses are wrong. It should be:
((and (= 1 (length ido-matches))
(not (and ido-enable-tramp-completion
(string-equal ido-current-directory "/")
(string-match ".[@:]\\'" (ido-name (car ido-matches)))
(not (ido-local-file-exists-p (ido-name (car ido-matches)))))))
;; only one choice, so select it.
(if (not ido-confirm-unique-completion)
(exit-minibuffer)
(setq ido-rescan (not ido-enable-prefix))
(delete-region (minibuffer-prompt-end) (point))
(insert (ido-name (car ido-matches)))))
This inverts the last condition and changes its priority: in effect,
when completing file names in an ido buffer, ido-complete would never
automatically select a single choice (unless that file was deleted
unexpectedly), even when customized to do so, as it was by default.
For buffers, however, ido-complete would complete the sole remaining
buffer name and exit the minibuffer by default, unless a file named like
the single matching buffer name existed in the current directory.
So our options are:
1. change just the code and make it behave as documented for files as
well as buffers
2. change the code and change the defcustom's default to t, retaining
current behavior for files but not buffers
3. allow the defcustom to specify only files or buffers, and make it
default to applying just to buffers, not files, retaining the current
behavior
I'd prefer the first option.
This bug report was last modified 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.