fejfighter / emacs

Mirror of GNU Emacs
http://www.gnu.org/software/emacs/
GNU General Public License v3.0
32 stars 2 forks source link

Keybindings not work #5

Closed 4wardx closed 2 years ago

4wardx commented 2 years ago

Hi!

Thanks for your remarkable job. After using pgtk branch, some of the original keys no longer work, such as "C-x C-;"(default binding for comment-line), even though the master branch has merged it.

More info here:

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.29, cairo version 1.16.0)
 of 2021-12-19 built on localhost
Repository revision: 579d7c20da5406575e087e4e8cb0a5621d28037b
Repository branch: master

Configured using:
 'configure --with-pgtk --with-native-compilation
 --without-compress-install'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS XIM GTK3 ZLIB
fejfighter commented 2 years ago

I haven't been able to replicate this (on master, or on that specific commit)

Could you pull again and run make bootstrap ? let me know how that goes

4wardx commented 2 years ago

Well, I am using Emacs master branch(commit 579d7c20da), simply run following: ./autogen.sh && ./configure --with-pgtk --with-native-compilation

After that, just bind C-; to a command, i.e. (global-set-key (kbd "C-;") 'comment-line). However, press C-; doesn't run comment-line as expected.

BTW, I noticed that C-; does not take effect in terminal Emacs. Is this same?

fejfighter commented 2 years ago

I do get issues in terminal which will need to be investigated. but I still can't seem to reproduce your recipe.

do you have you .emacs posted somewhere that I can look at? does this still occur if you start with emacs -q also if you run c-h f comment-line and c-h k c-; what do you get?

4wardx commented 2 years ago

I am using vanilla Emacs, just a little of config for Dired and Lisp, no other special settings. After re-clone the Emacs repository, and run above compilation procedures, the problem reproduce on my PC, even though launch Emacs with emacs -q.

I think the problem on my situation is that when bind any command to key sequence which containing C-;, it always seems to translate C-; to ;, and run command bound to ;, namely (self-insert-command N &optional C), rather than any commands bound to C-;.

I don't know is this only occurs on my laptop, if any one else don't encounter this, just let me try another platform instead. More info will come into this ticket.

Thank you for your patience!

A clean build environment:

git clone https://github.com/emacs-mirror/emacs
cd emacs
./autogen.sh && ./configure --with-pgtk --with-native-compilation
make -j9 && make install
emacs -q

Some helpful info generated by Emacs:

GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.29, cairo version 1.16.0)
 of 2021-12-21
Copyright (C) 2021 Free Software Foundation, Inc.
fejfighter commented 2 years ago

Not to necessarily defend the code as perfect, (it's not) but this is very difficult to debug.

What environment are you running? Fedora/Ubuntu/BSD/other with Gnome/KDE/Sway etc

I wonder if emacs is even receiving the C- when sending C-; I could be on the wrong thread, but I am scratching for ideas right now.

4wardx commented 2 years ago

I'm using Gentoo with bspwm, no special tricks.

Testing on other Linux distributions (debian 11, lubuntu 18) , Emacs with pgtk seems to work perfectly. So I wonder this may be the local library issue.

fejfighter commented 2 years ago

Thanks for testing on the other systems, it's odd that there is a difference, but it may be a USE flag or a config file.

I hope you can track it down.

4wardx commented 2 years ago

Thanks! :-)