From: Richard Riley <rileyrgdev@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: confused about emacs 23 in daemon mode
Date: Mon, 12 Oct 2009 04:47:43 +0200 [thread overview]
Message-ID: <hau5ci$2ba$1@news.eternal-september.org> (raw)
In-Reply-To: hau4k5$sng$1@reader1.panix.com
dkcombs@panix.com (David Combs) writes:
> In article <4aac9a85$0$17751$ba4acef3@news.orange.fr>,
> Bruno Barbier <bruno.barbier.cs@begin_dom.orange.fr.end_dom> wrote:
>>On 2009-09-13, Daniel Pittman <daniel@rimspace.net> wrote:
>>> Tim X <timx@nospam.dev.null> writes:
>>>> Rodrigo Amestica <ramestica@gmail.com> writes:
>>>>
>>>>> it is so nice to have emacs starting so blazingly fast when using the
>>>>> daemon and emacsclient combination. However it seems that every other
>>>>> emacsclient I open is not an independent version of emacs and things get
>>>>> intermixed. I think that in emacs parlance the terminology is 'frame', all
>>>>> emacsclient instances are emacs frames.
>>
>>Thanks to emacsclient, you only have one emacs. The fact that you get
>>a new frame or not is just a configuration setting.
>>
>> (describe-variable 'server-window)
>>
>>I mean, the fact that things get intermixed is one goal of emacsclient
>>(the other one being fast start up).
>>
>>>>> The main problems I have noticed under these circumstances is that 'C- h-i'
>>>>> seems to be shared by all frames such that browsing in one frame will make
>>>>> the others to move away from their own current info page.
>>
>>Type M-n to open a new independent info buffer.
>>And most jumping commands have a 'C-u' that jump into a new buffer.
>>
>> (info "(info)Create Info buffer")
>>
>>>>> And the mayor
>>>>> show stopper is ECB. It seems that I cannot have 2 emacsclients running
>>>>> their own ECB session.
>>
>>I would use one emacs by ECB and an other one for planning, taking
>>notes, etc. You can then make emacsclient use the one you want or
>>setup only the third emacs as a server depending on your needs.
>>
>> From the emacs info manual:
>>
>> | If there is more than one Emacs server running, you can specify a
>> | server name with the `-s NAME' or `--socket-name=NAME' option to
>> | `emacsclient'. (This option is not supported on MS-Windows.)
>>
>> (info "(emacs)Invoking emacsclient")
>>
>>
>
> Using emacsclient is pretty new to me -- and you seem to
> be playing some nice tricks with it.
>
> Please, could you elaborate a bit (or better, much more) on:
>
> . the above that you wrote.
>
> . your varied uses (and those of others you've seen or
> heard of) of emacsclient (and other things like it).
>
> . You used the term "server". What with the original
> emacs-run throwing off emacs-clients that seem to
> be NOT independent from each other -- sharing buffers,
> etc. For vocabulary-creation, would that make it into
> some kind of subtype of "server"? (Obvious to all: am
> pretty ignorant about servers, clients, etc, which is
> why I'm probing, to learn more.)
>
> . Anything else you want to say. (With the idea that
> maybe RMS could munge it into extra doc for the manual
> or tutorial or something?)
Just think of the daemon as a running program with no human
interface. Emacsclient is then merely a "front end" which displays data
the daemon marshals.. Perhaps you could think of the emacs "server" as
the world wide web and your emacsclient as the browser. If you have two
clients open (web browsers) and the web site changes then both browsers
will show that when you refresh them. Ditto with emacsclient looking at
the emacs process buffers. Not the best analogy but there is oodles out
there in google land about servers and clients.
http://emacs-fu.blogspot.com/2009/02/emacs-daemon.html
The benefits should be self evident: start an emacs process ONCE and
connect to it anytime with negligible start up time - the server is
already started and your emacsclient start is just about instantaneous.
Because the server does not care about the front end too much you can
have different front ends. e.g I have a text mode emacsclient
(emacsclient -nw) running in a linux "screen" session. In addition I
have a hot key set up to fire up an emacsclient on my X desktop. Want to
read my email? I hit a hot key and the emacsclient is there in a
millisecond and I switch to my gnus buffer. Gnus was already open. No
start time for that either. I thien quite the client or disconnect from
my screen session and emacs server is still there : I can come back to
it later. No screen real estate used. I can keep an emacs server running
on my main development machine and then ssh into it from the other side
of the world and have a fully functioning emacsclient running using
either X or in text mode accessing all my details at my home machine.
Similarly I use it for handling mailto URLs in firefox. See here:
http://www.emacswiki.org/emacs/MailtoHandler#toc4
Particular worthy of being singled out is this line which many people
overlooked when it was added (me included) from earlier emacs server
days :-
emacsclient --alternate-editor="" -c
This will start the server if its not already started and *then* connect
the emacsclient to it.
next prev parent reply other threads:[~2009-10-12 2:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-13 1:35 confused about emacs 23 in daemon mode Rodrigo Amestica
2009-09-13 2:19 ` Tim X
2009-09-13 3:24 ` Daniel Pittman
[not found] ` <mailman.6556.1252812928.2239.help-gnu-emacs@gnu.org>
2009-09-13 7:08 ` Bruno Barbier
2009-10-12 2:34 ` David Combs
2009-10-12 2:47 ` Richard Riley [this message]
2009-10-12 2:19 ` David Combs
2009-10-12 4:04 ` Juanma Barranquero
2009-09-13 9:18 ` Peter Dyballa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='hau5ci$2ba$1@news.eternal-september.org' \
--to=rileyrgdev@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.