chiark / gitweb /
bin/emacsclient-hack: Open the window on the right display.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 7 Dec 2009 10:20:53 +0000 (10:20 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 7 Dec 2009 10:20:53 +0000 (10:20 +0000)
By default, Emacsclient doesn't open frames on the client's display.
This grotty shim program does the right magic, by simply passing the
appropriate command-line option.  It's intended for use in `.desktop'
files, because they don't allow shell expansion of environment variables
in the right way.

Silly rabbits.

bin/emacsclient-hack [new file with mode: 0755]
setup

diff --git a/bin/emacsclient-hack b/bin/emacsclient-hack
new file mode 100755 (executable)
index 0000000..8379edb
--- /dev/null
@@ -0,0 +1,2 @@
+#! /bin/sh -e
+exec emacsclient ${DISPLAY+--display "$DISPLAY"} "$@"
diff --git a/setup b/setup
index 1bc13f74f582115fc15ed2c8b4f452a6eb2df92f..e48ce2eef9390718dd378497ebb42fe58c802269 100755 (executable)
--- a/setup
+++ b/setup
@@ -212,6 +212,7 @@ scripts="
   mdw-pager
   mdw-conf
   mdw-build
+  emacsclient-hack
   movemail-hack
   emerge-hack
   lesspipe.sh