LWN.net Logo

Editor

Editor

Posted Aug 6, 2008 7:52 UTC (Wed) by nix (subscriber, #2304)
In reply to: Editor by alex
Parent article: Git Magic

Set your EDITOR to emacsclient and leave an emacs running.


(Log in to post comments)

Editor

Posted Aug 6, 2008 8:48 UTC (Wed) by alex (subscriber, #1355) [Link]

Sadly I have yet to come up with a solution that works well with all my needs. I tend to run
at least one emacs per "project" which is long running as well as temporary ones for commits
or editing pages. I suspect I just need to think about rules for starting an emacs server in
my .emacs.

The other problem is running text mode emacs on remote screen sessions. I don't want to switch
to another (v)tty when EDITOR gets invoked. I've heard there is a thing called multi-tty but I
have yet to investigate it and it's implications.

Pointers to pimped up emacsserver examples are welcomed :-)

Editor

Posted Aug 6, 2008 9:04 UTC (Wed) by nix (subscriber, #2304) [Link]

What I'd suggest is an interactive function bound to some key which does a 
gnudoit (? is this the Emacs name?) to stop whatever server exists via 
(server-start t), then does a (server-start) in the current instance. So 
then you can switch which emacs your emacsclient invocation talks to with 
a single keystroke.

Alternatively you could set `server-name' on the servers and use 
the --socket-name argument to emacsclient.

There are more elaborate methods but these two should work.

I'm afraid as an XEmacs user the multi-tty stuff just works for me ;)

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds