git.fiddlerwoaroof.com
Browse code

Fix editor stuff for osx

Ed Langley authored on 26/10/2017 17:15:03
Showing 3 changed files
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
0 11
Binary files a/scripts/emacsclient.scpt and b/scripts/emacsclient.scpt differ
... ...
@@ -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