From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uday S Reddy Newsgroups: gmane.emacs.bugs Subject: bug#5314: Acknowledgement (23.1; Inconsistent treatment of auto-save files) Date: Tue, 5 Jan 2010 14:29:30 +0000 Message-ID: <19267.19658.406000.307675@gargle.gargle.HOWL> References: <84skalg9e3.fsf@cs.bham.ac.uk> Reply-To: Uday S Reddy , 5314@debbugs.gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1262735980 14492 80.91.229.12 (5 Jan 2010 23:59:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Jan 2010 23:59:40 +0000 (UTC) To: 5314@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 06 00:59:32 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NSJJ9-0008Jd-QT for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jan 2010 00:59:32 +0100 Original-Received: from localhost ([127.0.0.1]:37198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSJJ8-0000fI-OV for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Jan 2010 18:59:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSFrq-0003cq-3M for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2010 15:19:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSFrl-0003Zd-Mc for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2010 15:19:01 -0500 Original-Received: from [199.232.76.173] (port=58338 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSFrl-0003ZJ-By for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2010 15:18:57 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48499) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NSFrk-0006Dm-Fw for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2010 15:18:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NSFSk-0006hy-2f; Tue, 05 Jan 2010 14:53:06 -0500 X-Loop: bug-gnu-emacs@gnu.org Mail-Followup-To: Uday S Reddy , 5314@debbugs.gnu.org Resent-From: Uday S Reddy Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Jan 2010 19:53:06 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5314 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5314-submit@debbugs.gnu.org id=B5314.126272114425708 (code B ref 5314); Tue, 05 Jan 2010 19:53:06 +0000 Original-Received: (at 5314) by debbugs.gnu.org; 5 Jan 2010 19:52:24 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSFS3-0006ga-Bp for submit@debbugs.gnu.org; Tue, 05 Jan 2010 14:52:24 -0500 Original-Received: from sun61.bham.ac.uk ([147.188.128.150]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSAPo-0004Om-6v for 5314@debbugs.gnu.org; Tue, 05 Jan 2010 09:29:44 -0500 Original-Received: from [147.188.128.127] (helo=bham.ac.uk) by sun61.bham.ac.uk with esmtp (Exim 4.67) (envelope-from ) id 1NSAPi-0002sD-PG for 5314@debbugs.gnu.org; Tue, 05 Jan 2010 14:29:38 +0000 Original-Received: from mx1.cs.bham.ac.uk ([147.188.192.53]) by bham.ac.uk with esmtp (Exim 4.43) id 1NSAPi-0003VH-FN for 5314@debbugs.gnu.org; Tue, 05 Jan 2010 14:29:38 +0000 Original-Received: from gromit.cs.bham.ac.uk ([147.188.193.16] helo=MARUTI.cs.bham.ac.uk) by mx1.cs.bham.ac.uk with esmtp (Exim 4.51) id 1NSAPi-0007ds-Df for 5314@debbugs.gnu.org; Tue, 05 Jan 2010 14:29:38 +0000 In-Reply-To: X-Mailer: VM 8.1.0-beta under 22.3.1 (i386-mingw-nt5.1.2600) X-Spam-Score: -4.6 (----) X-Mailman-Approved-At: Tue, 05 Jan 2010 14:52:22 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -3.9 (---) Resent-Date: Tue, 05 Jan 2010 14:53:06 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Tue, 05 Jan 2010 16:26:17 -0500 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33966 Archived-At: I did some more testing of the functions after my initial report. The situation seems a lot more complex than I had imagined. With an old auto-save file on the disk, the following sequence done on a buffer seems to always return nil: (progn (insert "x") (recent-auto-save-p)) Killing the buffer in this case does not affect the old auto-save file. The following sequence seems to always return t (progn (set-buffer-modified-p t) (recent-auto-save-p)) Killing the buffer in this case deletes the old auto-save file. So, it appears that recent-auto-save-p and kill-buffer are consistent with each other. But their behaviour is paradoxical with regard to set-buffer-modified-p. Cheers, Uday ------- Uday S Reddy writes: > 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 C-s b u g C-s C-a m > q C-h i u m > 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 > > l m l a t SPC SPC u u u m e m SPC > SPC m b u g SPC SPC > > g s m > u n d e r s t SPC SPC SPC SPC > p SPC SPC n SPC n SPC SPC SPC SPC SPC SPC > SPC SPC SPC SPC SPC SPC SPC > > > M-x r e p o r t - e m a c s - b u SPC > I n c o s 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 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 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 C-g C-x b * M e SPC > C-x . M-x r e p o r t = e m a > - e m SPC SPC > > > 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 >