GNU bug report logs - #78561
[PATCH] Add semantic linefeed support for paragraph filling

Previous Next

Package: emacs;

Reported by: Roi Martin <jroi.martin <at> gmail.com>

Date: Fri, 23 May 2025 09:59:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Roi Martin <jroi.martin <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>, rms <at> gnu.org
Cc: mbork <at> mbork.pl, 78561 <at> debbugs.gnu.org
Subject: bug#78561: [PATCH] Add semantic linefeed support for paragraph filling
Date: Mon, 02 Jun 2025 15:06:16 +0200
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

> It's okay, but please make sure there are two spaces between
> sentences, not one.  There are quite a few cases in the patch where
> this is not so.

Fixed in doc strings.  The rest of cases correspond to test data where
we want to verify that `sentence-end-double-space' is respected.

> Also, the commit log message should mention the bug number.

Fixed.

RMS replied to me with a review, where he mentioned that this feature
would be more convenient if it were a minor mode.  Eli, Stefan, what do
you think?  If it makes sense, we can add it in a future patch.

Also, with regard to the paragraph:

  For more details about semantic linefeeds, see `https://sembr.org/' and
  `https://rhodesmill.org/brandon/2012/one-sentence-per-line/'."

He raised the following concern:

> This sort of information doesn't belong in an Emacs doc string.
> If some of it isimportant for using this feature right, we
> should state the point in this and other doc strings, or in
> the Emacs Manual,  That way we can propagate it and update it.

> If information is "if you'd like to know more", not necessary for peopke
> to read to know how to use the feature, then we can refer to it on a web page.
> But we need to have reason to be confident that page will exist for many
> years, serving the same purpose, in a way we would not be ashamed to link to.
> 
> Otherwise, depending on it is asking for trouble.
> 
> How much material is importaht to link to for this purpose?

As I previously said, I think it should be fine to add a short
explanation in the doc string or in the manual instead of linking with
external sites that are subject to change or be deleted in the future.

I've attached a new version of the patch.  It includes the following
changes compared to the previous version:

- Separate sentences in doc strings using two spaces.
- Add bug number to commit log message.
- Slightly reword doc strings, following a suggestion from RMS.
- Add test to check that it is possible to "revert" semlf-filling by
  refilling the paragraph, following a suggestion from RMS.

        Roi

[0001-Add-semantic-linefeed-support-for-paragraph-filling.patch (text/x-patch, attachment)]

This bug report was last modified 18 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.