- Quick Tip: Getting Emacs and IntelliJ to play together - Atlassian Developers
- Customizing IntelliJ for Emacs Compatibility
- Chapter 2: Ack/Ag | Conquering the Command Line | Softcover.io
- Exploring large projects with Projectile and Helm Projectile
- vim-surround/surround.txt at master · tpope/vim-surround
- Simple Tutorials
- start or kill emacs daemon
Last active
December 4, 2016 07:19
-
-
Save markhuyong/60949b1c9ccbd2a5d947d28dbd38345a to your computer and use it in GitHub Desktop.
emacsclient settings
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
#!/bin/bash | |
socket_file=$(lsof -c Emacs | grep server | tr -s " " | cut -d' ' -f8) | |
if [[ $socket_file == "" ]]; then | |
# Just run Emacs (with any arguments passed to the script) | |
# It would be a good idea to parse the arguments and clean/remove | |
# anything emacsclient specific. | |
# (ie. -e should be --eval for emacs) | |
# note that emacsclient doesn't fix these args for you either | |
# when using -a / --alternate-editor | |
emacs $@ & | |
# or on OSX | |
/Application/Emacs.app/Contents/MacOS/Emacs $@ & | |
else | |
emacsclient $@ -n -s $socket_file | |
fi |
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
#!/bin/bash | |
emacsdir=/Applications/Emacs.app/Contents/MacOS | |
socket=$HOME/.emacs.d/server/server | |
if [ ! -e $socket ]; then | |
$emacsdir/Emacs & | |
while [ ! -e $socket ]; do | |
sleep 1 | |
done | |
fi | |
$emacsdir/bin/emacsclient \ | |
--no-wait \ | |
--socket-name=$socket "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment