auctex
[Top][All Lists]
Advanced

[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)))
    (cond
     ((>= (/ (window-total-width root)
             (1+ (window-combinations root t)))
          80)
      (split-window window nil 'right))
     ((and (< (window-combinations root) 2)
           (>= (/ (window-total-height root)
                  (1+ (window-combinations root)))
               20))
      (split-window window nil 'below))
     (t
      (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.

Bye,
Tassilo



reply via email to

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