GNU bug report logs -
#10602
Visiting archives changes directory time
Previous Next
Reported by: Juri Linkov <juri <at> jurta.org>
Date: Wed, 25 Jan 2012 20:07:01 UTC
Severity: normal
Tags: patch, pending
Merged with 2295
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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)))
This bug report was last modified 10 years and 218 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.