[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to make Emacs popular again: Use monospaced fonts less
From: |
Lars Ingebrigtsen |
Subject: |
Re: How to make Emacs popular again: Use monospaced fonts less |
Date: |
Mon, 12 Oct 2020 00:21:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> This reminds me, by the way... I forget if this has been discussed
>> before or not, but in these cases it'd be handy to have a text property
>> like, say, (propertize "foo" :min-width 5) (or :min-width (50)), and
>> have the display engine compute how much space to add to the end.
>>
>> Would that be much work to add?
>
> Let's put it this way: if there's a simple way of adding this, I
> cannot think of it.
Yeah, the semantics of text properties aren't very well-defined,
either. I mean, if you have "foo" in the buffer with a :min-width (50)
text property, and then you insert a space in the middle (without any
properties), then both "fo" and "o" would have a separate :min-width
(50) stretch, so presumably would both be that wide.
So that's kinda a mess.
> Btw, if there were such a property, how would you calculate the value
> to put there?
It depends -- for instance, when calculating tabular layouts, I'd know
the number of pixels already. In the mode line, I'd take 5x
typical-character-width if I wanted to display something that should
typically not take more than 5 characters.
Which is what we do in the mode line already for some of the things that
change lengths, like the line numbers.
OK, here's another random idea for padding variable-pitch elements in
the mode lines in particular:
(setq mode-line-thing
`(:propertize
"some-string"
:min-width 15))
which could have well-defined semantics, like "this element should have
the width of at least 15 typical characters", and be pretty easy to use?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- Re: How to make Emacs popular again., (continued)
- Re: How to make Emacs popular again., Eli Zaretskii, 2020/10/04
- Re: How to make Emacs popular again., Richard Stallman, 2020/10/04
- Re: How to make Emacs popular again., Richard Stallman, 2020/10/09
- Re: How to make Emacs popular again: Use monospaced fonts less, Lars Ingebrigtsen, 2020/10/11
- Re: How to make Emacs popular again: Use monospaced fonts less, Eli Zaretskii, 2020/10/11
- Re: How to make Emacs popular again: Use monospaced fonts less, Lars Ingebrigtsen, 2020/10/11
- Re: How to make Emacs popular again: Use monospaced fonts less, Eli Zaretskii, 2020/10/11
- Re: How to make Emacs popular again: Use monospaced fonts less, Lars Ingebrigtsen, 2020/10/11
- Re: How to make Emacs popular again: Use monospaced fonts less, Lars Ingebrigtsen, 2020/10/11
- Re: How to make Emacs popular again: Use monospaced fonts less, Eli Zaretskii, 2020/10/11
- Re: How to make Emacs popular again: Use monospaced fonts less,
Lars Ingebrigtsen <=
- Re: How to make Emacs popular again: Use monospaced fonts less, Eli Zaretskii, 2020/10/12
- Re: How to make Emacs popular again: Use monospaced fonts less, Lars Ingebrigtsen, 2020/10/12
- Re: How to make Emacs popular again: Use monospaced fonts less, Eli Zaretskii, 2020/10/13
- Re: How to make Emacs popular again: Use monospaced fonts less, Lars Ingebrigtsen, 2020/10/14
- Re: How to make Emacs popular again: Use monospaced fonts less, Eli Zaretskii, 2020/10/14
- Re: How to make Emacs popular again: Use monospaced fonts less, Stefan Monnier, 2020/10/14
- Re: How to make Emacs popular again: Use monospaced fonts less, Eli Zaretskii, 2020/10/14
- Re: How to make Emacs popular again: Use monospaced fonts less, Stefan Monnier, 2020/10/14
- Re: How to make Emacs popular again: Use monospaced fonts less, Eli Zaretskii, 2020/10/15
- Re: How to make Emacs popular again: Use monospaced fonts less, Stefan Monnier, 2020/10/15