Marcin Borkowski <[email protected]> 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

_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to