GNU bug report logs - #54656
29.0.50; [menu] key is not read anymore

Previous Next

Package: emacs;

Reported by: dal-blazej <at> onenetbeyond.org

Date: Thu, 31 Mar 2022 19:43:01 UTC

Severity: normal

Tags: moreinfo

Found in version 29.0.50

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54656 in the body.
You can then email your comments to 54656 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Thu, 31 Mar 2022 19:43:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to dal-blazej <at> onenetbeyond.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 31 Mar 2022 19:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: dal-blazej <at> onenetbeyond.org
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; [menu] key is not read anymore
Date: Thu, 31 Mar 2022 21:41:56 +0200
Hi,

After compiling from master I found my [menu] key not usable anymore
within emacs.

It don't show with C-h c
It show in xev


In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2022-03-31 built on localhost
Repository revision: 948181df9cbdcc8845fc3662e2007d8e09f48c71
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/opt/emacs
 --with-mailutils --with-sound=yes --without-gconf --without-gsettings
 --with-x=yes --without-toolkit-scroll-bars --with-x-toolkit=gtk3
 --with-json --with-native-compilation --with-xwidgets
 build_alias=x86_64-linux-gnu 'CFLAGS=-O2 -Wall ''

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG JSON LIBSELINUX
LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND
SQLITE3 THREADS TIFF X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_US
  locale-coding-system: utf-8

Load-path shadows:
/home/user/.emacs.d/elpa/transient-0.3.7/transient hides /opt/emacs/share/emacs/29.0.50/lisp/transient




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Fri, 01 Apr 2022 01:21:01 GMT) Full text and rfc822 format available.

Message #8 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: dal-blazej <at> onenetbeyond.org
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Fri, 01 Apr 2022 09:20:04 +0800
dal-blazej <at> onenetbeyond.org writes:

> Hi,
>
> After compiling from master I found my [menu] key not usable anymore
> within emacs.
>
> It don't show with C-h c
> It show in xev
>

What happens if you run Emacs like this?

  emacs -q -xrm 'Emacs.useXIM: false'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Fri, 01 Apr 2022 21:35:02 GMT) Full text and rfc822 format available.

Message #11 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: dal-blazej <at> onenetbeyond.org
To: Po Lu <luangruo <at> yahoo.com>
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Fri, 01 Apr 2022 23:34:01 +0200
> What happens if you run Emacs like this?
>
>   emacs -q -xrm 'Emacs.useXIM: false'

The key is still not read.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Sat, 02 Apr 2022 01:01:01 GMT) Full text and rfc822 format available.

Message #14 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: dal-blazej <at> onenetbeyond.org
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Sat, 02 Apr 2022 09:00:39 +0800
dal-blazej <at> onenetbeyond.org writes:

> The key is still not read.

Okay, please put a breakpoint here:

 	  /* Common for all keysym input events.  */
 	  XSETFRAME (inev.ie.frame_or_window, f);
=======>  inev.ie.modifiers
 	    = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), modifiers);
 	  inev.ie.timestamp = xkey.time;


and show the value of `keysym' when you press the menu key.

Thanks.




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 02 Apr 2022 15:36:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Sat, 02 Apr 2022 15:52:01 GMT) Full text and rfc822 format available.

Message #19 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: dal-blazej <at> onenetbeyond.org
To: Po Lu <luangruo <at> yahoo.com>
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Sat, 02 Apr 2022 17:51:43 +0200
Po Lu <luangruo <at> yahoo.com> writes:

> Okay, please put a breakpoint here:
>
>  	  /* Common for all keysym input events.  */
>  	  XSETFRAME (inev.ie.frame_or_window, f);
> =======>  inev.ie.modifiers
>  	    = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), modifiers);
>  	  inev.ie.timestamp = xkey.time;
>
>
> and show the value of `keysym' when you press the menu key.

Nothing : gdb use the break point for any other key, but not for menu.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Sat, 02 Apr 2022 23:40:02 GMT) Full text and rfc822 format available.

Message #22 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: dal-blazej <at> onenetbeyond.org
To: Po Lu <luangruo <at> yahoo.com>
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Sun, 03 Apr 2022 01:39:24 +0200
> What happens if you run Emacs like this?
>
>  emacs -q -xrm 'Emacs.useXIM: false'

Still no joy. 

