emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why create an auto-save file for only a text-property change?


From: Drew Adams
Subject: Why create an auto-save file for only a text-property change?
Date: Mon, 24 Jun 2013 08:18:51 -0700 (PDT)

I think this has been asked/discussed before, but it occurred to me again.

emacs -Q
Visit a file.
M-: (put-text-property 0 1 'invisible t)
C-x C-c
Emacs asks if you want to save the modified buffer.  Say no.

Start Emacs anew and open the file again.
Emacs tells you there is an auto-save file that you can recover.

1. I know that Enriched-Text mode lets you save some text properties.
But otherwise, text properties are not saved with the file.  And
auto-saving is about the saved file (for recovery); it is not really
about buffer modification.

2. I know that, in general, text-property changes modify the buffer.
But again, they are not saved, in general, which means that you cannot
recover them.  Saving the changed file, or recovering the changed file,
has no useful effect, AFAICT: the auto-save file and the original file
are identical in this case, no?

So I wonder whether *only* text-property changes (especially if you are
not in Enriched-Text mode) should really cause a recovery file to be
created.  Since text properties are not saved (in general), why should
changing only text properties affect auto-saving?  Why should we bother
users with (confusing) questions about saving and restoring, in this
context?

What is the rationale behind this behavior?  It's been there forever,
so there is perhaps a good reason for it.  If so, what is it?

(I do not want to start a long discussion about just what should or
should not be considered a buffer modification wrt auto-saving.  Just
wondering about this particular case.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]