all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 16943@debbugs.gnu.org
Subject: bug#16943: 24.3.50; [PATCH] `icomplete-exhibit' needs `with-current-buffer' for minibuffer
Date: Wed, 5 Mar 2014 10:50:07 -0800 (PST)	[thread overview]
Message-ID: <5d97809c-5fbf-4b3e-b864-8badfbd532da@default> (raw)


I have noticed, with both my version (icomplete+.el) and vanilla
icomplete.el, that in some cases no match of the user input is found
because the field string gets picked up from buffer *Completions*, not
from the minibuffer.

This might be because in my case I use a separate frame for the
minibuffer and for *Completions* (the latter has its input redirected to
the former).

The fix that seems most appropriate, I think, is this: wrap the body of
the `icomplete-exhibit' code with this:

 (with-current-buffer (window-buffer (active-minibuffer-window))

E.g.:

(defun icomplete-exhibit ()
  "Insert Icomplete completions display.
Should be run via minibuffer `post-command-hook'.
See `icomplete-mode' and `minibuffer-setup-hook'."
  (when (and icomplete-mode
             (icomplete-simple-completing-p)) ;Shouldn't be necessary.
    (with-current-buffer (window-buffer (active-minibuffer-window))
      (save-excursion
        (goto-char (point-max))
...

In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2014-03-04 on ODIEONE
Bzr revision: 116662 kbrown@cornell.edu-20140304190249-6s13s5bwn3un3hfe
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 'CFLAGS=-O0 -g3' 'CPPFLAGS=-DGC_MCHECK=1 -Ic:/Devel/emacs/include'
 LDFLAGS=-Lc:/Devel/emacs/lib'





             reply	other threads:[~2014-03-05 18:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 18:50 Drew Adams [this message]
2014-03-08  0:17 ` bug#16943: 24.3.50; [PATCH] `icomplete-exhibit' needs `with-current-buffer' for minibuffer Stefan Monnier
2014-03-08  1:40   ` Drew Adams
2014-03-08  4:12     ` Stefan Monnier
2016-04-29 17:59       ` Lars Ingebrigtsen

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=5d97809c-5fbf-4b3e-b864-8badfbd532da@default \
    --to=drew.adams@oracle.com \
    --cc=16943@debbugs.gnu.org \
    /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.