branch: externals/activities
commit 77c135fc36aa12dc7d8a1abedd639f7dd51dea72
Author: Adam Porter <a...@alphapapa.net>
Commit: Adam Porter <a...@alphapapa.net>

    Update changelog, tidy binding and docstring
---
 README.org    |  3 +++
 activities.el | 15 +++++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/README.org b/README.org
index dd0e207f1a..d83c29f97d 100644
--- a/README.org
+++ b/README.org
@@ -170,6 +170,9 @@ The sort order when completing activities can be configured 
using ~activities-so
 *Changes*
 + During save, the ~time~ slot for an activity remains unchanged unless its 
buffers or files differ from their last saved state.  
([[https://github.com/alphapapa/activity.el/pull/83][#83]].  Thanks to 
[[https://github.com/jdtsmith][JD Smith]].)
 
+*Fixes*
++ Don't try to compute true filenames for remote files.  (See 
[[https://github.com/alphapapa/activities.el/issues/130][#130]], 
[[https://github.com/alphapapa/activities.el/pull/133][#133]].  Thanks to 
[[https://github.com/jdtsmith][JD Smith]].)
+
 ** v0.7.2
 
 *Fixes*
diff --git a/activities.el b/activities.el
index cf14e7eed0..42a78ea32e 100644
--- a/activities.el
+++ b/activities.el
@@ -558,12 +558,15 @@ Each of BFA and BFB is a list of buffer and files, as 
returned
 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-let  ((file (cdr cell)))
-                   (if (file-remote-p file)
-                       file
-                     (file-truename file))
-                 (car cell))))
+If the file is a remote one, return its value as-is, not
+necessarily its true name.  The CELL is a (BUFFER . FILE) cons.
+If the file is nil, BUFFER is returned."
+                (pcase-let ((`(,buffer . ,file) cell))
+                  (if file
+                      (if (file-remote-p file)
+                          file
+                        (file-truename file))
+                    buffer))))
     (not (seq-set-equal-p (mapcar #'file-or-buffer bfa)
                          (mapcar #'file-or-buffer bfb)))))
 

Reply via email to