all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16943: 24.3.50; [PATCH] `icomplete-exhibit' needs `with-current-buffer' for minibuffer
@ 2014-03-05 18:50 Drew Adams
  2014-03-08  0:17 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2014-03-05 18:50 UTC (permalink / raw)
  To: 16943


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'





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-29 17:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 18:50 bug#16943: 24.3.50; [PATCH] `icomplete-exhibit' needs `with-current-buffer' for minibuffer Drew Adams
2014-03-08  0:17 ` Stefan Monnier
2014-03-08  1:40   ` Drew Adams
2014-03-08  4:12     ` Stefan Monnier
2016-04-29 17:59       ` Lars Ingebrigtsen

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.