Most of this blog is published into Italian but I think that sharing technical tips should be better done trying to write them into English.
I’m a fun of emacs but I consider my self still a beginner. Every day I found new ways improve the my usage of this programmable editor.
One of the problems I was experiencing was the mess from gnus, ERC and normal buffers. The only solution I found was to run a new instance of emacs but this solution rose a new problem: all instances run after the first complain for emacsserver already running and if I run the gnus instance as first instance all emacsclient will become its clients.
I found the solution to this problem on Edward O’Connor’s blog. Edward use a new emacs for gnus and call a function to invoke gnus at startup and solved the problem with emacsserver, too.
Based on his solution I wrote a function to run ERC:
'("erc" . (lambda (&rest ignore)
;; does not start emacs server
(setq ted-server-emacs nil)
(setq frame-title-format '("" "%b @ Emacs IRC" ))
As you can easily see ERC auto connects to some network.
Please note that as per Edward O’Connor’s post ted-server-emacs is set to nil so no server is run if I use emacs for ERC only.
This solution needs to be improved a little bit because all emacs instances still load all the configuration file even if they do not need them. My configuration is based on Alex Ott one so I have many files, perhaps some variables like the ted-server-emacs one can do the trick.