Browse code
Improve emacs experience on OSX
Ed L authored on 09/07/2017 03:19:10
Showing 5 changed files
Showing 5 changed files
- .gitignore
- external/smart-change-directory
- scripts/emacsclient.scpt
- zsh/zsh_plugins/dependencies/editor-setup.zsh
- zsh/zsh_plugins/99-path-setup.zsh
2 | 2 |
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,4 +1,7 @@ |
1 |
-if command -v emacsclient 2>&1 >/dev/null; then |
|
1 |
+#:depends-on:path-setup |
|
2 |
+if command -v emacsclient.scpt 2>&1 >/dev/null; then |
|
3 |
+ export VISUAL="emacsclient.scpt" |
|
4 |
+elif command -v emacsclient 2>&1 >/dev/null; then |
|
2 | 5 |
cat > "$HOME/bin/newemacs" <<"EOF" |
3 | 6 |
#!/bin/sh |
4 | 7 |
emacsclient -c "$@" |
5 | 8 |
similarity index 100% |
6 | 9 |
rename from zsh/zsh_plugins/99-path-setup.zsh |
7 | 10 |
rename to zsh/zsh_plugins/dependencies/path-setup.zsh |
... | ... |
@@ -3,8 +3,8 @@ |
3 | 3 |
#:depends-on:java |
4 | 4 |
#:depends-on:pfff |
5 | 5 |
### |
6 |
-PATH="${PATH%%:<<<:*}:${PATH##*:>>>:}" |
|
7 | 6 |
|
7 |
+PATH="${PATH%%:<<<:*}:${PATH##*:>>>:}" |
|
8 | 8 |
prepend_exe_path "$HOME/Library/Python/2.7/bin" |
9 | 9 |
prepend_exe_path "$HOME/go/bin" |
10 | 10 |
prepend_exe_path "$HOME/.rvm/bin" |