From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Roy Smith Newsgroups: gmane.emacs.help Subject: Re: Emacs quitting on Control-G when committing to mercurial Date: Mon, 21 May 2012 20:34:36 -0400 Message-ID: <4324E7AB-DB3C-4A07-997B-5455515D6C03@panix.com> References: <-5593377888256836725@unknownmsgid> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-64-709907668 X-Trace: dough.gmane.org 1337646900 9776 80.91.229.3 (22 May 2012 00:35:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 May 2012 00:35:00 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Matt McClure Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 22 02:34:59 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SWd3u-0002L4-HC for geh-help-gnu-emacs@m.gmane.org; Tue, 22 May 2012 02:34:54 +0200 Original-Received: from localhost ([::1]:47461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWd3t-000549-UT for geh-help-gnu-emacs@m.gmane.org; Mon, 21 May 2012 20:34:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWd3h-0004rM-6R for help-gnu-emacs@gnu.org; Mon, 21 May 2012 20:34:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWd3e-0000AT-Uo for help-gnu-emacs@gnu.org; Mon, 21 May 2012 20:34:40 -0400 Original-Received: from mailbackend.panix.com ([166.84.1.89]:50990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWd3e-0000A8-Qf for help-gnu-emacs@gnu.org; Mon, 21 May 2012 20:34:38 -0400 Original-Received: from [10.0.1.2] (ool-457b1082.dyn.optonline.net [69.123.16.130]) by mailbackend.panix.com (Postfix) with ESMTP id 56D5528D5D; Mon, 21 May 2012 20:34:37 -0400 (EDT) In-Reply-To: <-5593377888256836725@unknownmsgid> X-Mailer: Apple Mail (2.1084) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 166.84.1.89 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:84925 Archived-At: --Apple-Mail-64-709907668 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Interesting. Thanks for the information. On May 21, 2012, at 8:05 PM, Matt McClure wrote: > That's a bug. Emacs' process has the wrong pgid when its parent isn't = an interactive shell. Here's a workaround for the same problem using = Git. I would hope you can configure Mercurial similarly.=20 >=20 > http://static.matthewlmcclure.com/n/ >=20 > Emacs C-g Kills `git commit` On Mac OS X >=20 > 2012-02-22 > Workaround: Invoke Emacs via an interactive Bash shell. >=20 > emacs.sh: >=20 > #! /bin/bash -i emacs "$@" > In a shell: >=20 > git config --global core.editor emacs.sh > See also: > http://thread.gmane.org/gmane.comp.version-control.git/158981=20 > http://www.cons.org/cracauer/sigint.html >=20 > Matt McClure > http://matthewlmcclure.com > http://www.mapmyfitness.com/profile/matthewlmcclure >=20 > On May 21, 2012, at 9:54 AM, Roy Smith wrote: >=20 >> I'm running: >>=20 >> GNU Emacs 22.1.1 >> OSX-10.6.8 >> Mercurial Distributed SCM (version 1.6.4+20101001) >>=20 >> If I do "hg commit", emacs is run as I would expect, but if I type a = Control-G, I get an "interrupted!" message, and emacs quits (leaving the = terminal modes unrestored). >>=20 >> Running ps shows that the command being executed is: >>=20 >> emacs -nw = /var/folders/p5/p5Gj6NRtF-yAXT+X0YVgJU+++TM/-Tmp-/hg-editor-wQEeGG.txt >>=20 >> If I run that manually, I get normal operation. I assume there's = something funky about the environment in which emacs is being executed, = but I can't figure out what that might be. Any ideas? >>=20 >> It doesn't seem to be related to the buffer; I get the same problem = in other buffers. M-X make command summary shows, for both the normal = and broken situations: >>=20 >> C-g keyboard-quit = self-insert-command >>=20 >> -- >> Roy Smith >> roy@panix.com >>=20 >>=20 -- Roy Smith roy@panix.com --Apple-Mail-64-709907668 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
That's a bug. Emacs' process has the wrong pgid = when its parent isn't an interactive shell. Here's a workaround for the = same problem using Git. I would hope you can configure Mercurial = similarly. 


Emacs C-g Kills `git = commit` On Mac OS X

2012-02-22

Workaround: Invoke Emacs via = an interactive Bash shell.

emacs.sh:


    #! /bin/bash -i

    emacs "$@"
    

In a shell:


    git config --global core.editor emacs.sh
    
See also:

Matt = McClure

On May = 21, 2012, at 9:54 AM, Roy Smith <roy@panix.com> wrote:

I'm = running:

GNU Emacs = 22.1.1
OSX-10.6.8
Mercurial Distributed = SCM (version 1.6.4+20101001)

If I do "hg commit", emacs is run as I would = expect, but if I type a Control-G, I get an "interrupted!" message, and = emacs quits (leaving the terminal modes unrestored).

Running ps shows that the command being executed = is:

   emacs -nw = /var/folders/p5/p5Gj6NRtF-yAXT+X0YVgJU+++TM/-Tmp-/hg-editor-wQEeGG.txt

If I run that manually, I get normal operation.  I assume = there's something funky about the environment in which emacs is being = executed, but I can't figure out what that might be.  Any = ideas?

It doesn't seem to be related to the buffer; I get the same = problem in other buffers.  M-X make command summary shows, for both = the normal and broken situations:

=    C-g =             ke= yboard-quit =            <JISX= 0208>     self-insert-command

--
Roy Smith
roy@panix.com



--
Roy Smith

=


= --Apple-Mail-64-709907668--