[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do I display pdfs to the right and not below the current window?
From: |
Michael Heerdegen |
Subject: |
Re: How do I display pdfs to the right and not below the current window? |
Date: |
Sat, 02 Jan 2016 02:37:25 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Marcin Borkowski <mbork@mbork.pl> writes:
> (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)))
>
> And here are my questions:
> 1. Do I use the right variable?
> 2. Is my way of ensuring that the split will be horizontal a good one?
I think so.
> 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?
I think you would have to bind `split-window-preferred-function',
calculate the preferred size yourself and pass it directly to
`split-window-below' etc.
Michael.
- Re: How do I display pdfs to the right and not below the current window?,
Michael Heerdegen <=