[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Debugging a seldom seen bug (C-g with Ido)
From: |
Vasilii Kolobkov |
Subject: |
Re: Debugging a seldom seen bug (C-g with Ido) |
Date: |
Wed, 19 Jan 2022 14:00:10 +0200 |
NB: Resending to the list.
Stefan, thank you so much!
Although i skimmed though the [[info:elisp#Quitting]], i'm still
confused about some parts and might be naming things wrong.
Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> It's probably timing-dependent. My guess is that it happens when you it
> `C-g` while Emacs is running some ELisp code and it processes the `C-g` as
> a (signal 'quit), like what happens when you hit `C-g` to interrupt
> execution of ELisp code, rather than by looking it up in the keymaps.
This seem to explain it.
> Feel free to send the resulting backtrace here (along with
> a description of what you were doing and what you remember seeing on
> screen shortly before the problem).
I managed to reliably reproduce it now: calling describe-function with
icomplete-mode enabled takes plenty time to produce a list of completion
candidates.
Now if i hit C-g before the candidates are shown, i'm seeing a "[Quit]"
appended to the minibuffer, without other effects, and after a while,
i'd get a list of candidates. When doing it with debug-on-quit set, i
see just one other redisplay_internal call at the top most of the time.
Debugger entered--Lisp error: (quit)
redisplay_internal\ \(C\ function\)()
read-from-minibuffer("Describe function: " ...)
completing-read-default("Describe function: " ...)
completing-read("Describe function: " ...)
byte-code(...)
call-interactively(describe-function nil nil)
command-execute(describe-function)
When the candidates are already present, hitting C-g aborts out of
minibuffer. In case of debug-on-quit, it happens here:
Debugger entered--Lisp error: (quit)
read-from-minibuffer("Describe function: " ...)
completing-read-default("Describe function: " ...)
completing-read("Describe function: " ...)
byte-code(...)
call-interactively(describe-function nil nil)
command-execute(describe-function)
I don't think there is anything wrong here, other than my flawed
expectations :)