all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matthew Dempsky <matthew@dempsky.org>
To: 5030@emacsbugs.donarmstrong.com
Subject: bug#5030: 23.1.50; Unexpected minibuffer tab completion behavior
Date: Wed, 25 Nov 2009 00:42:35 -0800	[thread overview]
Message-ID: <d791b8790911250042m16d60f5bhc71ecdf625b60d3@mail.gmail.com> (raw)
In-Reply-To: <d791b8790911241824w3ed37633w224a63c5d79abed8@mail.gmail.com>

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





  reply	other threads:[~2009-11-25  8:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-24  6:09 bug#5030: 23.1.50; Unexpected minibuffer tab completion behavior Matthew Dempsky
2009-11-25  1:08 ` bug#5036: " Matthew Dempsky
2009-11-25  1:55   ` bug#5036: marked as done (23.1.50; Unexpected minibuffer tab completion behavior) Emacs bug Tracking System
2009-11-25  2:24 ` bug#5030: 23.1.50; Unexpected minibuffer tab completion behavior Matthew Dempsky
2009-11-25  8:42   ` Matthew Dempsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-11-25  1:09 Matthew Dempsky
2009-11-25  1:23 ` Matthew Dempsky
2009-11-25 16:36   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d791b8790911250042m16d60f5bhc71ecdf625b60d3@mail.gmail.com \
    --to=matthew@dempsky.org \
    --cc=5030@emacsbugs.donarmstrong.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.