Lisp Service

Posted on Fri 29 August 2008 in misc

I finally figured out the correct magic to pass custom command line arguments to my emacs. This has allowed me to get the emacs-server running in a way more tuned to the way I work.

A lot of emacs people only run one instance of emacs and therefor take the start-up hit and leave it at that. I however tend to run several (one per project) so I can keep a certain amount of state in each session. All the solutions involving shell scripting to optionally use emacs client weren't quite what I wanted. Instead I want to start up one emacs at the start of my windows session that handles all the emacsclient stuff (like editing web-forms) and leave everything as is. It will be no surprise to emacs users that there is a hook for processing custom command line options so now my emacs is "-server" enabled. The only wrinkle is the command line options are processed after you .emacs is loaded so I can't define a "-skip-stuff-for-mutts-edits" flag for invoking from mutt. I don't really want to start messing with the Muti-TTY stuff just yet so I suspect rather than custom flags I may well start parsing the command line to detect mutt temp files.

UPDATE: My emacs commit is mirrored here.