[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] PDF Tools - how to start it to the right?

From: Tassilo Horn
Subject: Re: [AUCTeX] PDF Tools - how to start it to the right?
Date: Sat, 05 Dec 2015 22:01:57 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Marcin Borkowski <address@hidden> writes:

Hi Marcin,

>> (I assume that your config favors side-by-side splits in general,
>> i.e., things like `pop-to-buffer' (e.g., in terms of C-h f) split
>> that way already.)
> No, it doesn't.  Probably that's the problem.

Most definitively.  Ok, these are my settings wrt. splitting behavior.

--8<---------------cut here---------------start------------->8---
(setq window-combination-resize t
      window-combination-limit nil)

(defun th/split-window-sensibly (&optional window)
  (let ((root (frame-root-window)))
     ((>= (/ (window-total-width root)
             (1+ (window-combinations root t)))
      (split-window window nil 'right))
     ((and (< (window-combinations root) 2)
           (>= (/ (window-total-height root)
                  (1+ (window-combinations root)))
      (split-window window nil 'below))
      (let ((split-height-threshold nil))
        (split-window-sensibly window))))))

(setq split-window-preferred-function #'th/split-window-sensibly)
--8<---------------cut here---------------end--------------->8---

Basically, the idea is that Emacs should split side-by-side as long as
the resulting windows would be at least 80 columns wide after balancing.
The second cond-clause is for vertial splitting which I only want to
have if there is no horizontal split already.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]