emacs-devel
[Top][All Lists]
Advanced

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

Re: GNU ELPA package proposal: visual-fill-column


From: Joost Kremers
Subject: Re: GNU ELPA package proposal: visual-fill-column
Date: Tue, 26 Oct 2021 19:10:04 +0200
User-agent: mu4e 1.6.6; emacs 27.2.50

On Tue, Oct 26 2021, Eli Zaretskii wrote:
>> From: Daniel Martín <mardani29@yahoo.es>
>> The functionality it offers is not the same.  I believe this proposed
>> visual-fill-column package is like visual-line-mode, but where the word
>> wrap position is not the window edge, but the fill-column position.

Yes, though it should be noted that it extends visual-line-mode, it does not
replace it. What visual-fill-column does, essentially, is widen the margin so
that the text area is narrowed. And it does its best to make sure that the right
thing happens when the window width changes.

>> If there is interest in the functionality it offers, it may make sense
>> to see if it can be implemented in C, as an extension of either
>> visual-line-mode or display-fill-column-indicator-mode.
>
> The former, obviously.  yes, I think implementing this in display code
> is the way to go.

To be honest, I always thought that made more sense, as well. But since that is
clearly beyond my abilities, I decided to write it in Lisp. And although I think
it works fairly well, it's not without its problems and limitations.

One limitation in particular comes to mind, which can perhaps be lifted in a C
implementation: since `visual-fill-column` achieves its effect by narrowing the
margin, it is not possible to disable word wrap for specific parts of the
buffer. That would be very practical in some cases, however, for example in Org
tables, which normally shouldn't be wrapped.

As to whether there is interest in this functionality: `visual-fill-column` has
about 380.000 downloads on Melpa. Nothing like dash or magit, obviously, but
still. Admittedly, most of these probably result from the fact that
`visual-fill-column` is a dependency of another package of mine,
`writeroom-mode`, which has about 315.000 downloads. But `writeroom-mode` would
probably also benefit from a C implementation of the functionality offered by
`visual-fill-column`.


-- 
Joost Kremers
Life has its moments



reply via email to

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