bug#30758: 25.3; Cannot exit minibuffer with C-g when opening file or switching buffers

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#30758: 25.3; Cannot exit minibuffer with C-g when opening file or switching buffers

Tim Fischbach
Hi!

I am facing the exact problem described in 


on both Emacs 25.3.2 and 24.5.1 also via `emacs -Q`. 
When running emacs inside the terminal via `emacs -nw` the problem does not occur.

Regards,
Tim

In GNU Emacs 25.3.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2017-09-12 built on lcy01-32
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description: Ubuntu 16.04.3 LTS

Configured using:
 'configure --build=x86_64-linux-gnu --prefix=/usr
 '--includedir=${prefix}/include' '--mandir=${prefix}/share/man'
 '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var
 --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu'
 '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode
 --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib
 --program-suffix=25 --with-modules --with-x=yes --with-x-toolkit=gtk3
 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES

Important settings:
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
gui-get-primary-selection: No selection is available

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 87773 6169)
 (symbols 48 19852 0)
 (miscs 40 269 107)
 (strings 32 14685 4070)
 (string-bytes 1 425584)
 (vectors 16 12003)
 (vector-slots 8 436013 5055)
 (floats 8 166 28)
 (intervals 56 230 0)
 (buffers 976 18)
 (heap 1024 32330 891))

Reply | Threaded
Open this post in threaded view
|

bug#30758: 25.3; Cannot exit minibuffer with C-g when opening file or switching buffers

Eli Zaretskii
> From: Tim Fischbach <[hidden email]>
> Date: Fri, 09 Mar 2018 09:33:57 +0000
>
> I am facing the exact problem described in
>
>   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26289
>
> on both Emacs 25.3.2 and 24.5.1 also via `emacs -Q`.
> When running emacs inside the terminal via `emacs -nw` the problem does not occur.

Thanks, but unless you can provide a reproducible recipe starting with
"emacs -Q", this report doesn't help us to find the reason and fix it,
exactly like bug#26289 didn't.



Reply | Threaded
Open this post in threaded view
|

bug#30758: 25.3; Cannot exit minibuffer with C-g when opening file or switching buffers

Noam Postavsky
In reply to this post by Tim Fischbach
unarchive 26289
reopen 26289
merge 30758 29063 26289
quit

Tim Fischbach <[hidden email]> writes:

> I am facing the exact problem described in 
>
>   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26289
>
> on both Emacs 25.3.2 and 24.5.1 also via `emacs -Q`. 
> When running emacs inside the terminal via `emacs -nw` the problem
> does not occur.

Do you see the same symptoms described in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29063#17

    I have also noticed that, with toggle-debug-on-quit on, just typing C-g
    while in the normal writing buffer will always send me to the debugger on
    only one line:

    Debugger entered--Lisp error: (quit)
      internal-timer-start-idle()

    This happens in the broken emacs only, and C-g here does nothing in the
    working emacs. Likewise, in the broken emacs, while I am highlighting text
    with C-space, C-g will 50% of the time cancel the highlight and 50% of the
    time open the above debugger on the timer start function.



Reply | Threaded
Open this post in threaded view
|

bug#30758: 25.3; Cannot exit minibuffer with C-g when opening file or switching buffers

Tim Fischbach
1) emacs -Q
2) M-x
3) C-g
reproduces the error every time on my machine. Holding C-g for a couple of seconds fixes the problem. Also Esc Esc Esc still works. Even C-S-g works, even though describe-key translates it to C-g. I really think this might be a problem with Ubuntu Unity somehow rebinding or blocking C-g.

Using toogle-debug-on-quit with my normal config, I was able to trigger

  Debugger entered--Lisp error: (quit)
without any further info or

  Debugger entered--Lisp error: (quit)
  read-event(nil t 2)
  sit-for(2)
  execute-extended-command(nil "toggle-debug-on-quit" nil)
  funcall-interactively(execute-extended-command nil "toggle-debug-on-quit" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)
This was NOT reproducible with `emacs -Q`, though.

On Sat, 10 Mar 2018 at 04:05 Noam Postavsky <[hidden email]> wrote:
unarchive 26289
reopen 26289
merge 30758 29063 26289
quit

