GNU bug report logs -
#11303
Whitespace mode causes auto-save to malfunction
Previous Next
Reported by: Kelly Dean <kellydeanch <at> yahoo.com>
Date: Sat, 21 Apr 2012 17:50:02 UTC
Severity: normal
Tags: confirmed
Found in version 26.1
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Kelly Dean <kellydeanch <at> yahoo.com> writes:
> Start Emacs with no options.
> Open a file, press space, wait for the timeout, press C-g, and wait
> for the timeout again. Notice that Emacs does write the auto-save file
> again, even though the buffer hasn't changed since the last
> auto-save. This is not the correct behavior.
This problem is still present in Emacs 28.
Poking around a bit at this, it seems that it's the call to
(jit-lock-refontify (point-min) (point-max))
that makes `M-x do-auto-save' auto-save again (even if nothing has
changed except the text properties in the buffer).
I.e., doing
(put-text-property 1 3 'face 'bold)
will make the buffer eligible for auto-saving again, even if putting
those text properties into the buffer doesn't switch from unmodified to
modified.
That's pretty inconsistent behaviour, at least? I'm guessing this stems
from text properties upping the BUF_MODIFF, but not changing the buffer
modification status.
Does this sound like the correct analysis? If so, what can we do about
it? (`with-silent-modifications' doesn't seem to have any effect here.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 12 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.