From b2f6600aa8b280fd2d1ec411306ac445009558d9 Mon Sep 17 00:00:00 2001 From: Dante Catalfamo Date: Fri, 17 Dec 2021 23:34:11 -0500 Subject: Add Automator steps to emacsclient on macos --- content/posts/using-emacsclient-on-macos/index.org | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'content/posts/using-emacsclient-on-macos/index.org') diff --git a/content/posts/using-emacsclient-on-macos/index.org b/content/posts/using-emacsclient-on-macos/index.org index c98e4b9..c0513ab 100644 --- a/content/posts/using-emacsclient-on-macos/index.org +++ b/content/posts/using-emacsclient-on-macos/index.org @@ -67,3 +67,33 @@ daemon if it isn't already running. Now all I have to do is press @@html: + + + E@@ and a new Emacs window pops up with no startup delay! + +It's also possible to create an "application" shortcut for +=emacsclient= using [[https://support.apple.com/en-ca/guide/automator/welcome/mac][Automator]]. + +Create a new automation as an Application with the Run Shell Script +step. Then add the following as the contents of the script. + +#+begin_src shell +/opt/homebrew/bin/emacsclient \ + --no-wait \ + --quiet \ + --suppress-output \ + --create-frame \ + "$@" +#+end_src + +Replacing =/opt/homebrew/bin/emacsclient= with the path to your +=emacsclient= if it's located elsewhere. + +Then set =Pass input= to =as arguments=. + +#+ATTR_HTML: :title Automator emacsclient script +#+ATTR_HTML: :alt Automator emacsclient script +[[file:emacsclient automator.png]] + +Finally place the Automator application in your =/Applications= +directory. + +You should now be able to open Emacsclient through spotlight and +associate it with filetypes. -- cgit v1.2.3