Re:Intero for Emacs: complete interactive development progra...
by mijoharas on Thursday August 11, 2016 @09:35AM
(#12268075)
If you want a little more terminal magic here are my emacs related shortcuts:
alias et='TERM=xterm-256color emacsclient -t'
alias ec='emacsclient -c -a=emacs'
alias ed='emacs --daemon'
alias kill-emacs='emacsclient -e "(kill-emacs)"'
alias e='TERM=xterm-256color f -e "emacsclient -c -a=emacs"'
The reason for these is that emacs is a little slow to start up (in comparison to vim at least). So you can set up a daemon running ( ed command above, for emacs daemon. I don't have ed on my system)You can then open up a new frame (window) of emacs with the ec command, or a new terminal session of emacs with the et command.
My favourite is the e command, which makes use of fasd[0] to find any "frecent" file, tries to open it with emacsclient, but, if emacs daemon is not running will fall back to opening a new emacs (which with spacemacs will start a new daemon running). This way I can open files in completely different directories if need be.
Re:Intero for Emacs: complete interactive development progra...
by akkartik on Thursday August 11, 2016 @01:55PM
(#12270327)
Thanks for those tips! Just to contribute back a factoid in case you weren't aware, I noticed that the manpage for emacsclient says this:
"If the value of [the alternate editor] is the empty string, run `emacs --daemon' to start Emacs in daemon mode, and try to connect to it."
So your aliases would continue to work if you replace -a=emacs with -a=''. And you'd only pay the startup cost the first time you run ec or e.
Edit 10 minutes later: Ok, it's installed now. And I've set this up in my .zshrc:
Let's see how this goes.