* bug#15961: 24.3.50; display-buffer-at-bottom not at bottom
@ 2013-11-23 23:39 Juri Linkov
2013-11-24 10:10 ` martin rudalics
0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2013-11-23 23:39 UTC (permalink / raw)
To: 15961
This bug report is followup from
http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00773.html
In emacs -Q that is wide enough to contain two side-by-side windows
in the *scratch* buffer evaluate:
(add-to-list 'display-buffer-alist '("\\*Completions\\*" display-buffer-at-bottom (nil)))
(display-buffer (get-buffer-create "*Completions*"))
The *Completions* window is displayed to the right from the *scratch* window,
not below.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#15961: 24.3.50; display-buffer-at-bottom not at bottom
2013-11-23 23:39 bug#15961: 24.3.50; display-buffer-at-bottom not at bottom Juri Linkov
@ 2013-11-24 10:10 ` martin rudalics
2013-11-24 16:42 ` Stefan Monnier
0 siblings, 1 reply; 9+ messages in thread
From: martin rudalics @ 2013-11-24 10:10 UTC (permalink / raw)
To: Juri Linkov; +Cc: 15961
> In emacs -Q that is wide enough to contain two side-by-side windows
> in the *scratch* buffer evaluate:
>
> (add-to-list 'display-buffer-alist '("\\*Completions\\*" display-buffer-at-bottom (nil)))
>
> (display-buffer (get-buffer-create "*Completions*"))
>
> The *Completions* window is displayed to the right from the *scratch* window,
> not below.
Strictly spoken, the new window also appears at the bottom of the frame ;-)
An obvious solution to do what you mean is to bind
`split-width-threshold' to nil in `display-buffer-at-bottom' as
(let (split-width-threshold)
(setq window (window--try-to-split-window bottom-window alist)))
But this should be better done _around_ calling `display-buffer'. There
an application should also bind `split-height-threshold' and
`window-min-height' appropriately as well as a specify a `window-height'
alist entry. Otherwise, Emacs will often refuse to make a new window
which is probably not what we want when displaying *Completions*.
martin
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#15961: 24.3.50; display-buffer-at-bottom not at bottom
2013-11-24 10:10 ` martin rudalics
@ 2013-11-24 16:42 ` Stefan Monnier
2013-11-24 17:35 ` martin rudalics
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2013-11-24 16:42 UTC (permalink / raw)
To: martin rudalics; +Cc: 15961
> But this should be better done _around_ calling `display-buffer'.
I don't think so. Those things should be overridable by the user in
display-buffer-alist, so at most they can be passed to display-buffer
via its ACTION argument.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#15961: 24.3.50; display-buffer-at-bottom not at bottom
2013-11-24 16:42 ` Stefan Monnier
@ 2013-11-24 17:35 ` martin rudalics
2013-11-25 3:22 ` Stefan Monnier
0 siblings, 1 reply; 9+ messages in thread
From: martin rudalics @ 2013-11-24 17:35 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 15961
>> But this should be better done _around_ calling `display-buffer'.
>
> I don't think so. Those things should be overridable by the user in
> display-buffer-alist, so at most they can be passed to display-buffer
> via its ACTION argument.
If I bind `split-width-threshold' in `display-buffer-at-bottom', the
user won't be able to override it either. So our user has only one
option - provide her own action that handles `split-width-threshold' in
an appropriate way. And thus she will be able to handle the case where
`display-buffer-at-bottom' binds the variable and the case where the
application binds it. Or am I missing something?
The underlying problem is IMO that we never made things like
`split-height-threshold' or `split-window-preferred-function' amenable
to `display-buffer-alist'.
martin
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#15961: 24.3.50; display-buffer-at-bottom not at bottom
2013-11-24 17:35 ` martin rudalics
@ 2013-11-25 3:22 ` Stefan Monnier
2013-11-25 7:28 ` martin rudalics
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2013-11-25 3:22 UTC (permalink / raw)
To: martin rudalics; +Cc: 15961
> If I bind `split-width-threshold' in `display-buffer-at-bottom', the
> user won't be able to override it either.
Of course, she can, because she can set her display-buffer-alist such
that she doesn't go through display-buffer-at-bottom but through another
function of her own choosing instead.
> The underlying problem is IMO that we never made things like
> `split-height-threshold' or `split-window-preferred-function' amenable
> to `display-buffer-alist'.
Agreed.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#15961: 24.3.50; display-buffer-at-bottom not at bottom
2013-11-25 3:22 ` Stefan Monnier
@ 2013-11-25 7:28 ` martin rudalics
2013-11-25 15:01 ` Stefan Monnier
0 siblings, 1 reply; 9+ messages in thread
From: martin rudalics @ 2013-11-25 7:28 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 15961
>> If I bind `split-width-threshold' in `display-buffer-at-bottom', the
>> user won't be able to override it either.
>
> Of course, she can, because she can set her display-buffer-alist such
> that she doesn't go through display-buffer-at-bottom but through another
> function of her own choosing instead.
So the only viable choice is to not set `split-width-threshold' anywhere
and tell the user that if she wants a window below via
`display-buffer-at-bottom' she has to customize `split-width-threshold'.
martin
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#15961: 24.3.50; display-buffer-at-bottom not at bottom
2013-11-25 7:28 ` martin rudalics
@ 2013-11-25 15:01 ` Stefan Monnier
2013-11-25 16:42 ` martin rudalics
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2013-11-25 15:01 UTC (permalink / raw)
To: martin rudalics; +Cc: 15961
> So the only viable choice is to not set `split-width-threshold' anywhere
> and tell the user that if she wants a window below via
> `display-buffer-at-bottom' she has to customize `split-width-threshold'.
I think we're miscommunicating. I was pointing out that binding
split-width-threshold in display-buffer-at-bottom is OK because it can
still be overridden by the user.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#15961: 24.3.50; display-buffer-at-bottom not at bottom
2013-11-25 15:01 ` Stefan Monnier
@ 2013-11-25 16:42 ` martin rudalics
2013-11-28 0:55 ` Juri Linkov
0 siblings, 1 reply; 9+ messages in thread
From: martin rudalics @ 2013-11-25 16:42 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 15961
> I think we're miscommunicating. I was pointing out that binding
> split-width-threshold in display-buffer-at-bottom is OK because it can
> still be overridden by the user.
OK. Committed as revision 115229 on trunk.
martin
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#15961: 24.3.50; display-buffer-at-bottom not at bottom
2013-11-25 16:42 ` martin rudalics
@ 2013-11-28 0:55 ` Juri Linkov
0 siblings, 0 replies; 9+ messages in thread
From: Juri Linkov @ 2013-11-28 0:55 UTC (permalink / raw)
To: martin rudalics; +Cc: 15961-done
>> I think we're miscommunicating. I was pointing out that binding
>> split-width-threshold in display-buffer-at-bottom is OK because it can
>> still be overridden by the user.
>
> OK. Committed as revision 115229 on trunk.
Thank you. I confirm that display-buffer-at-bottom works now
exactly like its name suggests in all window configurations.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-11-28 0:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-23 23:39 bug#15961: 24.3.50; display-buffer-at-bottom not at bottom Juri Linkov
2013-11-24 10:10 ` martin rudalics
2013-11-24 16:42 ` Stefan Monnier
2013-11-24 17:35 ` martin rudalics
2013-11-25 3:22 ` Stefan Monnier
2013-11-25 7:28 ` martin rudalics
2013-11-25 15:01 ` Stefan Monnier
2013-11-25 16:42 ` martin rudalics
2013-11-28 0:55 ` Juri Linkov
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).