all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How do I display pdfs to the right and not below the current window?
@ 2015-12-31 14:26 Marcin Borkowski
  2016-01-02  1:37 ` Michael Heerdegen
  0 siblings, 1 reply; 6+ messages in thread
From: Marcin Borkowski @ 2015-12-31 14:26 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

Hi list,

this is what I've come up with:

--8<---------------cut here---------------start------------->8---
(add-to-list 'display-buffer-alist '("\\.pdf$" . (display-buffer-pop-up-window-split-horizontally)))
(defun display-buffer-pop-up-window-split-horizontally (buffer alist)
  "Call `display-buffer-pop-up-window', setting
`split-height-threshold' and `split-width-threshold' so that
the split is always horizontal."
  (let ((split-height-threshold nil)
	(split-width-threshold 0))
    (display-buffer-pop-up-window buffer alist)))
--8<---------------cut here---------------end--------------->8---

And here are my questions:

1. Do I use the right variable?  There are quite a few places I could
stick my `display-buffer-pop-up-window-split-horizontally', I'm not sure
this is the best one.

2. Is my way of ensuring that the split will be horizontal a good one?

3. I'd also like to be able to make the newly created window a bit
narrower than half the width of the original one (or rather, ensure that
the original window is at least 80 columns wide).  How do I achieve
that?

4. Do you agree that something like this should be (at least as an
option, but preferably as the default) in Emacs core?  Stock Emacs can
display pdfs with doc-view (I use pdf-tools).  Nowadays most people have
rather wide screens, and displaying a (portrait, not landscape) pdf in
a wide but short (in a sense of height) window does not make a lot of
sense.

Of course, when items 1-3 are resolved, I'll be happy to submit
a patch.

WDYT?

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



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

end of thread, other threads:[~2016-01-04  3:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-31 14:26 How do I display pdfs to the right and not below the current window? Marcin Borkowski
2016-01-02  1:37 ` Michael Heerdegen
2016-01-02  6:39   ` Marcin Borkowski
2016-01-03  0:43     ` Michael Heerdegen
2016-01-03  7:18       ` Marcin Borkowski
2016-01-04  3:18         ` Michael Heerdegen

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.