GNU bug report logs - #76018
31.0.50; wrap-prefix properties from visual-wrap-prefix-mode proliferate

Previous Next

Package: emacs;

Reported by: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>

Date: Sun, 2 Feb 2025 17:51:02 UTC

Severity: normal

Found in version 31.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 76018 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, kevin.legouguec <at> gmail.com
Subject: bug#76018: 31.0.50; wrap-prefix properties from visual-wrap-prefix-mode proliferate
Date: Wed, 28 May 2025 10:46:03 -0400
> --- a/lisp/visual-wrap.el
> +++ b/lisp/visual-wrap.el
> @@ -165,7 +165,12 @@ visual-wrap--apply-to-line
>         position (pos-eol) 'wrap-prefix
>         (if (numberp next-line-prefix)
>             `(space :align-to (,next-line-prefix . width))
> -         next-line-prefix)))))
> +         next-line-prefix))
> +      ;; Make sure that when typing at the end of a line with
> +      ;; `wrap-prefix' set, we don't continue that property over
> +      ;; subsequent lines.  See bug#76018.
> +      (append-text-property position (pos-eol)
> +                            'rear-nonsticky '(wrap-prefix)))))

Using the `rear-nonsticky` or `front-sticky` properties is a PITA with
lots of odd corner cases, so I'd much rather we try to use the
standard approach of removing all our properties at start.

We have to write the "remove" code for the case where we turn the mode
off anyway.


        Stefan





This bug report was last modified 6 days ago.

Previous Next


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