GNU bug report logs - #5030
23.1.50; Unexpected minibuffer tab completion behavior

Previous Next

Package: emacs;

Reported by: Matthew Dempsky <matthew <at> dempsky.org>

Date: Tue, 24 Nov 2009 06:15:04 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 5030 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Matthew Dempsky <matthew <at> dempsky.org>
To: 5030 <at> debbugs.gnu.org
Subject: Re: 23.1.50; Unexpected minibuffer tab completion behavior
Date: Wed, 25 Nov 2009 00:42:35 -0800
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.