unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
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	[thread overview]
Message-ID: <877fjs92y2.fsf@web.de> (raw)
In-Reply-To: <871ta28zj3.fsf@mbork.pl> (Marcin Borkowski's message of "Thu, 31 Dec 2015 15:26:40 +0100")

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.



  reply	other threads:[~2016-01-02  1:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=877fjs92y2.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mbork@mbork.pl \
    /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).