branch: elpa/with-editor
commit 5cddefaff6aa0fa8ce2a0fa23900687c07d87481
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    Use remacsclient when using remacs
    
    Closes #32.
---
 with-editor.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/with-editor.el b/with-editor.el
index c522bed..d06e16f 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -119,7 +119,8 @@ please see 
https://github.com/magit/magit/wiki/Emacsclient.";))))
   (let* ((version-lst (-take depth (split-string emacs-version "\\.")))
          (version-reg (concat "^" (mapconcat #'identity version-lst "\\."))))
     (or (locate-file-internal
-         "emacsclient" path
+         (if (equal invocation-name "remacs") "remacsclient" "emacsclient")
+         path
          (cl-mapcan
           (lambda (v) (cl-mapcar (lambda (e) (concat v e)) exec-suffixes))
           (nconc (and (boundp 'debian-emacs-flavor)

Reply via email to