From: Kevin Ballard Date: Wed, 13 Oct 2010 21:53:05 GMT Subject: Re: Manual hunk edit mode + emacs + ^G == garbage Message-ID: <24AC771D-07A7-49D7-8824-28E6156C90B4@sb.org> In-Reply-To: <1287006523.13553.4.camel@drew-northup.unet.maine.edu> On Oct 13, 2010, at 2:48 PM, Drew Northup wrote: > > On Wed, 2010-10-13 at 14:37 -0700, Kevin Ballard wrote: >> I've been having a rather strange problem using manual hunk edit mode (`git add -p`, e) and emacs together. It seems every time I hit ^G inside of emacs in this one circumstance, the entire process instantly shuts down, both emacs and `git add`, and it doesn't even give emacs a chance to clean up the terminal, so I'm left with garbage across my display (the remains of the emacs window) and the terminal settings are screwed up enough that I have to close and reopen it (even `reset` doesn't fix everything). Has anybody else seen this, and if so, do you know what's going on? I cannot reproduce this with emacs outside of `git add -p`, and I cannot reproduce this with vim even inside of `git add -p`. > > Is there some way to get a dump of the environment that emacs is seeing? > If we have that it will be easier to tell if this is an emacs problem or > a git problem. I've been investigating this on the emacs side as well. At the moment, my suspicion is that ^G causes emacs to trigger (keyboard-quit), but at the same time the surrounding environment (e.g. git) is sending a SIGINT to emacs, which normally acts like ^G but in this case may be triggering the emergency exit mode of emacs. Is there some reason that the interactive add would be sending SIGINT to emacs when I type ^G? -Kevin Ballard