]> git.eshelyaron.com Git - emacs.git/commitdiff
* autorevert.el (auto-revert-handler): Allow
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 2 Aug 2009 17:21:16 +0000 (17:21 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 2 Aug 2009 17:21:16 +0000 (17:21 +0000)
`auto-revert-tail-mode' for remote files.

lisp/ChangeLog
lisp/autorevert.el

index ea810df92f7d780d4000303a8939ba6f5a36f1fb..5e7debbd7ad1e5e2eac6484d80e683d1dd0ded42 100644 (file)
@@ -1,3 +1,21 @@
+2009-08-02  Julian Scheid <julians37@googlemail.com>  (tiny change)
+
+       * net/tramp.el (tramp-debug-message): Print also microseconds.
+
+2009-08-02  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-handle-insert-file-contents): Optimize, when BEG
+       or END is non-nil.
+       (tramp-handle-vc-registered): Use `tramp-cache-inhibit-cache'.
+       (tramp-get-debug-buffer): Change `outline-regexp' according to new
+       format.
+
+       * net/tramp-cache.el (tramp-cache-inhibit-cache ): New defvar.
+       (tramp-get-file-property): Use it.
+
+       * autorevert.el (auto-revert-handler): Allow
+       `auto-revert-tail-mode' for remote files.
+
 2009-08-02  Jason Rumney  <jasonr@gnu.org>
 
        * minibuffer.el (read-file-name): Treat confirm options to
index ab133af00f132c1dd2d751c041a33207bd8dd05a..81d9fbf55c079279effcc184358f5096c6e8dc85 100644 (file)
@@ -66,6 +66,7 @@
 ;; change by growing at the end.  It only appends the new output,
 ;; instead of reverting the entire buffer.  It does so even if the
 ;; buffer contains unsaved changes.  (Because they will not be lost.)
+;; Auto Revert Tail Mode works also for remote files.
 
 ;; Usage:
 ;;
@@ -432,13 +433,18 @@ This is an internal function used by Auto-Revert Mode."
     (let* ((buffer (current-buffer)) size
           (revert
            (or (and buffer-file-name
-                    (not (file-remote-p buffer-file-name))
                     (file-readable-p buffer-file-name)
                     (if auto-revert-tail-mode
-                        (/= auto-revert-tail-pos
-                           (setq size
-                                 (nth 7 (file-attributes buffer-file-name))))
-                      (not (verify-visited-file-modtime buffer))))
+                        ;; Tramp caches the file attributes.  Setting
+                        ;; `tramp-cache-inhibit' forces Tramp to
+                        ;; reread the values.
+                        (let ((tramp-cache-inhibit-cache t))
+                          (/= auto-revert-tail-pos
+                              (setq size
+                                    (nth 7 (file-attributes
+                                            buffer-file-name)))))
+                      (and (not (file-remote-p buffer-file-name))
+                           (not (verify-visited-file-modtime buffer)))))
                (and (or auto-revert-mode
                         global-auto-revert-non-file-buffers)
                     revert-buffer-function
@@ -477,7 +483,7 @@ This is an internal function used by Auto-Revert Mode."
       (when (or revert auto-revert-check-vc-info)
        (vc-find-file-hook)))))
 
-(defun auto-revert-tail-handler (size)  
+(defun auto-revert-tail-handler (size)
   (let ((modified (buffer-modified-p))
        (inhibit-read-only t)           ; Ignore.
        (file buffer-file-name)