Browse code
Fix editor stuff for osx
Showing 3 changed files
- scripts/emacsclient.applescript
- scripts/emacsclient.scpt
- zsh/zsh_plugins/dependencies/editor-setup.zsh
1 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,10 @@ |
1 |
+#!/usr/bin/osascript |
|
2 |
+on run argv |
|
3 |
+ set currentApp to my getCurrentApp() |
|
4 |
+ do shell script "/usr/local/bin/emacsclient -c " & (item 1 of argv) |
|
5 |
+ activate application currentApp |
|
6 |
+end run |
|
7 |
+ |
|
8 |
+to getCurrentApp() |
|
9 |
+ return (path to frontmost application as text) |
|
10 |
+end getCurrentApp |
... | ... |
@@ -1,6 +1,8 @@ |
1 | 1 |
#:depends-on:path-setup |
2 |
-if command -v emacsclient.applescript 2>&1 >/dev/null; then |
|
3 |
- export VISUAL="emacsclient.applescript" |
|
2 |
+if command -v emacsclient.scpt 2>&1 >/dev/null; then |
|
3 |
+ export VISUAL="emacsclient.scpt" |
|
4 |
+elif command -v newemacs 2>&1 >/dev/null; then |
|
5 |
+ export VISUAL=newemacs |
|
4 | 6 |
elif command -v emacsclient 2>&1 >/dev/null; then |
5 | 7 |
cat > "$HOME/bin/newemacs" <<"EOF" |
6 | 8 |
#!/bin/sh |