branch: externals/activities
commit 8109adde73b8e9c4b038abc3967cd4b7bf2937f6
Author: JD Smith <93749+jdtsm...@users.noreply.github.com>
Commit: JD Smith <93749+jdtsm...@users.noreply.github.com>

    annotate: skip file-truename for remote files
    
    The test for a "dirty" activity used by the annotation function and
    when updating the timestamp within the activity is based on whether
    the "set of buffers and files" has changed.  We use `file-truename` to
    look for "real" file changes but that can hang on remote files.  To
    alleviate, we only check the `file-truename` on non-remote files.
---
 activities.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/activities.el b/activities.el
index 24c92d8ee8..cf14e7eed0 100644
--- a/activities.el
+++ b/activities.el
@@ -559,7 +559,11 @@ from `activities--buffers-and-files'."
   (cl-labels ((file-or-buffer (cell)
                "Given a CELL, return the true filename or buffer.
 The CELL is a (BUFFER . FILE) cons.  If the file is nil, BUFFER is returned."
-               (if (cdr cell) (file-truename (cdr cell)) (car cell))))
+               (if-let  ((file (cdr cell)))
+                   (if (file-remote-p file)
+                       file
+                     (file-truename file))
+                 (car cell))))
     (not (seq-set-equal-p (mapcar #'file-or-buffer bfa)
                          (mapcar #'file-or-buffer bfb)))))
 

Reply via email to