unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* pop-to-buffer / switch-to-buffer-other-window
@ 2020-06-07  2:55 Jean-Christophe Helary
  2020-06-07  6:18 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Jean-Christophe Helary @ 2020-06-07  2:55 UTC (permalink / raw)
  To: Emacs Devel

When I have just one window open, switch-to-buffer-other-window sometimes splits vertically and sometimes horizontally to display the other window.

In the documentation, there are plenty of references to "some window" but little if anything about how that window is chosen/created.

What is the rationale behind this lack of consistency ? Or is there some consistency, for ex based on the mode ?


-- 
Jean-Christophe Helary @brandelune
http://mac4translators.blogspot.com




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pop-to-buffer / switch-to-buffer-other-window
  2020-06-07  2:55 pop-to-buffer / switch-to-buffer-other-window Jean-Christophe Helary
@ 2020-06-07  6:18 ` Eli Zaretskii
  2020-06-07  6:55   ` Jean-Christophe Helary
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2020-06-07  6:18 UTC (permalink / raw)
  To: emacs-devel, Jean-Christophe Helary, Emacs Devel

On June 7, 2020 5:55:52 AM GMT+03:00, Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org> wrote:
> When I have just one window open, switch-to-buffer-other-window
> sometimes splits vertically and sometimes horizontally to display the
> other window.
> 
> In the documentation, there are plenty of references to "some window"
> but little if anything about how that window is chosen/created.
> 
> What is the rationale behind this lack of consistency ? Or is there
> some consistency, for ex based on the mode ?

Please see "Splitting Windows" in the ELisp manual, it describes how Emacs decides whether to split vertically or horizontally.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pop-to-buffer / switch-to-buffer-other-window
  2020-06-07  6:18 ` Eli Zaretskii
@ 2020-06-07  6:55   ` Jean-Christophe Helary
  2020-06-07  9:57     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Jean-Christophe Helary @ 2020-06-07  6:55 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel



> On Jun 7, 2020, at 15:18, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> On June 7, 2020 5:55:52 AM GMT+03:00, Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org> wrote:
>> When I have just one window open, switch-to-buffer-other-window
>> sometimes splits vertically and sometimes horizontally to display the
>> other window.
>> 
>> In the documentation, there are plenty of references to "some window"
>> but little if anything about how that window is chosen/created.
>> 
>> What is the rationale behind this lack of consistency ? Or is there
>> some consistency, for ex based on the mode ?
> 
> Please see "Splitting Windows" in the ELisp manual, it describes how Emacs decides whether to split vertically or horizontally.

Do you mean this:

split-window &optional window size *side* pixelwise

It just says that the side argument affects the function, not what in pop-to-buffer causes that argument to be set. And I don't find any reference to splitting in pop-to-buffer for that matter.

-- 
Jean-Christophe Helary @brandelune
http://mac4translators.blogspot.com




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pop-to-buffer / switch-to-buffer-other-window
  2020-06-07  6:55   ` Jean-Christophe Helary
@ 2020-06-07  9:57     ` Eli Zaretskii
  2020-06-07 11:20       ` Jean-Christophe Helary
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2020-06-07  9:57 UTC (permalink / raw)
  To: emacs-devel, Jean-Christophe Helary

On June 7, 2020 9:55:12 AM GMT+03:00, Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org> wrote:
> 
> 
> > On Jun 7, 2020, at 15:18, Eli Zaretskii <eliz@gnu.org> wrote:
> > 
> > Please see "Splitting Windows" in the ELisp manual, it describes how
> Emacs decides whether to split vertically or horizontally.
> 
> Do you mean this:
> 
> split-window &optional window size *side* pixelwise
> 
> It just says that the side argument affects the function, not what in
> pop-to-buffer causes that argument to be set. And I don't find any
> reference to splitting in pop-to-buffer for that matter.

Thrn I guess you should read "Choosing Window Options".  My point is that this is described in the manual.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pop-to-buffer / switch-to-buffer-other-window
  2020-06-07  9:57     ` Eli Zaretskii
@ 2020-06-07 11:20       ` Jean-Christophe Helary
  2020-06-07 14:33         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Jean-Christophe Helary @ 2020-06-07 11:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel



> On Jun 7, 2020, at 18:57, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> On June 7, 2020 9:55:12 AM GMT+03:00, Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org> wrote:
>> 
>> 
>>> On Jun 7, 2020, at 15:18, Eli Zaretskii <eliz@gnu.org> wrote:
>>> 
>>> Please see "Splitting Windows" in the ELisp manual, it describes how
>> Emacs decides whether to split vertically or horizontally.
>> 
>> Do you mean this:
>> 
>> split-window &optional window size *side* pixelwise
>> 
>> It just says that the side argument affects the function, not what in
>> pop-to-buffer causes that argument to be set. And I don't find any
>> reference to splitting in pop-to-buffer for that matter.
> 
> Thrn I guess you should read "Choosing Window Options".  My point is that this is described in the manual.

Interesting. There is this 'split-window-sensibly function that tries to adapt to the display.

But the impression I get from reading the manuals is that there is a general preference for vertical splitting.

The issue with is that with rectangular displays and considering that most documents have a given reasonable width, choosing to split the main window vertically is rarely the best solution in terms of screen space use.

I'll try to be more careful and see in which case I see unpleasant behavior and see if I can do this about it.

Thank you.

-- 
Jean-Christophe Helary @brandelune
http://mac4translators.blogspot.com




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pop-to-buffer / switch-to-buffer-other-window
  2020-06-07 11:20       ` Jean-Christophe Helary
@ 2020-06-07 14:33         ` Eli Zaretskii
  2020-06-07 15:07           ` Jean-Christophe Helary
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2020-06-07 14:33 UTC (permalink / raw)
  To: Jean-Christophe Helary; +Cc: emacs-devel

> From: Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org>
> Date: Sun, 7 Jun 2020 20:20:56 +0900
> Cc: emacs-devel@gnu.org
> 
> But the impression I get from reading the manuals is that there is a general preference for vertical splitting.

It's just the matter of tuning the two thresholds mentioned there.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pop-to-buffer / switch-to-buffer-other-window
  2020-06-07 14:33         ` Eli Zaretskii
@ 2020-06-07 15:07           ` Jean-Christophe Helary
  0 siblings, 0 replies; 7+ messages in thread
From: Jean-Christophe Helary @ 2020-06-07 15:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel



> On Jun 7, 2020, at 23:33, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org>
>> Date: Sun, 7 Jun 2020 20:20:56 +0900
>> Cc: emacs-devel@gnu.org
>> 
>> But the impression I get from reading the manuals is that there is a general preference for vertical splitting.
> 
> It's just the matter of tuning the two thresholds mentioned there.


I can see that.

My ideal ? behavior would be to keep the main window and send anything informative on the side but anything I need to action in the front window.

So it's not really thresholds tweaking... I guess the default settings are reasonable so I'll see what I have in my copy-pasted config that interferes...

-- 
Jean-Christophe Helary @brandelune
http://mac4translators.blogspot.com




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-06-07 15:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-07  2:55 pop-to-buffer / switch-to-buffer-other-window Jean-Christophe Helary
2020-06-07  6:18 ` Eli Zaretskii
2020-06-07  6:55   ` Jean-Christophe Helary
2020-06-07  9:57     ` Eli Zaretskii
2020-06-07 11:20       ` Jean-Christophe Helary
2020-06-07 14:33         ` Eli Zaretskii
2020-06-07 15:07           ` Jean-Christophe Helary

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).