-
-
Save sylt/4598af06448c4493c898762496bd061b to your computer and use it in GitHub Desktop.
Single bash alias/function for handling emacsclient
This file contains hidden or 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
# Put this in your ~/.bash_aliases script file | |
# This function/alias behaves how I wished 'emacsclient -a '' -r -n' would have behaved: | |
# * Starts an emacs server/window if there is none. Any supplied file(s) are opened in the new window. | |
# * Otherwise, the supplied file(s) are opened in the already existing emacs window. | |
function e() { | |
emacsclient -q -a "sh -c \"emacs -e server-start $@ &\"" --no-wait $@ | |
} | |
# Example usage: e README.md |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment