Lawrence D'Oliveiro
about a year ago
It can be helpful for GUI-based editors, like Emacs, to offer a “server
mode”. What this means is, instead of starting it up for every file you
want to edit, you leave it running, and use another command to tell it via
IPC to open selected files for editing. Such a command can be added as a
custom right-click menu item in common file managers, so you can just do
“Open In Editor” on any file while browsing directories.
In Emacs, this is done with the “emacsclient” command. This can be invoked
in blocking mode (wait until Emacs signals the edit is done before
proceeding), or non-blocking mode as “emacsclient -n”, where it just tells
Emacs to open the file and then immediately exits.
The latter is the natural one to use for such GUI invocation, though the
former one has its uses.
mode”. What this means is, instead of starting it up for every file you
want to edit, you leave it running, and use another command to tell it via
IPC to open selected files for editing. Such a command can be added as a
custom right-click menu item in common file managers, so you can just do
“Open In Editor” on any file while browsing directories.
In Emacs, this is done with the “emacsclient” command. This can be invoked
in blocking mode (wait until Emacs signals the edit is done before
proceeding), or non-blocking mode as “emacsclient -n”, where it just tells
Emacs to open the file and then immediately exits.
The latter is the natural one to use for such GUI invocation, though the
former one has its uses.