emacs-devel
[Top][All Lists]
Advanced

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

Re: Variable-width font indentation


From: Clément Pit-Claudel
Subject: Re: Variable-width font indentation
Date: Fri, 9 Mar 2018 14:48:33 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 2018-03-09 03:30, Eli Zaretskii wrote:
>> Cc: address@hidden, address@hidden
>> From: Clément Pit-Claudel <address@hidden>
>> Date: Thu, 8 Mar 2018 14:55:20 -0500
>>
>>> Maybe we could find a middle ground, whereby each one of the examples
>>> will approximately align.  If that can be done, and the result is
>>> acceptable, then the problem of recording the text properties in the
>>> file and/or reindenting when the file is revisited goes away.
>>
>> Maybe :)  I don't know how good it would look, in practice, but it's easy to 
>> experiment.
>> Paul's algorithm is not too bad in that sense: these two examples align 
>> pixel-perfectly.
> 
> Yes, but as I said, I don't think that approach is appropriate for
> code indentation, because leading whitespace in code blocks _must_
> always align, IMO.  IOW, that approach seems to favor alignment of
> multi-line code sequences to alignment of indented blocks, and I think
> programming modes should have the opposite preference.

Indeed :) I was mostly of the same opinion, but I find the actual results 
pretty OK.

>>> That's more relevant for text-derived modes, where indentation levels
>>> are rigid and not determined by previous lines.  There we could do a
>>> better job, I hope.
>>
>> OK.  I tend to think of indentation even in text modes as being somewhat 
>> previous-lines dependent (wrapped paragraphs align relative to bullet 
>> points, for example), but I agree that it isn't as much as in programming 
>> modes.
> 
> IME, indentation of text in word processors I use does not depend on
> previous lines at all.

Except in lists, right? For example it's not uncommon to wrap like this:

* Some long text here
  that wraps around:

  i.   Point 1
       … continued
  ii.  Point 2
       … continued
  iii. Point 3
       … continued

Clément



reply via email to

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