169babed0f0620c1d4b351e871832066b7548447
compute/emacs-stuff.md
| ... | ... | @@ -3,7 +3,8 @@ |
| 3 | 3 | ### Make [Emacs](https://emacsformacosx.com/) work on OSX Catalina |
| 4 | 4 | It's a bit of a mess. There's a security setting or something that nobody seems to be able to figure out, that stops Emacs opening files from Finder if it's already running. |
| 5 | 5 | |
| 6 | -To (hopefully temporarily) fix, open up Automator from launchpad, New -> Application. |
|
| 6 | +To (hopefully temporarily) fix, and to make opening files faster anyway: |
|
| 7 | +Open up Automator from launchpad, New -> Application. |
|
| 7 | 8 | Select Run Shell Script. |
| 8 | 9 | Use `/bin/bash` as the shell from the dropdown, and pick `as arguments` in the 'Pass input' dropdown. |
| 9 | 10 | Paste in the following: |
| ... | ... | @@ -17,14 +18,14 @@ for f in "$@"; do |
| 17 | 18 | /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c -n "$f" |
| 18 | 19 | done |
| 19 | 20 | ``` |
| 20 | -and save it as 'Emacs-opener' or something in the Application folder. Use that app to open files instead of Emacs.app. |
|
| 21 | -Use the following as an emacs alias in your shell: |
|
| 21 | +and save it as 'Emacs-opener' or something in the Application folder. Use that app to open files instead of Emacs.app. Use the following as an emacs alias in your shell if you like: |
|
| 22 | 22 | ``` |
| 23 | 23 | emacs () |
| 24 | 24 | { |
| 25 | 25 | open -a Emacs-opener.app "$@" |
| 26 | 26 | } |
| 27 | 27 | ``` |
| 28 | +Finally, add `(start-server)` to your .emacs . |
|
| 28 | 29 | |
| 29 | 30 | ### Change the default text editor in OSX |
| 30 | 31 |