unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5314: 23.1; Inconsistent treatment of auto-save files
@ 2010-01-04 15:47 Uday S Reddy
       [not found] ` <handler.5314.B.126270052714260.ack@debbugs.gnu.org>
  2010-01-05 19:28 ` bug#5314: 23.1; Inconsistent treatment of auto-save files Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: Uday S Reddy @ 2010-01-04 15:47 UTC (permalink / raw)
  To: bug-gnu-emacs; +Cc: U.S.Reddy

Hi, I am a maintainer of VM.  In trying to figure out some problems to
do with auto-save files of VM mail buffers, I discovered that the
current Emacs treatment of auto-save files is inconsistent.  Functions
involved are kill-buffer, delete-auto-save-file-if-necessary and
recent-auto-save-p.

1. If there is an old auto-save file, and you visit the file, make
some changes and kill the buffer without saving, then the old
auto-save file is silently deleted.  This seems bad, because the very
reason for killing the buffer without saving might be to compare it
with the auto-save file.  

I think the old auto-save files should always be preserved unless the
user does a recover-file.

Then there is the question of what kill-buffer should do if there is a
"recent" auto-save file (as determined by recent-auto-save-p).  It
would make sense to delete it.

2. The inline documentation for delete-auto-save-file-if-necessary
says "Normally delete only if the file was written by this Emacs since
the last real save".  This gives one the impression that Emacs is
keeping track of when the last real save was done, but in reality it
only seems to be checking the buffer-modified-p status.  If so, a more
accurate way to word the doc string might be

"Normally delete only if the file was written by this Emacs and the
buffer has been modified since the last real save."

If the buffer-modified-p is nil, then even recent auto-save files seem
to be left lying around.  This is the opposite problem of that in
point 1.

3. The inline documentation for recent-auto-save-p needs to be
modified along the same lines as point 2.

4. The Elisp manual descriptions for
delete-auto-save-file-if-necessary and 
recent-auto-save-p need to be similarly modified.

5. It would be useful to mention these issues in the documentation of
kill-buffer as well.  

Cheers,
Uday Reddy


In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
 of 2009-07-30 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  savehist-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
SPC <return> C-s b u g C-s C-a m <return> <help-echo> 
<down-mouse-2> <mouse-2> q C-h i u <up> <up> m <return> 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n m n e w SPC 
SPC SPC SPC SPC 3 SPC <return> <help-echo> <help-echo> 
<help-echo> <down-mouse-1> <mouse-1> <wheel-up> <wheel-down> 
<wheel-up> l m l a t SPC SPC <return> u u u m e m SPC 
<return> SPC m b u g SPC SPC <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> g s <return> m 
u n d e r s t SPC SPC SPC <return> SPC <backspace> 
p SPC <backspace> SPC n SPC n SPC SPC SPC SPC SPC SPC 
SPC SPC SPC SPC SPC SPC SPC <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> M-x r e p o r t - e m a c s - b u SPC <return> 
I n c o s <backspace> n s i s t e n t SPC t r e a t 
m e n t SPC o f SPC a u t o SPC s a v e SPC f i l e 
s <return> <f1> C-v C-v C-v C-x , C-n C-n C-n C-n C-p 
C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f 
C-f <return> C-p C-p C-p C-f C-f C-f C-f C-f C-b C-k 
u d r C-a C-c C-c y C-n C-n C-k C-k C-c C-c y SPC SPC 
SPC f SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC 
SPC M-x v m <return> C-g C-x b * M e SPC <return> <f1> 
C-x . <help-echo> M-x r e p o r t = e m a <backspace> 
<backspace> <backspace> <backspace> - e m SPC SPC 
<return>

Recent messages:
Generating summary... 2120
Generating summary markers... 
Generating summary... done
Decoding MIME message...
Decoding quoted-printable... done
Decoding MIME message... done
2138 messages, 0 new, 605 unread, 0 deleted
Checking for new mail for d:/Home/udr/mail/imap-cache-d0e95a10f3bde2de73bdc69e586ec456...
Quit [2 times]
Mark set







^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-17  4:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-04 15:47 bug#5314: 23.1; Inconsistent treatment of auto-save files Uday S Reddy
     [not found] ` <handler.5314.B.126270052714260.ack@debbugs.gnu.org>
2010-01-05 14:29   ` bug#5314: Acknowledgement (23.1; Inconsistent treatment of auto-save files) Uday S Reddy
2010-01-06  6:29     ` Kevin Rodgers
2010-01-06 16:08     ` Stefan Monnier
2010-01-06 16:33       ` Uday S Reddy
2016-07-17  4:29         ` Andrew Hyatt
2010-01-05 19:28 ` bug#5314: 23.1; Inconsistent treatment of auto-save files Stefan Monnier
2010-01-06  2:14   ` Uday S Reddy

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).