Is this issue reproductible on another computer ?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Sun, 03 Apr 2022 00:36:02 GMT) Full text and rfc822 format available.

Message #25 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: dal-blazej <at> onenetbeyond.org
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Sun, 03 Apr 2022 08:35:26 +0800
dal-blazej <at> onenetbeyond.org writes:

> Nothing : gdb use the break point for any other key, but not for menu.

Okay, can you place a breakpoint on `x_display_set_last_user_time' and
see if it gets called when you press the menu key?

Thanks in advance.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Mon, 04 Apr 2022 00:04:02 GMT) Full text and rfc822 format available.

Message #28 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: dal-blazej <at> onenetbeyond.org
To: Po Lu <luangruo <at> yahoo.com>
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Mon, 04 Apr 2022 02:03:34 +0200
> Okay, can you place a breakpoint on `x_display_set_last_user_time' and
> see if it gets called when you press the menu key?

Sorry I lack comprehension of the gdb and C.

If I place a breakpoint on :

> static void
> x_display_set_last_user_time (struct x_display_info *dpyinfo, Time time)
> {
> ...

It is called to many time while initiating Emacs and I cannot verify the
keypress.  How do I do that the right way ?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Mon, 04 Apr 2022 00:19:01 GMT) Full text and rfc822 format available.

Message #31 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: dal-blazej <at> onenetbeyond.org
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Mon, 04 Apr 2022 08:18:44 +0800
dal-blazej <at> onenetbeyond.org writes:

