Álvaro Ramírez is back with the second video in his new series. This video is about making some simple UI adjustments to Emacs to bend it into looking and acting in a way meets your needs. That doesn’t sound too exciting except that Ramírez shows all this by doing something that many of us will find useful: He starts a separate Emacs instance and arranges for the changes he specifies in the first instance to appear in the second instance.
That’s actually easier than it seems. Starting the second instance is just a matter of calling Emacs with some command line arguments to specify where to find init.el and where to put temporary Emacs variables, such as the lock files and socket pointers. If you need to invoke independent instances of Emacs, it’s probably worthwhile capturing the command into an Emacs function or shell script.
Arranging for commands to take place in the second instance is also easier than you might think. For that Ramírez defines a macro that takes the command as an argument and makes a call to the other instance via emacsclient asking it to execute the command. If that sounds mysterious, take a look at the code. It’s straightforward and easy to understand.
Looking at the code for all these snippets is easy because Ramírez has it all in a blog entry. You can capture the code for invoking another Emacs instance and the macro for sending commands to it and use them in your own work.
The particular customizations that Ramírez makes are beside the point. They’re what works for him and even if you want to steal some of them, your ideal Emacs UI almost certainly differs. The real value of his video, I think, is that it shows you an easy way to set up an environment to try prospective changes.
The video is 14 minutes, 37 seconds so it should be reasonably easy to fit into your schedule. It’s definitely worth 15 minutes of your time.