[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Support paragraph-local tab stops
From: |
Yuan Fu |
Subject: |
Re: Support paragraph-local tab stops |
Date: |
Wed, 27 May 2020 12:51:06 -0400 |
> On May 27, 2020, at 12:26 PM, Eli Zaretskii <address@hidden> wrote:
>
>> From: Yuan Fu <address@hidden>
>> Date: Wed, 27 May 2020 11:48:35 -0400
>> Cc: emacs-devel <address@hidden>
>>
>>> IMO, TAB stops are not the right tool for the job here. You need to
>>> use the :align-to display property, which allows to align text with
>>> pixel granularity.
>>
>> I think both approach are equally appropriate. And the tab-based one aligns
>> more closely to word processors. If we want to gradually add WYSIWYG editor
>> features, and enable Emacs to edit rich text, this is an unavoidable feature.
>
> TABs in Emacs use columns, so their resolution is more coarse.
> Therefore, they fit this job less well, because they cannot handle
> variable-pitch fonts.
>
>> I just wrote a (very rough) proof-of-concept patch—it’s much easier than I
>> thought. With the patch you can do something like
>>
>> (put-text-property (region-beginning) (region-end)
>> 'pixel-tab-stop-list '(70 140 210 280 350 420))
>
> This is not TAB stops, this is a new text property that does the same
> job as :align-to. Why invent a new property when we already have an
> existing one that does the same?
I just thought this is how TAB should work, you know, like word processors. But
of course, if this is not reasonable, I can use :align-to.
Yuan