> Sorry I lack comprehension of the gdb and C.
>
> If I place a breakpoint on :
>
>> static void
>> x_display_set_last_user_time (struct x_display_info *dpyinfo, Time time)
>> {
>> ...
>
> It is called to many time while initiating Emacs and I cannot verify the
> keypress.  How do I do that the right way ?

Ah, sorry.  Place the breakpoint here instead, inside the function
`handle_one_xevent':

    case KeyPress:
==>   x_display_set_last_user_time (dpyinfo, event->xkey.time);
      ignore_next_mouse_click_timeout = 0;
      coding = Qlatin_1;

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Mon, 04 Apr 2022 09:32:02 GMT) Full text and rfc822 format available.

Message #34 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: dal-blazej <at> onenetbeyond.org
To: Po Lu <luangruo <at> yahoo.com>
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Mon, 04 Apr 2022 11:31:13 +0200
It is triggered :

> Thread 1 "emacs" hit Breakpoint 1, handle_one_xevent (dpyinfo=0x55555774f800, event=0x7fffffffd700, finish=0x555555beabb8 <current_finish>, hold_quit=0x7fffffffd970) at xterm.c:5240
> 5240	  dpyinfo->last_user_time = time;
> (gdb) s
> 13844	      x_display_set_last_user_time (dpyinfo, event->xkey.time);
> (gdb) s
> 0x000055555568a997 in x_display_set_last_user_time (time=119383756, dpyinfo=0x55555774f800) at xterm.c:5240
> 5240	  dpyinfo->last_user_time = time;




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Mon, 04 Apr 2022 11:11:01 GMT) Full text and rfc822 format available.

Message #37 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: dal-blazej <at> onenetbeyond.org
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Mon, 04 Apr 2022 19:09:49 +0800
dal-blazej <at> onenetbeyond.org writes:

> It is triggered :
>
>> Thread 1 "emacs" hit Breakpoint 1, handle_one_xevent
>> (dpyinfo=0x55555774f800, event=0x7fffffffd700, finish=0x555555beabb8
>> <current_finish>, hold_quit=0x7fffffffd970) at xterm.c:5240
>> 5240	  dpyinfo->last_user_time = time;
>> (gdb) s
>> 13844	      x_display_set_last_user_time (dpyinfo, event->xkey.time);
>> (gdb) s
>> 0x000055555568a997 in x_display_set_last_user_time (time=119383756, dpyinfo=0x55555774f800) at xterm.c:5240
>> 5240	  dpyinfo->last_user_time = time;

I guess what you have to do is to step through each statement until you
find out why it isn't reaching this piece of handle_one_xevent:

#if defined XK_ISO_Lock && defined XK_ISO_Last_Group_Lock
		    || (XK_ISO_Lock <= orig_keysym
			&& orig_keysym <= XK_ISO_Last_Group_Lock)
#endif
		    ))
	    {
	      STORE_KEYSYM_FOR_DEBUG (keysym);
	      /* make_lispy_event will convert this to a symbolic
		 key.  */
	      inev.ie.kind = NON_ASCII_KEYSTROKE_EVENT;
	      inev.ie.code = keysym;
====>	      goto done_keysym;
	    }

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Thu, 21 Apr 2022 14:19:01 GMT) Full text and rfc822 format available.

Message #40 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: dal-blazej <at> onenetbeyond.org
To: Po Lu <luangruo <at> yahoo.com>
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Thu, 21 Apr 2022 16:18:25 +0200
> I guess what you have to do is to step through each statement until you
> find out why it isn't reaching this piece of handle_one_xevent:

It seems the key is ... initialized to 0 ?

(gdb) p xkey
$13 = {type = 0, serial = 0, send_event = 1466608144,
  display = 0x898f22a9e227e100, window = 140737488343872, root = 93824994679155,
  subwindow = 0, time = 93824993826130, x = 2, y = 0, x_root = 0, y_root = 0,
  state = 0, keycode = 0, same_screen = 0}

(gdb) s

(gdb) p xkey.state
$14 = 0

(gdb) s
x_emacs_to_x_modifiers (dpyinfo=0x555557727a00, state=0) at lisp.h:1155

(gdb) p a
$15 = {i = {0, 1045149306}, d = 1.2904777690891933e-08}

(gdb) s
Fget (symbol=0x0, propname=0xaf80) at lisp.h:747

[...]

(gdb) u
x_emacs_to_x_modifiers (dpyinfo=0x555557727a00, state=0) at xterm.c:9546

(gdb) p tem
$21 = (Lisp_Object) 0x0

[...]

(gdb) n
handle_one_xevent (dpyinfo=0x555557727a00, event=0x7fffffffd5e0,
    finish=0x555555beabb8 <current_finish>, hold_quit=0x7fffffffd850)
    at xterm.c:13926

(gdb) p xkey.state
$30 = 0

At some point gdb prints
(gpb) n
0x00007ffff760623f in ?? () from /lib/x86_64-linux-gnu/libgdk-3.so.0

and I am unable to continue my inspection.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Fri, 22 Apr 2022 00:52:02 GMT) Full text and rfc822 format available.

Message #43 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: dal-blazej <at> onenetbeyond.org
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Fri, 22 Apr 2022 08:51:34 +0800
dal-blazej <at> onenetbeyond.org writes:

>> I guess what you have to do is to step through each statement until you
>> find out why it isn't reaching this piece of handle_one_xevent:
>
> It seems the key is ... initialized to 0 ?
>
> (gdb) p xkey
> $13 = {type = 0, serial = 0, send_event = 1466608144,
>   display = 0x898f22a9e227e100, window = 140737488343872, root = 93824994679155,
>   subwindow = 0, time = 93824993826130, x = 2, y = 0, x_root = 0, y_root = 0,
>   state = 0, keycode = 0, same_screen = 0}

I think your Emacs is out of date, since this shouldn't be possible if
the breakpoint was set to the location I asked.

> [...]
>
> (gdb) u
> x_emacs_to_x_modifiers (dpyinfo=0x555557727a00, state=0) at xterm.c:9546
>
> (gdb) p tem
> $21 = (Lisp_Object) 0x0
>
> [...]
>
> (gdb) n
> handle_one_xevent (dpyinfo=0x555557727a00, event=0x7fffffffd5e0,
>     finish=0x555555beabb8 <current_finish>, hold_quit=0x7fffffffd850)
>     at xterm.c:13926

I think your copy of Emacs is very out of date.  Please rebuild and try
again.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Fri, 22 Apr 2022 13:58:02 GMT) Full text and rfc822 format available.

Message #46 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: dal-blazej <at> onenetbeyond.org
To: Po Lu <luangruo <at> yahoo.com>
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Fri, 22 Apr 2022 15:57:08 +0200
Hi,

Po Lu <luangruo <at> yahoo.com> writes:

> dal-blazej <at> onenetbeyond.org writes:
>
>>> I guess what you have to do is to step through each statement until you
>>> find out why it isn't reaching this piece of handle_one_xevent:
>>
>> It seems the key is ... initialized to 0 ?
>>
>> (gdb) p xkey
>> $13 = {type = 0, serial = 0, send_event = 1466608144,
>>   display = 0x898f22a9e227e100, window = 140737488343872, root =
>> 93824994679155,
>>   subwindow = 0, time = 93824993826130, x = 2, y = 0, x_root = 0, y_root = 0,
>>   state = 0, keycode = 0, same_screen = 0}
>
> I think your Emacs is out of date, since this shouldn't be possible if
> the breakpoint was set to the location I asked.

You asked me to find out why this position was not reachable, so I set
breakpoints ahead... Again, setting at the position asked does not trigger.

I have rebuilt today. I have still at some point :

(gdb) n
0x00007ffff760623f in ?? () from /lib/x86_64-linux-gnu/libgdk-3.so.0
(gdb) n
Cannot find bounds of current function.

...

Setting it to

      if (f != 0)
        {
==>       KeySym keysym, orig_keysym;
          /* al%imercury <at> uunet.uu.net says that making this 81
             instead of 80 fixed a bug whereby meta chars made
             his Emacs hang.

(gdb) p keysym
$1 = 4596353178100193889

(gdb) p orig_keysym
$2 = <optimized out>

(gdb) p xkey
$6 = {type = 2, serial = 2027, send_event = 0, display = 0x0, window = 0,
  root = 0, subwindow = 2, time = 9223372036854775822, x = 0, y = 0, x_root = 0,
  y_root = 0, state = 0, keycode = 0, same_screen = 0}

Eventually you may try to reproduce that issue with
$ xdotool key Menu
?

Thanks




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Sat, 23 Apr 2022 00:16:02 GMT) Full text and rfc822 format available.

Message #49 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: dal-blazej <at> onenetbeyond.org
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Sat, 23 Apr 2022 08:15:17 +0800
dal-blazej <at> onenetbeyond.org writes:

> You asked me to find out why this position was not reachable, so I set
> breakpoints ahead... Again, setting at the position asked does not trigger.
>
> I have rebuilt today. I have still at some point :
>
> (gdb) n
> 0x00007ffff760623f in ?? () from /lib/x86_64-linux-gnu/libgdk-3.so.0
> (gdb) n
> Cannot find bounds of current function.

That isn't a problem, though you might want to install debug info for
GTK.  You don't have to look in any function other than
handle_one_xevent.

> ...
>
> Setting it to
>
>       if (f != 0)
>         {
> ==>       KeySym keysym, orig_keysym;
>           /* al%imercury <at> uunet.uu.net says that making this 81
>              instead of 80 fixed a bug whereby meta chars made
>              his Emacs hang.
>
> (gdb) p keysym
> $1 = 4596353178100193889
>
> (gdb) p orig_keysym
> $2 = <optimized out>

You will have to proceed some more, I guess.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54656; Package emacs. (Sun, 24 Apr 2022 19:26:02 GMT) Full text and rfc822 format available.

Message #52 received at 54656 <at> debbugs.gnu.org (full text, mbox):

From: dal-blazej <at> onenetbeyond.org
To: Po Lu <luangruo <at> yahoo.com>
Cc: 54656 <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Sun, 24 Apr 2022 21:25:34 +0200
I read "strange behaviour: Emacs ignoring one key on my keyboard," on
emacs-help today and tried.

$ xmodmap -e 'clear Mod4'

The key is now again responsive.




Reply sent to Po Lu <luangruo <at> yahoo.com>:
You have taken responsibility. (Mon, 25 Apr 2022 02:12:02 GMT) Full text and rfc822 format available.

Notification sent to dal-blazej <at> onenetbeyond.org:
bug acknowledged by developer. (Mon, 25 Apr 2022 02:12:02 GMT) Full text and rfc822 format available.

Message #57 received at 54656-done <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: dal-blazej <at> onenetbeyond.org
Cc: 54656-done <at> debbugs.gnu.org
Subject: Re: bug#54656: 29.0.50; [menu] key is not read anymore
Date: Mon, 25 Apr 2022 10:10:53 +0800
dal-blazej <at> onenetbeyond.org writes:

> I read "strange behaviour: Emacs ignoring one key on my keyboard," on
> emacs-help today and tried.
>
> $ xmodmap -e 'clear Mod4'
>
> The key is now again responsive.

Then that's intended behavior, not a bug, so I'm closing this bug
report.

Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 23 May 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.