branch: elpa/with-editor commit e39137ed0add2fb2cb7e4db1d9fab10ee1ebd682 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
Support nix on macos Closes #134. --- CHANGELOG | 4 ++++ lisp/with-editor.el | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3b9809cf52..df6305f350 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,8 @@ # -*- mode: org -*- +* v3.4.3 UNRELEASED + +- Added support for Nix on macOS. #134 + * v3.4.3 2024-12-01 - Added new variable ~with-editor-emacsclient-program-suffixes~. #132 diff --git a/lisp/with-editor.el b/lisp/with-editor.el index f13431ce09..fb60b76a8a 100644 --- a/lisp/with-editor.el +++ b/lisp/with-editor.el @@ -158,10 +158,15 @@ please see https://github.com/magit/magit/wiki/Emacsclient.")))) (let ((dir (expand-file-name "bin" invocation-directory))) (when (file-directory-p dir) (push dir path))) - (when (string-search "Cellar" invocation-directory) + (cond + ((string-search "Cellar" invocation-directory) (let ((dir (expand-file-name "../../../bin" invocation-directory))) (when (file-directory-p dir) - (push dir path)))))) + (push dir path)))) + ((string-search "Emacs.app" invocation-directory) + (let ((dir (expand-file-name "../../../../bin" invocation-directory))) + (when (file-directory-p dir) + (push dir path))))))) (cl-remove-duplicates path :test #'equal))) (defcustom with-editor-emacsclient-executable (with-editor-locate-emacsclient)