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: Tue, 24 Nov 2009 17:09:50 -0800	[thread overview]
Message-ID: <d791b8790911241709n747a6deehff49ee4b188782ba@mail.gmail.com> (raw)

It seems like the unexpected buffer switching is because the
'dedicated' flag on the temporary window created for *Completions* is
getting cleared by set-window-buffer.

My understanding of the situation so far is:

 - The `(with-output-to-temp-buffer "*Completions*" ...)' form in
minibuffer-completion-help results in `display-buffer' being called
with `display-buffer-mark-dedicated' bound to `soft'.
 - The `(and pop-up-windows ...)' clause of `display-buffer' is
evaluated*, and calls `(set-window-dedicated-p window-to-use 'soft)'.
 - However, the `window--display-buffer-2' call then calls
`set-window-buffer', which sets `w->dedicated = Qnil'.
 - Later, when `(bury-buffer)' is called to hide the minibuffer help,
it sees the window is not dedicated, so it switches to a new buffer
instead of killing the window.

(* I haven't bothered yet to look into why that particular clause is
evaluated, but I don't think it matters; it's just the one that
stepping through the code took me to.)





             reply	other threads:[~2009-11-25  1:09 UTC|newest]

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

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=d791b8790911241709n747a6deehff49ee4b188782ba@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.