unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Joost Kremers <joostkremers@fastmail.fm>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org, "Daniel Martín" <mardani29@yahoo.es>
Subject: Re: GNU ELPA package proposal: visual-fill-column
Date: Tue, 26 Oct 2021 19:10:04 +0200	[thread overview]
Message-ID: <87mtmv65f2.fsf@fastmail.fm> (raw)
In-Reply-To: <83v91jyiop.fsf@gnu.org>


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	other threads:[~2021-10-26 17:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26  8:38 GNU ELPA package proposal: visual-fill-column Joost Kremers
2021-10-26 13:06 ` Eli Zaretskii
2021-10-26 13:46   ` Michael Heerdegen
2021-10-26 13:47   ` Daniel Martín
2021-10-26 14:17     ` Eli Zaretskii
2021-10-26 17:10       ` Joost Kremers [this message]
2021-10-26 14:50 ` Stefan Monnier
2021-10-26 15:17   ` Stefan Kangas
2021-10-26 15:20     ` Stefan Monnier
2021-10-26 15:29       ` Stefan Kangas
2021-10-26 19:03       ` Philip Kaludercic
2021-11-01 20:27 ` Philip Kaludercic
2021-11-01 21:35   ` Stefan Monnier
2021-11-01 23:39     ` Philip Kaludercic
2021-11-02  2:03       ` Stefan Monnier
2021-11-02 20:52         ` Joost Kremers
2021-11-01 22:23   ` Daniel Martín

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtmv65f2.fsf@fastmail.fm \
    --to=joostkremers@fastmail.fm \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mardani29@yahoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).