On Feb 23, 8:57 am, Dmytro Suvorov wrote:
> C-M-% preforms regexp replace in emacs. This works fine in default
> cygwin terminal
I can't see how. The Cygwin console driver does not translate that key
combination into an escape sequence, as there is no ^% control
character and it doesn't implement any other scheme.
Were you using native emacs instead of Cygwin emacs? That would be
using the Windows console API directly.
> but not in mintty.
> What I get back from emacs is: "M-[ 1 ; 8 u is undefined"
That sequence is as documented at
http://code.google.com/p/mintty/wiki/Keycodes#Number_and_symbol_keys.
> I know I can map "M-[ 1 ; 8 u" to whatever I want in .emacs, but that
> seems like not a good way to do it.
I'm afraid that's what you'll have to do, because there are no
standard keycodes for such combinations (but see below).
> I've read an earlier post (
http://cygwin.com/ml/cygwin/2010-05/
> msg00389.html) that it might be an issue with modifyOtherKeys. I tried
> enabling it in mintty (by using echo -ne "\e[>4;1m" in bash), but then
> it simply prints ;8u (in color) in emacs when I press ctrl-alt-
> shift-5.
Mintty actually sends '\e[37;8u' in that case, whereby the 37 is the
ASCII code for '%' and the 8 encodes Ctrl+Shift+Alt. This
modifyOtherKeys mode comes from xterm and is the closest there is to a
standard for such combinations, but I'd be surprised if emacs
supported it out-of-the-box.
> P.S. Thanks for mintty ;) I'm loving it and I think it should be the
> default cygwin terminal :)
You're welcome!
Andy