From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#6963: More usecases, patch attached Date: Wed, 29 Sep 2010 09:02:32 +0200 Organization: ThierryVolpiatto Message-ID: <87vd5p58xj.fsf@tux.homenetwork> References: <201009011216.17097.arne_bab@web.de> <20100929060918.GB9654@elzar.ws.whq.gocept.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1285744294 31700 80.91.229.12 (29 Sep 2010 07:11:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 29 Sep 2010 07:11:34 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 29 09:11:33 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P0qpB-0006jV-9W for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Sep 2010 09:11:33 +0200 Original-Received: from localhost ([127.0.0.1]:43562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0qpA-0000WY-HL for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Sep 2010 03:11:32 -0400 Original-Received: from [140.186.70.92] (port=50360 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0qp3-0000WI-Ja for bug-gnu-emacs@gnu.org; Wed, 29 Sep 2010 03:11:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0qp2-0005i6-CP for bug-gnu-emacs@gnu.org; Wed, 29 Sep 2010 03:11:25 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40832) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0qp2-0005i2-9f for bug-gnu-emacs@gnu.org; Wed, 29 Sep 2010 03:11:24 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P0qfy-0001M2-2a; Wed, 29 Sep 2010 03:02:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <201009011216.17097.arne_bab@web.de> Resent-From: Thierry Volpiatto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Sep 2010 07:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6963 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.12857436965193 (code B ref -1); Wed, 29 Sep 2010 07:02:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Sep 2010 07:01:36 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0qfX-0001Li-2G for submit@debbugs.gnu.org; Wed, 29 Sep 2010 03:01:35 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0qfV-0001Ld-8A for submit@debbugs.gnu.org; Wed, 29 Sep 2010 03:01:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0qiG-0004wX-H7 for submit@debbugs.gnu.org; Wed, 29 Sep 2010 03:04:25 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:36372) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0qiG-0004wT-CB for submit@debbugs.gnu.org; Wed, 29 Sep 2010 03:04:24 -0400 Original-Received: from [140.186.70.92] (port=35648 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0qiB-0006ZB-HU for bug-gnu-emacs@gnu.org; Wed, 29 Sep 2010 03:04:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0qiA-0004w2-18 for bug-gnu-emacs@gnu.org; Wed, 29 Sep 2010 03:04:19 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:34173) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0qi9-0004vr-Ru for bug-gnu-emacs@gnu.org; Wed, 29 Sep 2010 03:04:18 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P0qi7-0004il-4r for bug-gnu-emacs@gnu.org; Wed, 29 Sep 2010 09:04:15 +0200 Original-Received: from 116.77.197-77.rev.gaoland.net ([77.197.77.116]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 29 Sep 2010 09:04:15 +0200 Original-Received: from thierry.volpiatto by 116.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 29 Sep 2010 09:04:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 116.77.197-77.rev.gaoland.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.50 (gnu/linux) Cancel-Lock: sha1:lYx/3sg1UpUjDAFp73EHDOmReEQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 29 Sep 2010 03:02:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40533 Archived-At: Wolfgang Schnerring writes: > emacsclient is such a usefull tool. But that it does not signal error > situations via its exit status severely hinders its usage in shell > scripts or in integration with other programs. > > For example, I was bit by this rather badly when I tried to use > emacsclient to start an ediff session, to use as a merge tool for the > Mercurial SCM. > I may have made a typo in configuring said ediff command or for > whatever other reason, Emacs returned an error. But Mercurial was > blissfully unaware of this, since emacsclient returns 0 no matter > what. End result: Mercurial committed a broken merge that I had to > spend at least two hours some days later to debug. > > I've attached a patch that makes emacsclient exit with nonzero status > when it receives an error message from Emacs -- it already *prints* > "*ERROR*" in these cases, so I feel this makes a lot of sense. > > Thanks, > Wolfgang > Did you use your own script or the mercurial script to use emacsclient/ediff? -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997