From 241726118dee067a8d9880d53c6a781d580ba8a1 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Thu, 17 Aug 2017 21:39:47 +0200 Subject: Guard against nonexistent default directory Fixes #34. Modified-by: Jonas Bernoulli --- 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)) -- cgit v1.0