[Top][All Lists]

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

Re: Tick Reduction

From: Lars Ingebrigtsen
Subject: Re: Tick Reduction
Date: Wed, 24 Nov 2021 12:07:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

I've now pushed the new min-width thing, but there's things here that
could be tweaked.

Basically, you can now say

(insert "|" (propertize "foo" 'display '(min-width (8.0)) 'face 'match) "|")

and then this will occupy eight normal character widths:

PNG image

Things to ponder:

1) Should the stretch have been inserted "before the foo ended", i.e.,
with that face extending to the end of the range?

1a) Perhaps :extend of the face should control that?

2) To identify a range, we need an identity, so I used `eq' on the list
containing the width spec itself.  Other identities that are possible,
for instance:

(propertize "foo" 'display '(min-width 8.0 :the-identity))

But...  what if somebody then does:

(insert (propertize "foo" 'display '(min-width 5.0 :the-identity))
        (propertize "foo" 'display '(min-width 10.0 :the-identity)))

Using the `eq' of the list is awkward, but at least it's not ambiguous.
And we need an identity, because otherwise this won't be possible:

(insert (propertize "foo" 'display '(min-width 5.0))
        (propertize "bar" 'display '(min-width 5.0)))

3) Should this stuff nest?  We could have a stack of these, but meh.

4) Probably other things.

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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