branch: externals/activities commit d735c0f2c714ac98248ee17d765bfa8310201d53 Merge: 31ec5154dd 77c135fc36 Author: Adam Porter <a...@alphapapa.net> Commit: Adam Porter <a...@alphapapa.net>
Fix: Don't call file-truename for remote files See #130, #133. --- README.org | 3 +++ activities.el | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 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 24c92d8ee8..42a78ea32e 100644 --- a/activities.el +++ b/activities.el @@ -558,8 +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 (cdr cell) (file-truename (cdr cell)) (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)))))