emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Completion: minibuffer.el vs comint.el


From: martin rudalics
Subject: Re: Completion: minibuffer.el vs comint.el
Date: Tue, 29 Mar 2011 11:14:17 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

I think it may become dedicated in the function `minibuffer-completion-help'
in `minibuffer.el'. Notice the local binding of the variable
display-buffer-mark-dedicated'.  From the documentation of the variable:

        If non-nil, `display-buffer' marks the windows it creates as dedicated.

`display-buffer' itself is called from the `with-output-to-temp-buffer' C
function (at least that is what `with-output-...'s docs suggest).

Unfortunately as for intent/reason behind this behavior, I don't have
a clue.

This is so as to know whether to delete the window when the *Completions*
buffer is hidden/buried.

Maybe we should use another approach (hi Martin ;-).  E.g. just add
a flag "created for *Completions*" when we create the window, that would
work similarly to `dedicated' w.r.t bury-buffer but which would not
prevent display-buffer from reusing that window for some other buffer.

The dedicated window method works well for displaying a buffer in a
separate frame or a new window.  It can't be used when a window is
reused for displaying the buffer.  In my branch `display-buffer' always
records the previous state and burying the buffer or quitting the window
conveniently restores the previous state.  So when you dedicate a window
to its buffer you exclusively do that because you do not want to display
another buffer in that window.

martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]