From: Terence Dineen <terence.dineen@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Subject: bug#3128: Bug#3128: emacsclient 22.3 race condition when launching emacs is required
Date: Mon, 22 Jun 2009 13:22:11 -0400 [thread overview]
Message-ID: <4e375d980906221022k75c6535bhefa7f5270829cb34@mail.gmail.com> (raw)
In-Reply-To: <paiqiqqq25.fsf@fencepost.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2239 bytes --]
Glenn Morris wrote:
Terence Dineen wrote:
$ echo $ALTERNATE_EDITOR
/sandbox/bin/emacs
$ emacsclient foo
emacsclient: connect: Connection refused
The newly launched emacs has a buffer open on foo but not as a server
buffer.
emacsclient is waiting for a done message from emacs and emacs is acting as
though it was launched by emacsclient using the --no-wait option.
I don't really understand what you are saying the problem is, but if
you get the 23.0.95 pretest from
ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-23.0.95.tar.gz
I think that
emacsclient -c -a "" foo
might do what you want it to do.
Sorry, I see that my report was too terse.
I have built 23,0.95 and run the command you suggested. It does behave as I
expected.
What I was trying to say in my bug report against 22.3 was:
If I have an emacs process running already and execute "emacsclient foo" the
result is that a new buffer appears in the emacs process as a server editing
buffer i.e. it has a message "When done with a buffer, type C-x #". The
emacsclient invocation waits until the server buffer is dismissed.
On the other hand, if I do not have an emacs process running already before
executing "emacsclient foo" the result is message from emacsclient
emacsclient: connect: Connection refused
an emacs process is started and it has a buffer on foo. However that buffer
is not a server editing buffer (C-x # does nothing) and the emacsclient
process does not terminate until the emacs process it launched is
terminated. Maybe I am missing something, but my expection was that
emacsclient would behave roughly as follows when there is no emacs process
alreadt running:
1) notice the absence of a running emacs
2) use the -a option or the ALTERNATIVE_EDITOR to find another image to
launch
3) launch it and wait for it to open the appropriate socket
4) start doing whatever it would have done to tell the now running emacs to
open a server editing buffer on foo if it had found a running emacs in the
first place.
I guess I can now see that emacsclient can't know that the alternate editor
is even emacs so it can't use the same protocol as it would have had it
found a running emacs server in the first place.
Sorry for the distraction.
[-- Attachment #2: Type: text/html, Size: 2703 bytes --]
next prev parent reply other threads:[~2009-06-22 17:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <stab40223n.fsf@fencepost.gnu.org>
2009-04-27 17:03 ` bug#3128: emacsclient 22.3 race condition when launching emacs is required Terence Dineen
2009-06-21 2:27 ` bug#3128: Bug#3128: " Glenn Morris
2009-06-22 17:22 ` Terence Dineen [this message]
2009-06-22 6:55 ` bug#3128: marked as done (emacsclient 22.3 race condition when launching emacs is required) Emacs bug Tracking System
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=4e375d980906221022k75c6535bhefa7f5270829cb34@mail.gmail.com \
--to=terence.dineen@gmail.com \
--cc=3128@emacsbugs.donarmstrong.com \
--cc=rgm@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.