From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: auto-save-visited-file-name Date: 15 Oct 2003 23:20:55 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1066253119 26253 80.91.224.253 (15 Oct 2003 21:25:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2003 21:25:19 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Oct 15 23:25:16 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A9t8u-0000sg-00 for ; Wed, 15 Oct 2003 23:25:16 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A9t8t-0002bP-00 for ; Wed, 15 Oct 2003 23:25:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9t5X-0000IE-Kg for emacs-devel@quimby.gnus.org; Wed, 15 Oct 2003 17:21:47 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A9t5T-0000Fp-Cp for emacs-devel@gnu.org; Wed, 15 Oct 2003 17:21:43 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A9t4x-0008CD-Cw for emacs-devel@gnu.org; Wed, 15 Oct 2003 17:21:42 -0400 Original-Received: from [193.162.153.2] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9t4w-0008C9-Sv for emacs-devel@gnu.org; Wed, 15 Oct 2003 17:21:11 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id D07DA47FF14; Wed, 15 Oct 2003 23:21:07 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: Original-Lines: 49 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17127 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17127 Stefan Monnier writes: > Has anyone ever tried to use this variable ? Not me. Is this a new option? >=20 > It has some really nasty effects. Let's see a session: >=20 > % emacs -q --no-site-file > M-: (setq auto-save-visited-file-name t) > C-x C-f ~/tmp/foo.txt RET > type in some text with =C3=A9 or =C3=A0 > C-x C-s > # Now foo.txt has size 30, for instance, using latin-1. > SPC DEL > # Wait until the buffer is auto-saved. > # BUG-1: Now foo.txt has size 32, using emacs-mule encoding. > C-x C-s > # BUG-2: Emacs prompts because the file was "changed since saved". > # let's not save, but kill the buffer instead. > C-g > C-x k RET > # BUG-3: foo.txt does not exist any more because Emacs thought it > # was the auto-save file and should thus be removed. >=20 > I think we need to do something. > Maybe fix the above bugs, which might uglify a good bit of the code. Re. bug 1, I haven't a clue. .. but doesn't that mean that auto-save files are always saved=20 in emacs-mule rather than the current coding of the buffer? That sounds like a more generic error that needs fixing anyway. Re. bug 2, checking the varibale in basic-save-buffer seems to be=20 trivial. Re. bug 3, checking the variable in delete-auto-save-file-if-necessary seems to be trivial too. > Or maybe remove the option instead. > Or at least make it into a `defvar' rather than `defcustom'. I think we should try to fix it... --=20 Kim F. Storm http://www.cua.dk