Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.emacs > #2510

Re: Sharing my split-window-preferred-function that splits at (pixel-wise) longer window-edge

From Mekeor Melire <mekeor@posteo.de>
Newsgroups comp.emacs
Subject Re: Sharing my split-window-preferred-function that splits at (pixel-wise) longer window-edge
Date 2025-12-19 11:10 +0100
Organization MB-NET.NET for Open-News-Network e.V.
Message-ID <87ldiyu6hp.fsf@posteo.de> (permalink)
References <871pmjqaxq.fsf@posteo.de> <87ecosvs05.fsf@gmail.com>

Show all headers | View raw


2025-12-17 19:16 aidan.hall202@gmail.com:

> I like the general idea of splitting based on pixel widths, since it
> makes the logic independent of a given window's text scale. One issue
> with this function is that it doesn't account for characters generally
> being taller than they are wide.
>
> You could do something similar using "scale independent window
> width/height in characters", computed like so:
>
> (/ (window-pixel-width) (frame-char-width))
>
> Both your approach and this degrade (somewhat) gracefully to character
> counts in terminal frames, where:
> (window-pixel-width) = (window-width)
> (frame-char-width) = 1

Oh, right. That's a nice idea too! Thanks for sharing :)

Back to comp.emacs | Previous | NextPrevious in thread | Find similar


Thread

Sharing my split-window-preferred-function that splits at (pixel-wise) longer window-edge Mekeor Melire <mekeor@posteo.de> - 2025-10-31 17:43 +0100
  Re: Sharing my split-window-preferred-function that splits at (pixel-wise) longer window-edge Aidan Hall <aidan.hall202@gmail.com> - 2025-12-17 19:16 +0000
    Re: Sharing my split-window-preferred-function that splits at (pixel-wise) longer window-edge Mekeor Melire <mekeor@posteo.de> - 2025-12-19 11:10 +0100

csiph-web