On Wed, Oct 13 2021, Vladimir Lomov wrote: > I'm using AUCTeX with pdf-tools on two hosts. One has a FullHD monitor, the > other is connected to a 4k monitor. I faced some weird behavior of > AUCTeX+pdf-tools combination on the host with 4k monitor. On the host with > FullHD monitor a frame splits on left and right windows when I issue "View" > command, but on the 4k host frame splits into top and bottom windows, which > looks terrible as there are plenty space horizontally. > > Does AUCTeX control how a frame would be split, or is it the Emacs duty?
The factors that determine how a window is split are complex and there are several ways to influence them. From looking at the source, it seems AUCTeX doesn't do anything to influence window splitting, it simply uses the built-in function `pop-to-buffer`. > Both hosts have identical Emacs configuration and software, the only > difference is a monitor. Which means different resolutions, which is one factor that does into determining whether to split horizontally or vertically. The Elisp manual has a lot of information on splitting windows, and so does the Emacs manual: (info "(emacs) Window Choice") <== place cursor here and press C-x C-e But you can also start with the doc string of the function `split-window-sensibly`, which gives you some of the customisation options you can use to influence window splitting. (`pop-to-buffer` calls `display-buffer`, which in turn calls `split-window-sensibly`, unless the user option `split-window-preferred-function` is set.) Another thing you may want to look at is the `min-margins` window parameter. -- Joost Kremers Life has its moments
