GNU bug report logs - #58082
recent whitespace-mode regression for read-only buffers

Previous Next

Package: emacs;

Reported by: Kyle Meyer <kyle <at> kyleam.com>

Date: Sun, 25 Sep 2022 23:19:02 UTC

Severity: normal

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58082 in the body.
You can then email your comments to 58082 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to rhansen <at> rhansen.org, larsi <at> gnus.org, mip <at> cs.technion.ac.il, bug-gnu-emacs <at> gnu.org:
bug#58082; Package emacs. (Sun, 25 Sep 2022 23:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kyle Meyer <kyle <at> kyleam.com>:
New bug report received and forwarded. Copy sent to rhansen <at> rhansen.org, larsi <at> gnus.org, mip <at> cs.technion.ac.il, bug-gnu-emacs <at> gnu.org. (Sun, 25 Sep 2022 23:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kyle Meyer <kyle <at> kyleam.com>
To: bug-gnu-emacs <at> gnu.org
Subject: recent whitespace-mode regression for read-only buffers
Date: Sun, 25 Sep 2022 19:17:55 -0400
Before f47a5324f44 (whitespace: Redo BoB/EoB empty line highlighting,
2022-09-11, bug#37467), this snippet runs without an issue:

  (let ((b (generate-new-buffer "ws-read-only-test")))
    (with-current-buffer b
      (insert " ")
      (setq buffer-read-only t)
      (whitespace-mode 1))
    (pop-to-buffer b))

After that commit, activating whitespace mode fails:

  whitespace--update-bob-eob: Buffer is read-only: #<buffer ws-read-only-test>

Perhaps some of the additions in f47a5324f44 should let-bind
inhibit-read-only?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58082; Package emacs. (Mon, 26 Sep 2022 10:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 58082 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kyle Meyer <kyle <at> kyleam.com>
Cc: 58082 <at> debbugs.gnu.org, mip <at> cs.technion.ac.il, rhansen <at> rhansen.org
Subject: Re: bug#58082: recent whitespace-mode regression for read-only buffers
Date: Mon, 26 Sep 2022 12:56:26 +0200
Kyle Meyer <kyle <at> kyleam.com> writes:

> Before f47a5324f44 (whitespace: Redo BoB/EoB empty line highlighting,
> 2022-09-11, bug#37467), this snippet runs without an issue:
>
>   (let ((b (generate-new-buffer "ws-read-only-test")))
>     (with-current-buffer b
>       (insert " ")
>       (setq buffer-read-only t)
>       (whitespace-mode 1))
>     (pop-to-buffer b))
>
> After that commit, activating whitespace mode fails:
>
>   whitespace--update-bob-eob: Buffer is read-only: #<buffer ws-read-only-test>
>
> Perhaps some of the additions in f47a5324f44 should let-bind
> inhibit-read-only?

Yup.  I've now done this in Emacs 29.




bug marked as fixed in version 29.1, send any further explanations to 58082 <at> debbugs.gnu.org and Kyle Meyer <kyle <at> kyleam.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 26 Sep 2022 10:57:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58082; Package emacs. (Mon, 26 Sep 2022 23:22:01 GMT) Full text and rfc822 format available.

Message #13 received at 58082 <at> debbugs.gnu.org (full text, mbox):

From: Richard Hansen <rhansen <at> rhansen.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Kyle Meyer <kyle <at> kyleam.com>
Cc: 58082 <at> debbugs.gnu.org, mip <at> cs.technion.ac.il
Subject: Re: bug#58082: recent whitespace-mode regression for read-only buffers
Date: Mon, 26 Sep 2022 19:21:50 -0400
[Message part 1 (text/plain, inline)]
Good catch Kyle, and thank you for the fix Lars.

Attached are a couple of patches that add a test case.
[0001-ert-x-Improve-realism-of-ert-with-test-buffer-select.patch (text/x-patch, attachment)]
[0002-whitespace-Add-test-case-for-read-only-buffers-bug-5.patch (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58082; Package emacs. (Tue, 27 Sep 2022 11:46:01 GMT) Full text and rfc822 format available.

Message #16 received at 58082 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Richard Hansen <rhansen <at> rhansen.org>
Cc: 58082 <at> debbugs.gnu.org, mip <at> cs.technion.ac.il, Kyle Meyer <kyle <at> kyleam.com>
Subject: Re: bug#58082: recent whitespace-mode regression for read-only buffers
Date: Tue, 27 Sep 2022 13:44:54 +0200
Richard Hansen <rhansen <at> rhansen.org> writes:

> Good catch Kyle, and thank you for the fix Lars.
>
> Attached are a couple of patches that add a test case.

Thanks; pushed to Emacs 29.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 26 Oct 2022 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 154 days ago.

Previous Next


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