GNU bug report logs -
#5030
23.1.50; Unexpected minibuffer tab completion behavior
Previous Next
Full log
View this message in rfc822 format
On Tue, Nov 24, 2009 at 6:24 PM, Matthew Dempsky wrote:
> The last patch I posted achieves the latter behavior. Combining with
> the (proof-of-concept) patch below, I seem to achieve the former
> (personally more desirable) behavior.
I think the patch below is better yet. The second hunk fixes a bug
where `minibuffer-completion-help' assumes that it can directly
compare the input string against the list of candidate completion
strings (e.g., for `find-file', `string' will be bound to something
like `/path/to/a' while `completions' will be a list of file names
like ("aaa" "aab" . 10)).
The first hunk then improves on my last patch's behavior by if you
complete "x" to "xy" when there's also "xyz" available and the
*Completions* buffer is visible, it leaves it visible rather than
hiding it just because "xy" is now an exact match. (I'm still playing
around with this to see how it actually feels.)
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -489,10 +489,8 @@ E = after completion we now have an Exact match.
minibuffer-completion-table
minibuffer-completion-predicate)))
(if completed
- ;; We could also decide to refresh the completions,
- ;; if they're displayed (and assuming there are
- ;; completions left).
- (minibuffer-hide-completions)
+ (when (get-buffer-window "*Completions*" 0)
+ (minibuffer-completion-help))
;; Show the completion table, if requested.
(cond
((not exact)
@@ -1003,7 +1001,9 @@ variables.")
(message nil)
(if (and completions
(or (consp (cdr completions))
- (not (equal (car completions) string))))
+ (not (test-completion completion
+ minibuffer-completion-table
+ minibuffer-completion-predicate))))
(let* ((last (last completions))
(base-size (cdr last))
;; If the *Completions* buffer is shown in a new
This bug report was last modified 15 years and 203 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.