From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#10602: Visiting archives changes directory time Date: Wed, 25 Jan 2012 22:03:52 +0200 Organization: JURTA Message-ID: <87wr8fzh06.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1327522004 20039 80.91.229.12 (25 Jan 2012 20:06:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Jan 2012 20:06:44 +0000 (UTC) To: 10602@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 25 21:06:40 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rq978-0005kz-Sl for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jan 2012 21:06:39 +0100 Original-Received: from localhost ([::1]:46565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq978-0001BL-At for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jan 2012 15:06:38 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:52995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq975-00019A-8Z for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2012 15:06:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rq974-0001WC-50 for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2012 15:06:35 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq974-0001W8-3J for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2012 15:06:34 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rq97V-0005JO-Nu for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2012 15:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jan 2012 20:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10602 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.132752198720373 (code B ref -1); Wed, 25 Jan 2012 20:07:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Jan 2012 20:06:27 +0000 Original-Received: from localhost ([127.0.0.1]:43887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rq96t-0005IT-Hf for submit@debbugs.gnu.org; Wed, 25 Jan 2012 15:06:26 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:50756) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rq96o-0005IE-HX for submit@debbugs.gnu.org; Wed, 25 Jan 2012 15:06:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rq96F-0001PZ-F9 for submit@debbugs.gnu.org; Wed, 25 Jan 2012 15:05:45 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:39712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq96F-0001PV-Dh for submit@debbugs.gnu.org; Wed, 25 Jan 2012 15:05:43 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:52789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq96E-0000BR-DQ for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2012 15:05:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rq96C-0001P7-Rd for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2012 15:05:42 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:53237 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq96C-0001P3-ME for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2012 15:05:40 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 5FB61451C68B for ; Wed, 25 Jan 2012 12:04:33 -0800 (PST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:56004 Archived-At: Using archive-mode or tar-mode to visit archives touches directory modification dates. This is especially annoying when archives are located in backup directories. The problem is in the function `insert' that temporarily modifies the archive summary buffer causing lock-file to create a lock file in the current directory that modifies the directory timestamp. A similar bug#2295 was fixed by let-binding `buffer-file-truename' to nil to prevent directory time modification in `lock_file'. This is not a regression, so I propose to install in 24.2 something like === modified file 'lisp/arc-mode.el' --- lisp/arc-mode.el 2012-01-19 07:21:25 +0000 +++ lisp/arc-mode.el 2012-01-25 19:54:01 +0000 @@ -783,7 +784,8 @@ (defun archive-summarize (&optional shut Optional argument SHUT-UP, if non-nil, means don't print messages when parsing the archive." (widen) - (let ((inhibit-read-only t)) + (let ((buffer-file-truename nil) ; avoid changing dir mtime by lock_file + (inhibit-read-only t)) (setq archive-proper-file-start (copy-marker (point-min) t)) (set (make-local-variable 'change-major-mode-hook) 'archive-desummarize) (or shut-up === modified file 'lisp/tar-mode.el' --- lisp/tar-mode.el 2012-01-19 07:21:25 +0000 +++ lisp/tar-mode.el 2012-01-25 19:54:01 +0000 @@ -520,12 +520,13 @@ (defun tar-summarize-buffer () (progress-reporter-done progress-reporter) (message "Warning: premature EOF parsing tar file")) (goto-char (point-min)) - (let ((inhibit-read-only t) + (let ((buffer-file-truename nil) ; avoid changing dir mtime by lock_file + (inhibit-read-only t) (total-summaries (mapconcat 'tar-header-block-summarize tar-parse-info "\n"))) - (insert total-summaries "\n")) + (insert total-summaries "\n") (goto-char (point-min)) - (restore-buffer-modified-p modified))) + (restore-buffer-modified-p modified)))) (defvar tar-mode-map (let ((map (make-keymap)))