From: Tassilo Horn <tsdh@gnu.org>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Dedicated window troubles
Date: Thu, 19 Feb 2015 11:06:45 +0100 [thread overview]
Message-ID: <87lhjujjuy.fsf@gnu.org> (raw)
Hi all,
I have a wide screen, so I use
(setq split-width-threshold 152
split-height-threshold nil)
so that Emacs favors splitting horizontally so that I end up with two
side-by-side windows. That works ok, but I run into troubles when I
decide to make one of the side-by-side windows dedicated to its buffer.
For example, now I have a buffer for editing a latex document shown in
the left window, and the right window displays the resulting PDF file
and is dedicated to that buffer.
+------------------------------+---------------------------------+
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| latex-file | PDF <dedicated> |
+------------------------------+---------------------------------+
What I'd like to have now when doing, e.g., `C-h f defun RET' is that
the left window is split vertically, and the *Help* buffer is now shown
in the new, lower-left window. What actually happens is that the left
window's buffer switches to *Help*.
That might be reasonable but other functions exhibit even stranger
behavior:
(switch-to-buffer-other-window "*Help*") ;; Pops up a new *frame*
(pop-to-buffer "*Help*") ;; Swiches buffer in the current window
Especially that `switch-to-buffer-other-window' pops up a new frame (and
I have `pop-up-frames' set to nil) is really annoying. And I'd usually
expect from `pop-to-buffer' that it creates a new window if there's
enough space (and here the left window is more than 80 lines tall) but
it doesn't.
I think the reason for that inconvenience is that by setting
`split-height-threshold' to nil, I have effectively forbidden
`split-window-sensibly' to perform a vertical split in case there are
more than one window. Well, that's properly documented, but what
configuration am I supposed to use so that Emacs prefers horizontal
splits if the window to be split is wide enough and falls back to
vertical splitting otherwise?
Currently, the only way I see is to have my own
`split-window-preferred-function' which is exactly like
`split-window-sensibly' but tries horizontal splits first, then vertical
splits, and then the fallback case. Then I could go with
`split-width-threshold' set to 152 as its now and
`split-height-threshold' set to something like 60 or so.
But since wide displays are so common nowadays, there must be an easy
way to achieve what I'm looking for, no?
Bye,
Tassilo
next reply other threads:[~2015-02-19 10:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 10:06 Tassilo Horn [this message]
2015-02-19 12:35 ` Dedicated window troubles Alexis
2015-02-19 13:26 ` Tassilo Horn
2015-02-19 13:32 ` Tassilo Horn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lhjujjuy.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).