emacs-devel
[Top][All Lists]
Advanced

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

Re: Support paragraph-local tab stops


From: Eli Zaretskii
Subject: Re: Support paragraph-local tab stops
Date: Wed, 27 May 2020 19:26:35 +0300

> 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?



reply via email to

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