GNU bug report logs - #60066
30.0.50; whitespace-mode modifies buffer

Previous Next

Package: emacs;

Reported by: Bastian Beranek <bastian.beischer <at> gmail.com>

Date: Wed, 14 Dec 2022 14:27:01 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

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

Bug is archived. No further changes may be made.

Full log


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

From: Bastian Beranek <bastian.beischer <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 60066 <at> debbugs.gnu.org, Richard Hansen <rhansen <at> rhansen.org>
Subject: Re: bug#60066: 30.0.50; whitespace-mode modifies buffer
Date: Wed, 14 Dec 2022 17:53:54 +0100
On Wed, Dec 14, 2022 at 5:15 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Bastian Beranek <bastian.beischer <at> gmail.com>
> > Date: Wed, 14 Dec 2022 15:26:03 +0100
> >
> >
> > I have
> >
> > (add-hook 'c-mode-common-hook 'whitespace-mode)
> >
> > in my .emacs and I am using emacs master (which includes
> > whitespace.el). When opening a source file in my project the buffer
> > immediately is marked as modified and emacs will ask to save the buffer
> > when trying to kill it.
> >
> > I was able to trace this back to the above line in my .emacs. If I don't
> > enable whitespace-mode in the hook the buffer is not marked as modified
> > when opening the .C file.
> >
> > With my configuration I would not expect whitespace-mode to make any
> > changes to the buffer.
> >
> > I went back to whitespace.el from commit
> >
> > 29eb4596956a74a83ceb4c17835886a23ea0dd20
> >
> > and the problem is fixed. So I assume it is a recent regression in
> > whitespace.el.
>
> Richard, could you please look into this?  It sounds like your recent
> changes to whitespace.el could be the culprit for this regression.  I
> guess something like with-silent-modifications is missing somewhere?

It might be worth pointing out that there are no actual differences
between the buffer and its on-disk counterpart, but still emacs
considers the buffer to be modified, as if a change was made and
reverted (but not through undo).




This bug report was last modified 2 years and 148 days ago.

Previous Next


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