[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Variable-width font indentation (was: What improvements would be tru
From: |
dancol |
Subject: |
Re: Variable-width font indentation (was: What improvements would be truly useful?) |
Date: |
Mon, 5 Mar 2018 11:32:30 -0800 |
User-agent: |
SquirrelMail/1.4.23 [SVN] |
>> From: Richard Stallman <address@hidden>
>> Date: Mon, 05 Mar 2018 08:11:38 -0500
>> Cc: address@hidden, address@hidden, address@hidden
>>
>> Changing Emacs to handle indentation and alignment with
>> variable-width fonts would be an important and useful change.
>> Certain kinds of use would make sense, which currently don't.
>
> This has come up several times, and I think I asked at least once what
> does it need to entail. It would be helpful to have the answer to
> that, which will have to be the result of looking at the relevant Lisp
> code and figuring out which primitives/subroutines will need to be
> taught fractional column values.
>
> Emacs already knows how to align text at pixel resolution (which is
> easy to express in fractions of the width of the default face's font),
> and in fact already does so when it displays TAB characters on GUI
> frames. We have the 'space' display property to do the same with
> characters other than a TAB.
>
> So what else is needed? Can someone who is familiar with indent.el
> please tell?
Well, say you want to align the following code:
1: void foo(int a,
2: int b)
3: {
4: ...
How is any generic indentation system supposed to know that the "i" on
line 2 is supposed to line up with the "i" on line 1? You'd need to
communicate all indentation intent to the generic system in the form of
positions relative to some anchor. (Presumably, it could cache pixel
offsets per-line.) While that's doable, it's a ton of work, and I don't
think it's worthwhile.
- Re: What improvements would be truly useful?, (continued)
- Re: What improvements would be truly useful?, Richard Stallman, 2018/03/05
- Re: What improvements would be truly useful?, Phillip Lord, 2018/03/09
- Re: What improvements would be truly useful?, Richard Stallman, 2018/03/09
- Re: What improvements would be truly useful?, Phillip Lord, 2018/03/10
- Re: What improvements would be truly useful?, Richard Stallman, 2018/03/11
- Re: Variable-width font indentation (was: What improvements would be truly useful?), Eli Zaretskii, 2018/03/05
- Re: Variable-width font indentation (was: What improvements would be truly useful?),
dancol <=
- Re: Variable-width font indentation, Paul Eggert, 2018/03/05
- Re: Variable-width font indentation, Dmitry Gutov, 2018/03/06
- Re: Variable-width font indentation, Clément Pit-Claudel, 2018/03/06
- Re: Variable-width font indentation, Eli Zaretskii, 2018/03/06
- Re: Variable-width font indentation (was: What improvements would be truly useful?), Eli Zaretskii, 2018/03/05
- Re: Variable-width font indentation, Clément Pit-Claudel, 2018/03/05
- Re: Variable-width font indentation, Paul Eggert, 2018/03/05
- Re: Variable-width font indentation, Daniel Colascione, 2018/03/05
- Re: Variable-width font indentation, Clément Pit-Claudel, 2018/03/05
- Re: Variable-width font indentation, Paul Eggert, 2018/03/05