From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Pretest Date: Mon, 20 Nov 2006 02:20:05 +0100 Message-ID: <8564da9anu.fsf@lola.goethe.zz> References: <87slggjtbb.fsf@furball.mit.edu> <455F9024.8080000@student.lu.se> <17759.43936.82301.353794@kahikatea.snap.net.nz> <85irhbg6zx.fsf@lola.goethe.zz> <17760.11257.78362.216206@kahikatea.snap.net.nz> <85wt5reo3b.fsf@lola.goethe.zz> <17760.17309.553008.718144@kahikatea.snap.net.nz> <85slgfcy5v.fsf@lola.goethe.zz> <45606E21.9030000@student.lu.se> <45609A48.2080905@gnu.org> <4560B581.3030201@gnu.org> <851wnzb1sz.fsf@lola.goethe.zz> <4560CDBD.3080308@gnu.org> <857ixr9ke7.fsf@lola.goethe.zz> <4560D570.9060103@student.lu.se> <85y7q783ak.fsf@lola.goethe.zz> <4560E279.9050700@student.lu.se> <85lkm7814p.fsf@lola.goethe.zz> <4560FDD4.2060103@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1163985648 13475 80.91.229.2 (20 Nov 2006 01:20:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 20 Nov 2006 01:20:48 +0000 (UTC) Cc: Juanma Barranquero , Nick Roberts , Jason Rumney , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 20 02:20:46 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Glxpv-0005pQ-UY for ged-emacs-devel@m.gmane.org; Mon, 20 Nov 2006 02:20:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Glxpv-0004qh-EM for ged-emacs-devel@m.gmane.org; Sun, 19 Nov 2006 20:20:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Glxpf-0004pO-Fk for emacs-devel@gnu.org; Sun, 19 Nov 2006 20:20:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Glxpe-0004oe-SH for emacs-devel@gnu.org; Sun, 19 Nov 2006 20:20:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Glxpe-0004oX-P5 for emacs-devel@gnu.org; Sun, 19 Nov 2006 20:20:22 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Glxpe-0006Ho-JU for emacs-devel@gnu.org; Sun, 19 Nov 2006 20:20:22 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1Glxpd-0007AK-S3; Sun, 19 Nov 2006 20:20:22 -0500 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 576491C4D3DE; Mon, 20 Nov 2006 02:20:06 +0100 (CET) Original-To: Lennart Borgman In-Reply-To: <4560FDD4.2060103@student.lu.se> (Lennart Borgman's message of "Mon\, 20 Nov 2006 01\:59\:00 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.90 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:62517 Archived-At: Lennart Borgman writes: > David Kastrup wrote: > >> I'd prefer the approach where emacsclient does not depend on Emacs >> server to start. > > With a little twist your suggestion would be very similar to mine. Uh, you twist my proposal and then complain about the consequences of the twist... > The main part of your suggestion as I see it is that emacsclient > wait on an intermediate process. This has the advantage that emacs > could communicate with it and tell emacsclient about errors. Uh no, it doesn't. The whole point was that emacsproxy behaves just like a blackbox that can be used instead of --alternate-editor. > That is good. Something like this would have the benefits of both > yours and my suggestion: > > 1) If emacsclient could not contact emacs server then it create the > intermediate process. This then starts emacs and tells emacs to > start emacs server with the required arguments. My proposal was all about _not_ needing to start Emacs server in the first place. Instead, Emacs is set up such that server-quit will _not_ attempt talking to some emacsclient, but will rather kill the emacsproxy it was started from. > 2) Emacsclient then wait for the intermediate process to > disappear. After that it checks for errors. My proposal was all about emacsclient starting the "emacsproxy" like an editor, waiting for it to finish, and then considering the file edited. > 3) If there are errors then it tries to connect to the server again. It does not need to connect to the server "again" since it never connected to the server anyhow. > However it requires some changes to the emacs executable and I do > not believe it should be implemented now. Hm. It requires emacsproxy to call Emacs with something like --eval '(setq server-proxy-process 54321)' or probably something like -f server-proxy-setup 54321 and server-quit to do something like (signal-process server-proxy-process 'INT) in an appropriate place. That's not really "requiring changes to the Emacs executable" in my book. There is one utterly unrelated problem I see here: I don't see how `signal-process' could work reliably on 32bit systems with 32bit process ids. Similarly, how would `process-id' work in that case? -- David Kastrup, Kriemhildstr. 15, 44793 Bochum