branch: externals/emacs-gc-stats
commit 631389c04effef8c91b860429ebe6051c4e55f9d
Author: Ihor Radchenko <yanta...@posteo.net>
Commit: Ihor Radchenko <yanta...@posteo.net>

    Fix `memory-info' trying to retrieve remote system data over TRAMP
    
    * emacs-gc-stats.el (emacs-gc-stats-setting-vars):
    (emacs-gc-stats-command-vars):
    (emacs-gc-stats-summary-vars): Force using computer running Emacs when
    retrieving memory data.
    * README.org (Version 1.4.1 (not yet released)): Document.
    
    Reported-by: Adam Sjøgren <a...@koldfront.dk>
---
 README.md         | 6 ++++++
 README.org        | 5 +++++
 emacs-gc-stats.el | 9 ++++++---
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 6ebb9d0e26..124a0e9c50 100644
--- a/README.md
+++ b/README.md
@@ -71,6 +71,12 @@ You can pause the logging any time by disabling 
`emacs-gc-stats-mode`
 # News
 
 
+## Version 1.4.1 (not yet released)
+
+-   Avoid `memory-info` trying to retrieve memory information from remote
+    system over TRAMP.
+
+
 ## Version 1.4
 
 -   `emacs-gc-stats-file` is now compressed, when possible.
diff --git a/README.org b/README.org
index 7af5ec0458..0918fdfd9b 100644
--- a/README.org
+++ b/README.org
@@ -67,6 +67,11 @@ You can pause the logging any time by disabling 
~emacs-gc-stats-mode~
 (=M-x emacs-gc-stats-mode=).
 
 * News
+** Version 1.4.1 (not yet released)
+
+- Avoid ~memory-info~ trying to retrieve memory information from remote
+  system over TRAMP.
+
 ** Version 1.4
 
 - ~emacs-gc-stats-file~ is now compressed, when possible.
diff --git a/emacs-gc-stats.el b/emacs-gc-stats.el
index 07f21c2144..342a3ee147 100644
--- a/emacs-gc-stats.el
+++ b/emacs-gc-stats.el
@@ -86,7 +86,8 @@ number of days."
     doom-version
     spacemacs-version
     prelude-tips
-    (memory-info)
+    ;; Only on this system.  Do not try fetching remote system info via TRAMP.
+    (let ((default-directory user-emacs-directory)) (memory-info))
     (memory-use-counts))
   "List of variable/function symbols to collect after loading init.el."
   :type '(list sexp)
@@ -100,7 +101,8 @@ number of days."
     gcs-done
     this-command
     memory-limit
-    (memory-info)
+    ;; Only on this system.  Do not try fetching remote system info via TRAMP.
+    (let ((default-directory user-emacs-directory)) (memory-info))
     (memory-use-counts)
     emacs-gc-stats--idle-tic)
   "List of variable/function symbols to collect for each GC or command."
@@ -113,7 +115,8 @@ number of days."
     gc-elapsed
     gcs-done
     memory-limit
-    (memory-info)
+    ;; Only on this system.  Do not try fetching remote system info via TRAMP.
+    (let ((default-directory user-emacs-directory)) (memory-info))
     emacs-uptime
     (memory-use-counts)
     emacs-gc-stats-idle-delay

Reply via email to