all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs quitting on Control-G when committing to mercurial
@ 2012-05-21 11:31 Roy Smith
  2012-05-22  0:05 ` Matt McClure
  0 siblings, 1 reply; 3+ messages in thread
From: Roy Smith @ 2012-05-21 11:31 UTC (permalink / raw
  To: help-gnu-emacs

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
roy@panix.com




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Emacs quitting on Control-G when committing to mercurial
  2012-05-21 11:31 Emacs quitting on Control-G when committing to mercurial Roy Smith
@ 2012-05-22  0:05 ` Matt McClure
  2012-05-22  0:34   ` Roy Smith
  0 siblings, 1 reply; 3+ messages in thread
From: Matt McClure @ 2012-05-22  0:05 UTC (permalink / raw
  To: Roy Smith; +Cc: help-gnu-emacs@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]

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.

http://static.matthewlmcclure.com/n/

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:

   - http://thread.gmane.org/gmane.comp.version-control.git/158981
   - http://www.cons.org/cracauer/sigint.html


Matt McClure
http://matthewlmcclure.com
http://www.mapmyfitness.com/profile/matthewlmcclure

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             keyboard-quit            <JISX0208>
    self-insert-command

--
Roy Smith
roy@panix.com

[-- Attachment #2: Type: text/html, Size: 3190 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Emacs quitting on Control-G when committing to mercurial
  2012-05-22  0:05 ` Matt McClure
@ 2012-05-22  0:34   ` Roy Smith
  0 siblings, 0 replies; 3+ messages in thread
From: Roy Smith @ 2012-05-22  0:34 UTC (permalink / raw
  To: Matt McClure; +Cc: help-gnu-emacs@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1883 bytes --]

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. 
> 
> http://static.matthewlmcclure.com/n/
> 
> 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:
> http://thread.gmane.org/gmane.comp.version-control.git/158981 
> http://www.cons.org/cracauer/sigint.html
> 
> Matt McClure
> http://matthewlmcclure.com
> http://www.mapmyfitness.com/profile/matthewlmcclure
> 
> 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             keyboard-quit            <JISX0208>     self-insert-command
>> 
>> --
>> Roy Smith
>> roy@panix.com
>> 
>> 


--
Roy Smith
roy@panix.com




[-- Attachment #2: Type: text/html, Size: 6816 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-22  0:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-21 11:31 Emacs quitting on Control-G when committing to mercurial Roy Smith
2012-05-22  0:05 ` Matt McClure
2012-05-22  0:34   ` Roy Smith

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.