Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Emacs quitting on Control-G when committing to mercurial

9 views
Skip to first unread message

Matt McClure

unread,
May 21, 2012, 8:05:25 PM5/21/12
to Roy Smith, help-gn...@gnu.org
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 <r...@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             keyboard-quit            <JISX0208>     self-insert-command

--
Roy Smith
r...@panix.com


Roy Smith

unread,
May 21, 2012, 8:34:36 PM5/21/12
to Matt McClure, help-gn...@gnu.org
Interesting.  Thanks for the information.

--
Roy Smith



0 new messages