emacs-devel
[Top][All Lists]
Advanced

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

Re: master 188bd80: gnus-shorten-url: Improve and avoid args-out-of-rang


From: Stefan Monnier
Subject: Re: master 188bd80: gnus-shorten-url: Improve and avoid args-out-of-range error
Date: Tue, 14 Apr 2020 11:02:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> I don't remember past discussions, but I guess the main difficulty
> with making char-width mode accurate on GUI frames is that doing so
> requires access to the font information, something that can be slow.
> maybe we should have two separate APIs, the other one more accurate
> but also potentially slower.

I think it's worse than that: not only it can be slow but the
correct answer depends on face properties, frame properties, ...
A specific char in a specific position in a specific buffer can even
have different width at the same time if that buffer is displayed in
different frames.

AFAICT the only way to really "do it right" is to dump the work onto the
redisplay, e.g. adding the ability (e.g. via `display` properties) to
label a chunk of text as "right-align", or as "truncate to <WIDTH>", or
...


        Stefan




reply via email to

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