Tim Fischbach <[hidden email]> writes:

> I am facing the exact problem described in 
>
>   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26289
>
> on both Emacs 25.3.2 and 24.5.1 also via `emacs -Q`. 
> When running emacs inside the terminal via `emacs -nw` the problem
> does not occur.

Do you see the same symptoms described in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29063#17

    I have also noticed that, with toggle-debug-on-quit on, just typing C-g
    while in the normal writing buffer will always send me to the debugger on
    only one line:

    Debugger entered--Lisp error: (quit)
      internal-timer-start-idle()

    This happens in the broken emacs only, and C-g here does nothing in the
    working emacs. Likewise, in the broken emacs, while I am highlighting text
    with C-space, C-g will 50% of the time cancel the highlight and 50% of the
    time open the above debugger on the timer start function.
Reply | Threaded
Open this post in threaded view
|

bug#30758: 25.3; Cannot exit minibuffer with C-g when opening file or switching buffers

Glenn Morris-3
Tim Fischbach wrote:

> I really think this might be a problem with Ubuntu Unity somehow
> rebinding or blocking C-g.

Searching finds:

https://askubuntu.com/questions/741657/unity-somehow-captures-controlg-from-emacs

   if I disable Show location of pointer for the mouse in
   gnome-tweak-tools, C-g is passed through correctly.



Reply | Threaded
Open this post in threaded view
|

bug#30758: 25.3; Cannot exit minibuffer with C-g when opening file or switching buffers

Tim Fischbach
Unfortunately that option was already disabled on my system. But it has to be something like this.

Thanks

On Mon, 12 Mar 2018 at 16:43 Glenn Morris <[hidden email]> wrote:
Tim Fischbach wrote:

> I really think this might be a problem with Ubuntu Unity somehow
> rebinding or blocking C-g.

Searching finds:

https://askubuntu.com/questions/741657/unity-somehow-captures-controlg-from-emacs

   if I disable Show location of pointer for the mouse in
   gnome-tweak-tools, C-g is passed through correctly.
Reply | Threaded
Open this post in threaded view
|

bug#30758: 25.3; Cannot exit minibuffer with C-g when opening file or switching buffers

Glenn Morris-3
Tim Fischbach wrote:

> Unfortunately that option was already disabled on my system. But it has to
> be something like this.

Maybe try disabling any window manager keyboard shortcut that uses the
ctrl key?

BTW, just to be explicit, seems everyone reporting this uses Ubuntu 16.04.



Reply | Threaded
Open this post in threaded view
|

bug#30758: 25.3; Cannot exit minibuffer with C-g when opening file or switching buffers

Noam Postavsky
In reply to this post by Tim Fischbach
Tim Fischbach <[hidden email]> writes:

> Unfortunately that option was already disabled on my system. But it
> has to be something like this.

Does describe-key-briefly (<f1> c C-g), or view-lossage (<f1> l) suggest
that Emacs can recognize the C-g, or does it see some other keystroke?



Reply | Threaded
Open this post in threaded view
|

bug#30758: 25.3; Cannot exit minibuffer with C-g when opening file or switching buffers

Tim Fischbach
Interesting. I did not know about view-lossage.

<f1> c C-g just briefly displays "Quit" and exits minibuffer. When running "emacs -nw -Q" from a terminal, the same key is described correctly as keyboard-quit.

After trying to exit C-x C-f with C-g, nothing shows up in view-lossage. When I hold C-g for a couple of seconds, focus goes back to the buffer as expected and "C-g [abort-recursive-edit]" shows up in view-lossage.

When hitting C-g while inside a buffer, view-lossage displays "C-g [keyboard-quit]" correctly, though, which I would not expect if Ubuntu kept Emacs from receiving keyboard events correctly. 



On Tue, 13 Mar 2018 at 02:12 Noam Postavsky <[hidden email]> wrote:
Tim Fischbach <[hidden email]> writes:

> Unfortunately that option was already disabled on my system. But it
> has to be something like this.

Does describe-key-briefly (<f1> c C-g), or view-lossage (<f1> l) suggest
that Emacs can recognize the C-g, or does it see some other keystroke?