* minibuffer-scroll-window question
@ 2009-05-23 2:39 Trey Jackson
2009-05-25 14:58 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Trey Jackson @ 2009-05-23 2:39 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 779 bytes --]
All,
When reading the documentation for minibuffer-scroll-window, it looks like I
should be able to do something like:
(defun my-minibuffer-setup-hook ()
"try to force the scroll window to be the bottom-left window in the
current frame"
(setq minibuffer-scroll-window (window-at 0 (- (frame-height) 2))))
(add-hook 'minibuffer-setup-hook 'my-minibuffer-setup-hook)
However, in minibuf.c, the defun 'minibuffer-complete sets the
minibuf_scroll_window variable to nil.
So, my question is, how and when can this variable be meaningfully used by
an end user? Should my hook have worked (i.e. this behavior is a bug)?
thanks,
TJ
--
Trey Jackson
bigfaceworm@gmail.com
"Like any truly useful program, `hello' contains a built-in mail reader."
-- GNU's Bulletin, July 1996
[-- Attachment #2: Type: text/html, Size: 1012 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: minibuffer-scroll-window question
2009-05-23 2:39 minibuffer-scroll-window question Trey Jackson
@ 2009-05-25 14:58 ` Stefan Monnier
2009-05-26 17:25 ` Trey Jackson
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2009-05-25 14:58 UTC (permalink / raw)
To: Trey Jackson; +Cc: emacs-devel
> (defun my-minibuffer-setup-hook ()
> "try to force the scroll window to be the bottom-left window in the
> current frame"
> (setq minibuffer-scroll-window (window-at 0 (- (frame-height) 2))))
> (add-hook 'minibuffer-setup-hook 'my-minibuffer-setup-hook)
> However, in minibuf.c, the defun 'minibuffer-complete sets the
> minibuf_scroll_window variable to nil.
> So, my question is, how and when can this variable be meaningfully used by
> an end user? Should my hook have worked (i.e. this behavior is a bug)?
It was not intended to be set by the end user, it's supposed to be
*read* instead (so you can't decide where to put the "scroll window"
but you can figure out which window it is).
To tell you the truth, I think it's largely unsatisfactory, not only
because you can't do what you want, but also because that variable
can point to different buffers in different cases.
In your case, which buffer do you expect to see in that scroll window?
The *Completions* buffer? In that case, maybe you'll be better off
using special-display-buffer-names to control how/where *Completions*
get displayed.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: minibuffer-scroll-window question
2009-05-25 14:58 ` Stefan Monnier
@ 2009-05-26 17:25 ` Trey Jackson
0 siblings, 0 replies; 3+ messages in thread
From: Trey Jackson @ 2009-05-26 17:25 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]
Thanks for the explanation. The alternative worked well.
Any chance the doc string for minibuffer-scroll-window could be updated to
reflect that it's for
internal use only, or at least that it's for read-only access?
thanks,
TJ
On Mon, May 25, 2009 at 7:58 AM, Stefan Monnier <monnier@iro.umontreal.ca>wrote:
> > (defun my-minibuffer-setup-hook ()
> > "try to force the scroll window to be the bottom-left window in the
> > current frame"
> > (setq minibuffer-scroll-window (window-at 0 (- (frame-height) 2))))
> > (add-hook 'minibuffer-setup-hook 'my-minibuffer-setup-hook)
>
> > However, in minibuf.c, the defun 'minibuffer-complete sets the
> > minibuf_scroll_window variable to nil.
>
> > So, my question is, how and when can this variable be meaningfully used
> by
> > an end user? Should my hook have worked (i.e. this behavior is a bug)?
>
> It was not intended to be set by the end user, it's supposed to be
> *read* instead (so you can't decide where to put the "scroll window"
> but you can figure out which window it is).
>
> To tell you the truth, I think it's largely unsatisfactory, not only
> because you can't do what you want, but also because that variable
> can point to different buffers in different cases.
>
> In your case, which buffer do you expect to see in that scroll window?
> The *Completions* buffer? In that case, maybe you'll be better off
> using special-display-buffer-names to control how/where *Completions*
> get displayed.
>
>
> Stefan
>
--
Trey Jackson
bigfaceworm@gmail.com
"Like any truly useful program, `hello' contains a built-in mail reader."
-- GNU's Bulletin, July 1996
[-- Attachment #2: Type: text/html, Size: 2311 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-26 17:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-23 2:39 minibuffer-scroll-window question Trey Jackson
2009-05-25 14:58 ` Stefan Monnier
2009-05-26 17:25 ` Trey Jackson
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).