Created
September 7, 2009 08:20
-
-
Save opie4624/182226 to your computer and use it in GitHub Desktop.
Make emacsclient an easy habit!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set an environment variable called ALTERNATE_EDITOR to point to this script. Then get in the habit of using emacsclient always. This will fire up emacs and wait for the server to start then fire up the file passed in via emacs client. | |
Right now it only works if your emacs will come up on your window manager, because that's primarily how I use it. | |
-Opie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
EMACSBIN=/usr/bin/emacs | |
EMACSCLIENTBIN=/usr/bin/emacsclient | |
ALTERNATE_EDITOR= | |
$EMACSBIN -f server-start & | |
while !($EMACSCLIENTBIN $@) do | |
sleep 2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment