emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/with-editor 2417261 051/140: Guard against nonexistent def


From: Jonas Bernoulli
Subject: [nongnu] elpa/with-editor 2417261 051/140: Guard against nonexistent default directory
Date: Fri, 6 Aug 2021 12:51:18 -0400 (EDT)

branch: elpa/with-editor
commit 241726118dee067a8d9880d53c6a781d580ba8a1
Author: Philipp Stephani <phst@google.com>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Guard against nonexistent default directory
    
    Fixes #34.
    
    Modified-by: Jonas Bernoulli <jonas@bernoul.li>
---
 with-editor.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/with-editor.el b/with-editor.el
index af8fc25..83b4b92 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -139,8 +139,9 @@ please see 
https://github.com/magit/magit/wiki/Emacsclient.";))))
              (with-editor-locate-emacsclient-1 path (1- depth))))))
 
 (defun with-editor-emacsclient-version (exec)
-  (ignore-errors
-    (cadr (split-string (car (process-lines exec "--version"))))))
+  (let ((default-directory (file-name-directory exec)))
+    (ignore-errors
+      (cadr (split-string (car (process-lines exec "--version")))))))
 
 (defun with-editor-emacsclient-path ()
   (let ((path exec-path))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]