problem with 4.7 and emacs21 M-x
Joel Reed
joelwreed at comcast.net
Mon Jan 10 02:14:24 CET 2005
On Thu, Jan 06, 2005 at 03:20:47PM +0100, Marc A. Lehmann wrote:
> On Wed, Jan 05, 2005 at 08:49:53PM -0500, Joel Reed <joelwreed at comcast.net> wrote:
> > On Wed, Jan 05, 2005 at 04:11:29AM +0100, Marc A. Lehmann wrote:
> > > On Tue, Jan 04, 2005 at 09:19:27PM -0500, Joel Reed <joelwreed at comcast.net> wrote:
> >
> > more testing, it appears the M-w is the problem, not M-x. using emacs21 and
> > urxvt-4.7, when i do a M-w (where meta for me is the escape key) emacs does
> > copy the buffer, but then it inserts a "w" into the buffer as well!
> >
> > remove Mod1 = Alt_R
> > remove Mod4 = Meta_L Meta_R
> That is interesting you completely remove the alt/meta keys.
yes i do re-purpose the right alt key, and left&right windows keys.
>
> So I wonder, how do you type M-w, or what _is_ M-w? M-w should be alt+w on
> a pc keyboard (generating esc-w).
hmmm. i hit the escape key then the "w" key for M-w.
>
> However, it seems you are entering escape+w directly, using two distinct
> keypressed, escape + w:
>
> > state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
> > state 0x0, keycode 25 (keysym 0x77, w), same_screen YES,
> > XLookupString gives 1 bytes: "w"
>
> ... which is puzzling, as this correctly generates esc-w in your setup,
> and rxvt-unicode should not even enter the code path where you patch. Can
> you find out what escape code rxvt-unicode received (see below)?
ok. done below. it feels to me like the issue is the len/newlen is maybe
one char to many. i'm thinking this because emacs correctly picks up my M-w,
but then ALSO inserts "w" into the buffer.
i don't know if this helps or not, but the following code also works
for me:
default:
if (len == 0
&& (keysym & 0xfff0) != 0xff70
&& (keysym & 0xfff0) != 0xffe0)
/* generate a keycode for every remaining keypress */
sprintf ((char *)kbuf, "\033[%x;%xA", (unsigned char)ev.state, (unsigned short)keysym);
newlen = 0; // THIS FIXES IT FOR ME
break;
> Also, are you sure that M-w is the problem and generates the wrong
> code? When you enter a multi-key sequence, maybe the problem is earlier? What
> is the full sequence you try that fails?
>
> Try:
>
> od -a
>
> and then enter M-w (or the full sequence you use), followed by enter,
> followed by ctrl-d until you get output from od and the prompt back.
original 4.7:
(%:~/src/lm-4.0)- od -a
^[w
0000000 esc w nl
0000003
patched 4.7:
(%:/opt/src/rxvt-unicode-4.7)- od -a
^[w
0000000 esc w nl
0000003
darn they are the same.
jr
>
> Thanks!
>
> --
> The choice of a
> -----==- _GNU_
> ----==-- _ generation Marc Lehmann
> ---==---(_)__ __ ____ __ pcg at goof.com
> --==---/ / _ \/ // /\ \/ / http://schmorp.de/
> -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
>
More information about the rxvt-unicode
mailing list