From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Calderon Newsgroups: gmane.emacs.bugs Subject: bug#20659: auto-save-visited-file-name: leaks interlock files and abandons unsaved buffers Date: Tue, 26 May 2015 01:38:54 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1432621399 29290 80.91.229.3 (26 May 2015 06:23:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 May 2015 06:23:19 +0000 (UTC) To: 20659@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 26 08:23:10 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yx8Ga-0000oF-HI for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 May 2015 08:23:08 +0200 Original-Received: from localhost ([::1]:46113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx8GZ-0001cx-A3 for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 May 2015 02:23:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx8GV-0001ce-Ge for bug-gnu-emacs@gnu.org; Tue, 26 May 2015 02:23:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx8GU-0004oA-H1 for bug-gnu-emacs@gnu.org; Tue, 26 May 2015 02:23:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx8GU-0004o6-Ch for bug-gnu-emacs@gnu.org; Tue, 26 May 2015 02:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yx8GU-0004Er-3M for bug-gnu-emacs@gnu.org; Tue, 26 May 2015 02:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas Calderon Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 May 2015 06:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.143262137216271 (code B ref -1); Tue, 26 May 2015 06:23:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 May 2015 06:22:52 +0000 Original-Received: from localhost ([127.0.0.1]:56173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yx8GJ-0004EM-VH for submit@debbugs.gnu.org; Tue, 26 May 2015 02:22:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51632) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yx7aF-0001lh-Qz for submit@debbugs.gnu.org; Tue, 26 May 2015 01:39:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx7a9-0007rK-Po for submit@debbugs.gnu.org; Tue, 26 May 2015 01:39:18 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:55274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx7a9-0007rG-MX for submit@debbugs.gnu.org; Tue, 26 May 2015 01:39:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx7a8-0004fJ-Id for bug-gnu-emacs@gnu.org; Tue, 26 May 2015 01:39:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx7a7-0007qv-Dp for bug-gnu-emacs@gnu.org; Tue, 26 May 2015 01:39:16 -0400 Original-Received: from mail-ob0-x235.google.com ([2607:f8b0:4003:c01::235]:34570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx7a7-0007qn-9N for bug-gnu-emacs@gnu.org; Tue, 26 May 2015 01:39:15 -0400 Original-Received: by obew15 with SMTP id w15so4902498obe.1 for ; Mon, 25 May 2015 22:39:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=NbifsTpBQ2owzfPKwR/s/YsMEgOb+9HwdtC+wFiFpKA=; b=Xj/+0juC9DQZDwe3kw6RT23BL4oQa8TuFc8P2f/RFi0hhY6gthIU4b4J2dil3Rtg5h +nAekDEEIcIqK1LKjL5YvMUG3tx5qg2YU3Cw+00GIVBbJiSSTIGL9vJ3Ze8UTsi2UKkf 5UYbhcJEuL9k48ndugVboxIuWc58SWLOuctA2TD696eMYwUcUWft6uKpd1IOgYaASTDd d+O4wPYXO+SIqRXsRkF+6pxiYcDIML0NdWYEj2GSxJCIRs9sGQoEor9vw9eIPTY/Cpv2 pwdf/4CrLE7aQ3C1kQdmxGK1BZ33E7AaNpxNB3rcD/D0xtGUNZF0TcKVOOu28frBZdnJ kq9g== X-Received: by 10.202.192.7 with SMTP id q7mr18984033oif.85.1432618754431; Mon, 25 May 2015 22:39:14 -0700 (PDT) Original-Received: by 10.202.196.14 with HTTP; Mon, 25 May 2015 22:38:54 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Tue, 26 May 2015 02:22:49 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:103176 Archived-At: Hi, When auto-save-visited-file-name is set, emacs auto-saves directly to file rather than a different file (##). Unfortunately, auto-saving does not get rid of the interlock file (symlink from .# -> @.:). Since the buffer is saved and not modified (buffer-modified-p is false, as evidenced by the modline), emacs can be exited without the "Save file?" prompt. Leaving emacs at this point, without making a proper save (save-buffer), leaves the interlock files behind modifications directly to the file rather than auto-saving. While looking at that, I noticed something a bit more "dangerous". Normally, auto-save-visited-file-name is only enabled upon restarting auto-save-mode (http://www.gnu.org/software/emacs/manual/html_node/elisp/Auto_002dSaving.html), and indeed, if auto-save-visited-file-name is set and auto-save-mode, emacs keeps saving auto-saves under ## and not directly to file. After an auto-save though, the file is marked as not modified (buffer_modified-p is false). At this point, if the user leaves emacs, their file is not saved and the user is not prompted for saving!!! The content of the file can still be recovered from the auto-save file. -- Nicolas Calderon Asselin