I am an emacs user and have written a few emacs configuration files.
I wanted to run the client-server feature of emacs using a single bash script that would take care of the emacs server and client. The script runs the server (if not already running) and then follows it up by running the client in the desired frame (terminal or graphic).
I have soft-linked the executable script to /usr/bin/emacs
(overriding the default) so that running the emacs
command does the job for me. The command emacs
now fires up the script from the terminal as well as via Alt+F2
.
The problem is, binding a keyboard shortcut to the same command (or the script) doesn't work.
I am attaching the screenshot of my shortcut here.
The shell script can be found here.
P.S.: The keyboard shortcut runs fine when /usr/bin/emacs
is linked to the default emacs executable (at /etc/alternatives/emacs
in my case).
emacsclient -c -a “”
it automatically spawns a daemon if it's not found. If it founds a running daemon it doesn't get past the-c
and connects to it