Hacker News new | ask | show | jobs
by Jtsummers 2071 days ago
If it helps, maybe not the solution you want but what I do:

I launch a different emacs server for each project I'm working on, and make any modifications necessary there. Usually I only have one project per language open at a time, but suppose I have two lisp projects (unrelated) and don't want a cluttered up set of buffers that all look almost the same (by name, some getting a number appended if they were the second opened). I'll launch a named daemon from inside the project's root directory (emacs --daemon=foo, or with my .zshrc it's just emacsd foo). Then I can access it using emacsclient -s foo (or e -s foo with my .zshrc).

If you really want it customized per project you could probably add some logic to your .emacs file or elsewhere that would run custom elisp per server, maybe check to see if the directory it was launched in has a .emacs file and evaluate that.

1 comments

> maybe check to see if the directory it was launched in has a .emacs file and evaluate that.

Yes, or use .dir-locals.el like civilized ;)

For others:

https://www.gnu.org/software/emacs/manual/html_node/emacs/Di...

Good to know, I've used file local variables but never thought about directory local variables.