* bug#55368: 29.0.50; Unreliable input-pending-p and throw-on-input on Emacs 29 / pgtk in Wayland
@ 2022-05-11 13:34 Vijay Marupudi
2022-05-13 2:01 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 5+ messages in thread
From: Vijay Marupudi @ 2022-05-11 13:34 UTC (permalink / raw)
To: 55368
Hello,
I would like to report an inconsistency issue with how pending input is
communicated with elisp code. In Emacs 29, input-pending-p sometimes
returns t and while-no-input is interrupting code (because it uses
throw-on-input) AFTER all keyboard input has already been read into
elisp code and is being processed, and when there is no pending input.
This is leading to code being unable to process and react to the latest
input because it gets interrupted while handling the latest input.
This issue does not occur in X.Org sessions, only Wayland.
This issue was initially encountered via the vertico ELPA package, for
more discussion and screencasts, see here.
https://github.com/minad/vertico/issues/226#issuecomment-1123087263
To replicate this bug, run this code, and then type very fast on your
keyboard. When I type the string "not" very fast, the printed message is
`"not", t`
(require 'cl-lib)
(defun my-hook ()
(message "%S, %S" (minibuffer-contents)
(while-no-input
(cl-loop for i from 0 below 1000000
summing i))))
(minibuffer-with-setup-hook (lambda ()
(add-hook 'post-command-hook
'my-hook
nil t))
(read-from-minibuffer "Text: "))
Setup information:
In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6)
of 2022-05-10 built on entropy
Repository revision: 430b5ba838f31865139e3a724f9191e2b1de57d1
Repository branch: master
System Description: Arch Linux
Configured using:
'configure --with-json --with-pgtk --with-native-compilation
--with-xinput2 --with-file-notification=inotify --with-mailutils'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP XIM GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Messages
Minor modes in effect:
global-company-mode: t
company-mode: t
which-key-mode: t
pdf-occur-global-minor-mode: t
savehist-mode: t
recentf-mode: t
marginalia-mode: t
vertico-mode: t
show-smartparens-global-mode: t
global-git-commit-mode: t
magit-auto-revert-mode: t
shell-dirtrack-mode: t
override-global-mode: t
global-auto-revert-mode: t
delete-selection-mode: t
global-display-line-numbers-mode: t
display-line-numbers-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
buffer-read-only: t
size-indication-mode: t
column-number-mode: t
line-number-mode: t
global-visual-line-mode: t
visual-line-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
/home/vijaymarupudi/.emacs.d/elpa/transient-20220509.1943/transient hides /usr/local/share/emacs/29.0.50/lisp/transient
Features:
(shadow sort mail-extr emacsbug misearch multi-isearch vc-mtn vc-hg
vc-git vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view vc
vc-dispatcher vertico-directory mule-util vj-notmuch-config vj-diff
company-oddmuse company-keywords company-etags company-gtags
company-dabbrev-code company-dabbrev company-files company-clang
company-capf company-cmake company-semantic company-template
company-bbdb company cape vj-wiki vj-elisp vj-capture bbt which-key
typescript-mode cc-mode-expansions smartparens-c cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
lsp-pyright pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist
tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local find-func cedet
pdf-isearch let-alist pdf-misc pdf-loader pdf-tools pdf-view jka-compr
pdf-cache pdf-info pdf-util pdf-macs image-mode exif lsp-mode
lsp-protocol spinner network-stream nsm lv inline ht f s ewoc slime
arc-mode archive-mode hyperspec geiser-guile info-look geiser
geiser-repl geiser-compile geiser-debug compile geiser-image geiser-capf
geiser-doc geiser-menu geiser-edit etags fileloop generator xref project
geiser-completion geiser-autodoc geiser-eval geiser-connection tq
geiser-syntax scheme geiser-log geiser-popup view ein
smartparens-markdown markdown-mode color noutline outline savehist
embark-consult consult-vertico consult compat-28 recentf tree-widget
magit-bookmark bookmark notmuch notmuch-tree notmuch-jump notmuch-hello
notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-message
notmuch-draft notmuch-maildir-fcc notmuch-address notmuch-company
notmuch-parser notmuch-wash coolj notmuch-query goto-addr icalendar
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs notmuch-tag
notmuch-lib notmuch-version notmuch-compat hl-line mm-view mml-smime
smime gnutls dig vj-embark embark ffap marginalia orderless vertico
expand-region text-mode-expansions er-basic-expansions
expand-region-core expand-region-custom smartparens-config
smartparens-text smartparens advice rainbow-delimiters magit-submodule
magit-obsolete magit-blame magit-stash magit-reflog magit-bisect
magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff
smerge-mode diff diff-mode git-commit log-edit message eudc-capf eudc
cus-edit pp cus-load eudc-vars sendmail yank-media rmc dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader pcvs-util add-log magit-core
magit-autorevert magit-margin magit-transient magit-process with-editor
shell pcomplete comint ansi-color magit-mode transient edmacro kmacro
magit-git magit-base magit-section format-spec crm dash compat-27
compat-26 compat exec-path-from-shell eww xdg url-queue thingatpt shr
pixel-fill kinsoku url-file url-dired svg dom puny mm-url gnus nnheader
gnus-util text-property-search time-date mail-utils range wid-edit
mm-util mail-prsvr notifications dbus xml use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode use-package-core modus-operandi-theme modus-themes pcase
autorevert filenotify delsel display-line-numbers comp comp-cstr
warnings rx cl-extra server geiser-impl help-fns radix-tree help-mode
geiser-custom geiser-base ring slime-autoloads info package browse-url
url url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars
seq gv subr-x byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice
simple 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 composite
emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help
abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face
macroexp files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk pgtk lcms2 multi-tty make-network-process
native-compile emacs)
Memory information:
((conses 16 542628 440465)
(symbols 48 42850 1)
(strings 32 143837 32615)
(string-bytes 1 6262187)
(vectors 16 75716)
(vector-slots 8 1324303 604428)
(floats 8 410 1561)
(intervals 56 1363 434)
(buffers 992 17))
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#55368: 29.0.50; Unreliable input-pending-p and throw-on-input on Emacs 29 / pgtk in Wayland
2022-05-11 13:34 bug#55368: 29.0.50; Unreliable input-pending-p and throw-on-input on Emacs 29 / pgtk in Wayland Vijay Marupudi
@ 2022-05-13 2:01 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-13 15:07 ` Vijay Marupudi
0 siblings, 1 reply; 5+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-13 2:01 UTC (permalink / raw)
To: Vijay Marupudi; +Cc: 55368
Vijay Marupudi <vijay@vijaymarupudi.com> writes:
> Hello,
>
> I would like to report an inconsistency issue with how pending input is
> communicated with elisp code. In Emacs 29, input-pending-p sometimes
> returns t and while-no-input is interrupting code (because it uses
> throw-on-input) AFTER all keyboard input has already been read into
> elisp code and is being processed, and when there is no pending input.
> This is leading to code being unable to process and react to the latest
> input because it gets interrupted while handling the latest input.
>
> This issue does not occur in X.Org sessions, only Wayland.
Does that mean the bug doesn't happen in the regular X build, or does it
mean that nothing happens if you run the PGTK build under X Windows?
And what happens if you comment out this code in `readable_events' in
keyboard.c?
if (!(flags & READABLE_EVENTS_IGNORE_SQUEEZABLES) && some_mouse_moved ())
return 1;
if (single_kboard)
{
if (current_kboard->kbd_queue_has_data)
return 1;
}
else
{
KBOARD *kb;
for (kb = all_kboards; kb; kb = kb->next_kboard)
if (kb->kbd_queue_has_data)
return 1;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#55368: 29.0.50; Unreliable input-pending-p and throw-on-input on Emacs 29 / pgtk in Wayland
2022-05-13 2:01 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-13 15:07 ` Vijay Marupudi
2022-05-14 0:54 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 5+ messages in thread
From: Vijay Marupudi @ 2022-05-13 15:07 UTC (permalink / raw)
To: Po Lu; +Cc: 55368
I cannot reproduce the bug anymore, not sure why. The screencasts I
had provided in the Github issue show that experienced it, but for
some reason I don't see it anymore. I tried bisecting the commits, and
I couldn't find the commit with the bug anymore.
Sorry about that. There might be numerous reason why I can't replicate
this bug anymore One reason could be that there was some bug fixed in
the packages that had been updated since then. I have included the
list of packages that have been upgraded for archival reasons.
Additionally, it is possible that I might have forgotten to call
autoreconf -vif and ./configure --options ... before compiling the
version of Emacs and there might have been some stale files linked in.
I have no way of checking this now.
Po Lu <luangruo@yahoo.com> writes:
> Does that mean the bug doesn't happen in the regular X build, or does it
> mean that nothing happens if you run the PGTK build under X Windows?
For archival reasons, this happened in PGTK in Wayland, but not in
PGTK in X.Org.
Sorry about the inconvenience. This bug can be closed.
Packages that have been upgraded since then:
[2022-05-11T08:02:35-0500] gnutls
[2022-05-11T08:02:35-0500] sqlite
[2022-05-11T08:02:35-0500] chromium
[2022-05-11T08:02:35-0500] criu
[2022-05-11T08:02:36-0500] pyright
[2022-05-11T08:06:39-0500] google-cloud-sdk
[2022-05-11T10:11:14-0500] wireplumber
[2022-05-11T18:45:23-0500] curl
[2022-05-11T18:45:23-0500] fuse-common
[2022-05-11T18:45:23-0500] fuse3
[2022-05-11T18:45:23-0500] intel-ucode
[2022-05-11T18:45:24-0500] linux
[2022-05-11T18:45:24-0500] nvidia
[2022-05-11T18:45:24-0500] psmisc
[2022-05-12T11:01:59-0500] bubblewrap
[2022-05-12T11:01:59-0500] libxml2
[2022-05-12T11:01:59-0500] libnotify
[2022-05-12T11:01:59-0500] gnome-todo
[2022-05-12T11:01:59-0500] python-setuptools
[2022-05-12T11:01:59-0500] jupyterlab
[2022-05-12T11:01:59-0500] python-cryptography
[2022-05-12T20:27:43-0500] pcsclite
[2022-05-12T20:27:43-0500] postgresql-libs
[2022-05-13T08:51:14-0500] jupyterlab
[2022-05-13T08:51:14-0500] librsvg
[2022-05-13T08:51:14-0500] mobile-broadband-provider-info
[2022-05-13T08:51:14-0500] noto-fonts
[2022-05-13T08:51:14-0500] pcsclite
[2022-05-13T08:51:15-0500] vulkan-headers
[2022-05-13T08:51:15-0500] vulkan-icd-loader
~ Vijay
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#55368: 29.0.50; Unreliable input-pending-p and throw-on-input on Emacs 29 / pgtk in Wayland
2022-05-13 15:07 ` Vijay Marupudi
@ 2022-05-14 0:54 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-11 11:07 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-14 0:54 UTC (permalink / raw)
To: Vijay Marupudi; +Cc: 55368
Vijay Marupudi <vijay@vijaymarupudi.com> writes:
> I cannot reproduce the bug anymore, not sure why. The screencasts I
> had provided in the Github issue show that experienced it, but for
> some reason I don't see it anymore. I tried bisecting the commits, and
> I couldn't find the commit with the bug anymore.
>
> Sorry about that. There might be numerous reason why I can't replicate
> this bug anymore One reason could be that there was some bug fixed in
> the packages that had been updated since then. I have included the
> list of packages that have been upgraded for archival reasons.
>
> Additionally, it is possible that I might have forgotten to call
> autoreconf -vif and ./configure --options ... before compiling the
> version of Emacs and there might have been some stale files linked in.
> I have no way of checking this now.
I would rather keep this bug open for a little more time, in case you
(or someone else) runs into the bug again.
Thanks for trying.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#55368: 29.0.50; Unreliable input-pending-p and throw-on-input on Emacs 29 / pgtk in Wayland
2022-05-14 0:54 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-06-11 11:07 ` Lars Ingebrigtsen
0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-11 11:07 UTC (permalink / raw)
To: Po Lu; +Cc: 55368, Vijay Marupudi
Po Lu <luangruo@yahoo.com> writes:
> I would rather keep this bug open for a little more time, in case you
> (or someone else) runs into the bug again.
This was a month ago, and apparently nobody ran into the problem again,
so I'm closing this bug report. If anybody sees it, please respond to
the debbugs address and we'll reopen.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-11 11:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-11 13:34 bug#55368: 29.0.50; Unreliable input-pending-p and throw-on-input on Emacs 29 / pgtk in Wayland Vijay Marupudi
2022-05-13 2:01 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-13 15:07 ` Vijay Marupudi
2022-05-14 0:54 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-11 11:07 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).