Skip to content

Instantly share code, notes, and snippets.

@metachu
Created March 21, 2015 06:43
Show Gist options
  • Save metachu/acf7a96f798c63777093 to your computer and use it in GitHub Desktop.
Save metachu/acf7a96f798c63777093 to your computer and use it in GitHub Desktop.
function emacs
echo "Using emacs client/daemon loader in config.fish..."
if ps -ef | grep "emacs --daemon" | grep -v grep | grep (whoami)
env emacsclient -t $argv
else
emacs --daemon
env emacsclient -t $argv
end
end
@metachu
Copy link
Author

metachu commented Mar 21, 2015

for the fish shell: Checks if emacs daemon is started and runs emacs daemon. If it is not up then start up daemon and then start the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment