[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question about Emacs client and server
From: |
PierGianLuca |
Subject: |
Question about Emacs client and server |
Date: |
Wed, 12 Jul 2023 13:34:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
I'm on a Linux machine (Ubuntu) with a desktop manager (KDE). It has always
been my wish to set up Emacs so that it works as follows:
1a. If no Emacs is running, then launching "Emacs" (from program launcher or
command line) should start Emacs and reopen the previous Emacs-desktop configuration.
1b. If Emacs is already running, then launching "Emacs" should open a new empty
(scratch) frame.
2a. If Emacs is already running, and a (say .txt) file is double-clicked or sent to
"open with Emacs", or called by some other program invoking a text editor, then
it should open in a new Emacs frame.
2b. If no Emacs is running, and a file is double-clicked or called by some
other program invoking a text editor, then it should open in a new Emacs frame,
and the previous Emacs-desktop configuration should be restored.
Now I've managed to almost achieve this behaviour, but I notice that some Emacs frames are
"emacsclient" ones (they have a "@" in the status line); others are not. I
don't see why they should be different.
And sometimes launching an Emacs instance warns me that the emacs-desktop is already in use. This
happens if I'm not careful and am launching "Emacs" instead of "Emacs (client)".
I wonder if anyone here has suggestions on how to achieve the behaviour that I
wish – or can tell me if it isn't possible.
I've tried to understand and configure the Emacs server and the emacsclient
behaviour for some years now, but in the end I've always given up. I haven't
fully grasped how they work yet.
Just to avoid misunderstandings: this is absolutely *not* meant as a criticism
of how Emacs works. It's just a request for customization help. And I
understand that great part of the problem comes from my ignorance about Emacs's
workings.
Cheers!
Luca
- Question about Emacs client and server,
PierGianLuca <=