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: 23.1; Inconsistent treatment of auto-save files Date: Mon, 04 Jan 2010 15:47:00 +0000 Message-ID: <84skalg9e3.fsf@cs.bham.ac.uk> Reply-To: Uday S Reddy , 5314@debbugs.gnu.org NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1262714865 7714 80.91.229.12 (5 Jan 2010 18:07:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Jan 2010 18:07:45 +0000 (UTC) Cc: U.S.Reddy@cs.bham.ac.uk To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 05 19:07:37 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 1NSDoe-0000px-Uj for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Jan 2010 19:07:37 +0100 Original-Received: from localhost ([127.0.0.1]:34218 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSDUt-0007ZY-BQ for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Jan 2010 12:47:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSAIu-0003MS-Hd for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2010 09:22:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSAIo-0003Fw-OP for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2010 09:22:35 -0500 Original-Received: from [199.232.76.173] (port=45129 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSAIo-0003Fb-BQ for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2010 09:22:30 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53612) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NSAIn-0001cp-Fr for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2010 09:22:30 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NSA5t-0003jb-5Y; Tue, 05 Jan 2010 09:09:09 -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 14:09:09 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5314 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.126270052714260 (code B ref -1); Tue, 05 Jan 2010 14:09:09 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Jan 2010 14:08:47 +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 1NSA5S-0003ht-RX for submit@debbugs.gnu.org; Tue, 05 Jan 2010 09:08:47 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NRpAJ-0002LE-GI for submit@debbugs.gnu.org; Mon, 04 Jan 2010 10:48:20 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]:38428) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NRpAE-0003va-Jp for submit@debbugs.gnu.org; Mon, 04 Jan 2010 10:48:14 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NRpAB-0000os-Sz for submit@debbugs.gnu.org; Mon, 04 Jan 2010 10:48:14 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:34929) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NRpA6-0000jI-Ay for submit@debbugs.gnu.org; Mon, 04 Jan 2010 10:48:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NRpA5-00011w-EN for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2010 10:48:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NRpA0-00010L-DZ for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2010 10:48:04 -0500 Original-Received: from [199.232.76.173] (port=46238 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRpA0-000104-2s for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2010 10:48:00 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:47698) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NRp9z-0000XV-77 for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2010 10:47:59 -0500 Original-Received: from sun60.bham.ac.uk ([147.188.128.137]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NRp9a-0007bZ-Uh for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2010 10:47:35 -0500 Original-Received: from [147.188.128.127] (helo=bham.ac.uk) by sun60.bham.ac.uk with esmtp (Exim 4.67) (envelope-from ) id 1NRp99-0001Ir-O2 for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2010 15:47:07 +0000 Original-Received: from mx1.cs.bham.ac.uk ([147.188.192.53]) by bham.ac.uk with esmtp (Exim 4.43) id 1NRp99-0006Tv-E9 for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2010 15:47:07 +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 1NRp99-0000Qg-5l; Mon, 04 Jan 2010 15:47:07 +0000 X-detected-operating-system: by mx20.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Tue, 05 Jan 2010 09:08:26 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -6.6 (------) Resent-Date: Tue, 05 Jan 2010 09:09:09 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Tue, 05 Jan 2010 12:46:28 -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:33956 Archived-At: 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