From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: Re: changed on disk; really edit the buffer? Date: Tue, 13 Nov 2007 15:14:07 +0100 Message-ID: <4739B12F.7000400@gmx.at> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1194963200 2644 80.91.229.12 (13 Nov 2007 14:13:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Nov 2007 14:13:20 +0000 (UTC) Cc: Bug-Gnu-Emacs To: Stephan Lukits Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 13 15:13:22 2007 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 1IrwVg-0002Ai-6e for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Nov 2007 15:13:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrwVT-0001aX-NZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Nov 2007 09:12:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrwVO-0001a9-7G for bug-gnu-emacs@gnu.org; Tue, 13 Nov 2007 09:12:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrwVM-0001Zv-L8 for bug-gnu-emacs@gnu.org; Tue, 13 Nov 2007 09:12:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrwVM-0001Zs-Ht for bug-gnu-emacs@gnu.org; Tue, 13 Nov 2007 09:12:40 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IrwVL-0005Hh-Nf for bug-gnu-emacs@gnu.org; Tue, 13 Nov 2007 09:12:39 -0500 Original-Received: (qmail invoked by alias); 13 Nov 2007 14:12:37 -0000 Original-Received: from N925P001.adsl.highway.telekom.at (EHLO [62.47.59.129]) [62.47.59.129] by mail.gmx.net (mp003) with SMTP; 13 Nov 2007 15:12:37 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+rvP4SeJqrOFUJ5FQDw95wD44KUK9qjVir3K6eOz KZgdSZGbMcM5L9 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:16966 Archived-At: > Yes. After setting it to nil the problem is gone. > I'm sorry for all the trouble. I can't remember > having this option set but it was changed. You helped us to identify a bug. Thanks. We could, in auto_save_1, do something like if (! NILP (Fstring_equal (current_buffer->filename, current_buffer->auto_save_file_name))) Fclear_visited_file_modtime; if the Fwrite_region succeeds, but I'm not sure of any implications of this. For example, current_buffer->save_length would not get set in Fwrite_region. Alternatively, we could try to simply save the buffer which is the behavior described in the Elisp manual but this might be more tricky. > If this behavior is reasonable or if this setting > is an end user setting is another question. If this > setting is set I wouldn't expect Emacs to complain > about a changed file which was changed by Emacs. Indeed. Given the fact that apparently you are the first to report this bug it seems that the option `auto-save-visited-file-name' is hardly ever useful (at least nowadays). The most attractive solution would be to get rid of it.