C-x C-c not working in Emacs 23.1

19

9

I am using Emacs 23.1 with Cygwin but when I try to exit by pressing C-x C-c it says C-x C-g is undefined and I am not able to exit.

mahesh

Posted 2010-01-10T07:06:12.000

Reputation:

Answers

25

This problem can be fixed by inserting the following line in file Cygwin.bat before the line with bash --login -i:

set CYGWIN=tty notitle glob

File Cygwin.bat is in the root of the Cygwin installation and is also the file that there is a shortcut to in menu Start/Programs/Cygwin. The shortcut may be named Cygwin Bash Shell.


I have tested it and my version of the Cygwin.bat file now contains:

@echo off

e:
chdir e:\cygwin171\bin

set CYGWIN=tty notitle glob

bash --login -i

Peter Mortensen

Posted 2010-01-10T07:06:12.000

Reputation: 10 992

1Thank you, this fixed it for me! Should definitely be the accepted answer. – Skilldrick – 2010-07-14T14:41:56.313

@31eee384: you are welcome! – Peter Mortensen – 2011-02-11T21:36:23.253

5

Sounds like a Cygwin issue, interpreting Ctrl-c as Interrupt and Emacs somehow translating that to its interrupt character, Ctrl-g.

As a workaround, you can always exit Emacs by doing Meta-xsave-buffers-kill-terminal .

Teddy

Posted 2010-01-10T07:06:12.000

Reputation: 5 504

1

I had the same problem and just solved it by adding a Windows environment variable called CYGWIN with the value "tty".

mtgred

Posted 2010-01-10T07:06:12.000

Reputation: 111