* Completion window location
@ 2012-10-30 17:11 Jason Sewall
0 siblings, 0 replies; 2+ messages in thread
From: Jason Sewall @ 2012-10-30 17:11 UTC (permalink / raw
To: help-gnu-emacs
I am using Emacs 24.1.1; when my Emacs frame is small and square-ish
with a single window, the completions buffer appears just above the
minibuffer in new horizontal window. This is great! The minibuffer,
with the next I’m trying to complete, is right next to the candidates
I’m considering.
When emacs is set to fullscreen-mode (or even when it is just a little
wider than square) or if I have the frame split horizontally, the
completions buffer takes over one of those frames temporarily. It is
still useful, but my eyes have to crawl all the way up to the top of
the screen to read the first completion candidates, then back down to
the minibuffer, ad nauseum.
I usually use emacs with a fullscreen frame, split horizontally into
two big windows. How can Emacs be persuaded to use a short, temporary
frame just above the minibuffer to show candidates? I rarely need
space to see 50-100 completion candidates at once, and if I did, I
would use some search refining or some such. I have some familiarity
with with Emacs lisp, but I haven't not much hacking and I'm not very
familiar with Emacs internals.
Cheers,
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Completion window location
@ 2012-11-01 17:59 martin rudalics
0 siblings, 0 replies; 2+ messages in thread
From: martin rudalics @ 2012-11-01 17:59 UTC (permalink / raw
To: jasonsewall; +Cc: help-gnu-emacs
> When emacs is set to fullscreen-mode (or even when it is just a little
> wider than square) or if I have the frame split horizontally, the
> completions buffer takes over one of those frames temporarily. It is
> still useful, but my eyes have to crawl all the way up to the top of
> the screen to read the first completion candidates, then back down to
> the minibuffer, ad nauseum.
>
> I usually use emacs with a fullscreen frame, split horizontally into
> two big windows. How can Emacs be persuaded to use a short, temporary
> frame just above the minibuffer to show candidates? I rarely need
> space to see 50-100 completion candidates at once, and if I did, I
> would use some search refining or some such. I have some familiarity
> with with Emacs lisp, but I haven't not much hacking and I'm not very
> familiar with Emacs internals.
I'm currently trying to write a function to do that. The following is a
first stab.
(defun display-buffer-at-bottom-left (buffer alist)
"Try displaying BUFFER in a window at the bottom-left corner of the selected frame."
(or (display-buffer-reuse-window buffer alist)
(let ((bottom-window
(let ((bottom-edge (nth 3 (window-edges (frame-root-window)))))
(catch 'window
(walk-window-tree
(lambda (window)
(when (= (nth 3 (window-edges window))
bottom-edge)
(throw 'window window)))))))
window)
(or (and (not (frame-parameter nil 'unsplittable))
(setq window (window--try-to-split-window bottom-window alist))
(window--display-buffer
buffer window 'window alist display-buffer-mark-dedicated))
(and (not (frame-parameter nil 'unsplittable))
(setq window
(condition-case nil
(split-window (frame-root-window))
(error nil)))
(window--display-buffer
buffer window 'window alist display-buffer-mark-dedicated))
(and (setq window bottom-window)
(not (window-dedicated-p window))
(window--display-buffer
buffer window 'reuse alist display-buffer-mark-dedicated))))))
You have to customize `display-buffer-alist' to add a rule that achieves
(customize-set-variable
'display-buffer-alist '(("*Completions*" display-buffer-at-bottom-left)))
for this to take effect.
martin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-01 17:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-30 17:11 Completion window location Jason Sewall
-- strict thread matches above, loose matches on Subject: below --
2012-11-01 17:59 martin rudalics
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.