From unknown Sun Jun 22 04:17:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60817: 28.2; `x-focus-frame' causes spurious input events causes edebug not showing intermediate results Resent-From: "Farblos" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Jan 2023 21:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60817 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 60817@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16737333469551 (code B ref -1); Sat, 14 Jan 2023 21:56:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Jan 2023 21:55:46 +0000 Received: from localhost ([127.0.0.1]:55687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGoV7-0002Ty-KN for submit@debbugs.gnu.org; Sat, 14 Jan 2023 16:55:46 -0500 Received: from lists.gnu.org ([209.51.188.17]:50942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGoV3-0002Tq-VN for submit@debbugs.gnu.org; Sat, 14 Jan 2023 16:55:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGoUy-0003DQ-Ml for bug-gnu-emacs@gnu.org; Sat, 14 Jan 2023 16:55:40 -0500 Received: from mr5.vodafonemail.de ([145.253.228.165]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGoUs-0007Es-9U for bug-gnu-emacs@gnu.org; Sat, 14 Jan 2023 16:55:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1673733318; bh=JFMQxYNLyipl/w5CQUWd0CnQR7LYS6X+AcqrJI/mqwo=; h=From:To:Message-ID:Date:Subject:Content-type:From; b=qR4NC5qC1rUGExMISFBwhfyEL0x2T7IlHMi7QKtMviAq4/Sdko1hKXGl9OHKHGS3i uipJ95tly7W4LWg2RL46ttKkNeeqIBqBzO5uK5Qb67dk6zZM8lCmKgFaM38tlqP4J4 rXvH8l/Z8ob8KOEx2Rgh2wsDdNoRDslqxED+/l3Y= Received: from mp103.fra-mediabeam.com (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr5.vodafonemail.de (Postfix) with ESMTPS id 4NvXCB0x0Sz1yZd for ; Sat, 14 Jan 2023 21:55:18 +0000 (UTC) Received: from mailbackend01 (unknown [10.0.0.2]) by mp103.fra-mediabeam.com (Postfix) with ESMTP id 4NvXCB0WVkz8t5n for ; Sat, 14 Jan 2023 21:55:18 +0000 (UTC) From: "Farblos" Message-ID: <69384620685645c180d46d62042feb7d@vodafonemail.de> Date: Sat, 14 Jan 2023 22:55:15 +0100 X-Priority: 3 MIME-Version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-purgate-type: clean X-purgate: clean X-purgate-size: 15300 X-purgate-ID: 155817::1673733318-4AFFC1CD-C3ECCE97/0/0 Received-SPF: pass client-ip=145.253.228.165; envelope-from=AKFKQU.9DF7RP@vodafonemail.de; helo=mr5.vodafonemail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) This is Emacs 28=2E2 from the Debian emacs-lucid package running on fvw= m3 on Xorg=2E I guess that either the lucid toolkit or fvwm3 is part of t= he problem here, since I cannot reproduce this on a gtk3 Emacs=2E To demonstrate the problem: emacs -Q M-x find-function fundamental-mode RET C-u C-M-x ; instrument function C-x 4 b *Messages* RET ; show message buffer C-x o M-x fundamental-mode RET ; call function Then step through function `fundamental-mode' in edebug using SPC=2E While doing so I do not get the intermediate evaluation results displayed, but rather only the message "Stop"=2E My message buffer loo= ks like this after stepping through the function: fundamental-mode Stop Result: nil Stop Stop Result: nil Stop Meaning: These permanent "Stop" messages hide the intermediate results=2E I haven't found much information on this on the net, only the following thread on gnu=2Eemacs=2Ehelp: https://groups=2Egoogle=2Ecom/g/gnu=2Eemacs=2Ehelp/c/ojSN-PgNvxg The cause seems to be the call to function `x-focus-frame' in function `edebug--display-1': (if (not (memq (framep (selected-frame)) '(nil t pc))) (x-focus-frame (selected-frame))) When I instrument that snippet to (when (not (memq (framep (selected-frame)) '(nil t pc))) (message "input-pending-pre: %S" (input-pending-p)) (x-focus-frame (selected-frame)) (message "input-pending-pst: %S" (input-pending-p))) my message buffer looks like this instead: fundamental-mode input-pending-pre: t input-pending-pst: t Stop input-pending-pre: nil input-pending-pst: t Result: nil Stop input-pending-pre: nil input-pending-pst: t Stop input-pending-pre: nil input-pending-pst: t Result: nil Stop That spurious pending input caused by `x-focus-frame' triggers the following snippet later in function `edebug--display-1': (when (input-pending-p) (setq edebug-stop t) (setq edebug-execution-mode 'step) ; for `edebug-overlay-arrow' (edebug-stop)) which causes the "Stop" messages=2E The following hack works around the problem, at least most of the time, as the exact behavior also seems to depend on timing: (define-advice x-focus-frame (:after (&rest _dummy) emacs-fix) "Discards any spurious input to avoid stop events in edebug=2E" (let ((backtrace-frame (backtrace-frame 1 'x-focus-frame))) (when (and (listp backtrace-frame) (eq (nth 1 backtrace-frame) 'edebug--display-1)) ;; a little sleep seems to make work-around safer (sleep-for 0 50) (discard-input)))) If you cannot reproduce (which is rather likely) pls let me know what I should do to follow up on this=2E In GNU Emacs 28=2E2 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo ver= sion 1=2E16=2E0, Xaw3d scroll bars) of 2022-12-20, modified by Debian built on x86-csail-01 Windowing system distributor 'The X=2EOrg Foundation', version 11=2E0=2E= 12101005 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/libexec --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/28=2E2/site= -lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28=2E2/site-lis= p:/usr/share/emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --with-native-compilation --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/libexec --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/28=2E2/site= -lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28=2E2/site-lis= p:/usr/share/emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --with-native-compilation --with-x=3Dyes --with-x-toolkit=3Dlucid --with-toolkit-scroll-bars --without-gsettings 'CFLAGS=3D-g -O2 -ffile-prefix-map=3D/build/emacs-OltuXQ/emacs-28=2E2+1=3D=2E -fstack-p= rotector-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG JSON LCMS= 2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIF= Y INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XIM XPM LUCID ZLIB Important settings: value of $LC_COLLATE: POSIX value of $LC_TIME: POSIX value of $LANG: en_US=2EUTF-8 locale-coding-system: utf-8-unix Major mode: Outline Minor modes in effect: shell-dirtrack-mode: t display-time-mode: t delete-selection-mode: t tooltip-mode: t show-paren-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t Load-path shadows: ~/work/elisp/refold hides ~/etc/elisp/refold ~/work/elisp/precious-text hides ~/etc/elisp/precious-text ~/work/elisp/patch hides ~/etc/elisp/patch ~/work/elisp/bbdb-diary hides ~/etc/elisp/bbdb-diary /usr/share/emacs/site-lisp/elpa/htmlize-1=2E56/htmlize hides /usr/share= /emacs/site-lisp/elpa-src/htmlize-1=2E56/htmlize /usr/share/emacs/site-lisp/elpa/htmlize-1=2E56/htmlize-autoloads hides = /usr/share/emacs/site-lisp/elpa-src/htmlize-1=2E56/htmlize-autoloads /usr/share/emacs/site-lisp/elpa/htmlize-1=2E56/htmlize-pkg hides /usr/s= hare/emacs/site-lisp/elpa-src/htmlize-1=2E56/htmlize-pkg /usr/share/emacs/site-lisp/elpa/markdown-mode-2=2E5/markdown-mode-pkg h= ides /usr/share/emacs/site-lisp/elpa-src/markdown-mode-2=2E5/markdown-m= ode-pkg /usr/share/emacs/site-lisp/elpa/markdown-mode-2=2E5/markdown-mode hides= /usr/share/emacs/site-lisp/elpa-src/markdown-mode-2=2E5/markdown-mode /usr/share/emacs/site-lisp/elpa/markdown-mode-2=2E5/markdown-mode-autol= oads hides /usr/share/emacs/site-lisp/elpa-src/markdown-mode-2=2E5/mark= down-mode-autoloads /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-xml-common hides /usr/= share/emacs/site-lisp/elpa-src/muse-3=2E20/muse-xml-common /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-http hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-http /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-poem hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-poem /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-backlink hides /usr/sh= are/emacs/site-lisp/elpa-src/muse-3=2E20/muse-backlink /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-wiki hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-wiki /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-split hides /usr/share= /emacs/site-lisp/elpa-src/muse-3=2E20/muse-split /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-latex hides /usr/share= /emacs/site-lisp/elpa-src/muse-3=2E20/muse-latex /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-ipc hides /usr/share/e= macs/site-lisp/elpa-src/muse-3=2E20/muse-ipc /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-context hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-context /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-project hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-project /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-regexps hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-regexps /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-groff hides /usr/share= /emacs/site-lisp/elpa-src/muse-3=2E20/muse-groff /usr/share/emacs/site-lisp/elpa/muse-3=2E20/httpd hides /usr/share/emac= s/site-lisp/elpa-src/muse-3=2E20/httpd /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-pkg hides /usr/share/e= macs/site-lisp/elpa-src/muse-3=2E20/muse-pkg /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-import-xml hides /usr/= share/emacs/site-lisp/elpa-src/muse-3=2E20/muse-import-xml /usr/share/emacs/site-lisp/elpa/muse-3=2E20/cgi hides /usr/share/emacs/= site-lisp/elpa-src/muse-3=2E20/cgi /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-texinfo hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-texinfo /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-autoloads hides /usr/s= hare/emacs/site-lisp/elpa-src/muse-3=2E20/muse-autoloads /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-colors hides /usr/shar= e/emacs/site-lisp/elpa-src/muse-3=2E20/muse-colors /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse hides /usr/share/emacs= /site-lisp/elpa-src/muse-3=2E20/muse /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-import-docbook hides /= usr/share/emacs/site-lisp/elpa-src/muse-3=2E20/muse-import-docbook /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-blosxom hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-blosxom /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-mode hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-mode /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-html hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-html /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-import-latex hides /us= r/share/emacs/site-lisp/elpa-src/muse-3=2E20/muse-import-latex /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-protocols hides /usr/s= hare/emacs/site-lisp/elpa-src/muse-3=2E20/muse-protocols /usr/share/emacs/site-lisp/elpa/muse-3=2E20/htmlize-hack hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/htmlize-hack /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-xml hides /usr/share/e= macs/site-lisp/elpa-src/muse-3=2E20/muse-xml /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-message hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-message /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-protocol-iw hides /usr= /share/emacs/site-lisp/elpa-src/muse-3=2E20/muse-protocol-iw /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-latex2png hides /usr/s= hare/emacs/site-lisp/elpa-src/muse-3=2E20/muse-latex2png /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-ikiwiki hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-ikiwiki /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-mathml hides /usr/shar= e/emacs/site-lisp/elpa-src/muse-3=2E20/muse-mathml /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-cite hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-cite /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-docbook hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-docbook /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-journal hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-journal /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-book hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-book /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-publish hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-publish /usr/share/emacs/site-lisp/elpa/simple-httpd-1=2E5=2E1/simple-httpd hid= es /usr/share/emacs/site-lisp/elpa-src/simple-httpd-1=2E5=2E1/simple-ht= tpd /usr/share/emacs/site-lisp/elpa/simple-httpd-1=2E5=2E1/simple-httpd-pkg= hides /usr/share/emacs/site-lisp/elpa-src/simple-httpd-1=2E5=2E1/simpl= e-httpd-pkg /usr/share/emacs/site-lisp/elpa/simple-httpd-1=2E5=2E1/simple-httpd-aut= oloads hides /usr/share/emacs/site-lisp/elpa-src/simple-httpd-1=2E5=2E1= /simple-httpd-autoloads Features: (align compare-w diff-mode log-edit add-log bbdb-diary dabbrev log-view pcvs-util org-element avl-tree generator ol-eww eww xdg url-queue mm-ur= l ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win ol-docview doc-view image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat org-macs org-loaddefs format-spec shadow sort mail-extr emacsbug message rmc pun= y dired dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils mailheader sendmail noutline outline bbdb-mua gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr tex-mode latexenc bbdb-tex shell pcomplete files-x grep compile comint ansi-color ring rect bbdb-migrate bbdb-com pcase crm mailabbrev bbdb derived bbdb-site timezone vc-filewise ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util vc eieio-opt shortdoc text-property-search ede/speedbar ede/files ede ede/detect ede/base ede/auto ede/source eieio-base eieio-speedbar speedbar ezimage dframe eieio-custom cedet mule-util info edebug cal-coptic cal-julian help-fns radix-tree cl-print debug backtrace thingatpt misearch multi-isearch vc-dispatcher parse-time iso8601 time-date vc-cvs vc-rcs refold easy-mmode cus-edit pp cus-start wid-edit jka-compr appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs comp comp-cstr warnings rx cl-extra help-mode patch find-func time delsel cus-load server advice finder-inf bbdb-loaddefs muse-autoloads package browse-ur= l 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 subr-x map url-vars seq byte-opt gv 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/x-win x-win term/common-win x-dn= d 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 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 charscrip= t charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting font-render-setting cairo x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 704166 122624) (symbols 48 28618 68) (strings 32 126343 6802) (string-bytes 1 4754220) (vectors 16 64650) (vector-slots 8 1765583 103981) (floats 8 572 696) (intervals 56 46854 1402) (buffers 992 46)) From unknown Sun Jun 22 04:17:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60817: 28.2; `x-focus-frame' causes spurious input events causes edebug not showing intermediate results Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Jan 2023 06:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60817 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Farblos" Cc: 60817@debbugs.gnu.org Received: via spool by 60817-submit@debbugs.gnu.org id=B60817.167376384227317 (code B ref 60817); Sun, 15 Jan 2023 06:25:02 +0000 Received: (at 60817) by debbugs.gnu.org; 15 Jan 2023 06:24:02 +0000 Received: from localhost ([127.0.0.1]:55999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGwQz-00076P-J4 for submit@debbugs.gnu.org; Sun, 15 Jan 2023 01:24:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGwQx-00076C-PZ for 60817@debbugs.gnu.org; Sun, 15 Jan 2023 01:24:00 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGwQs-00044q-9K; Sun, 15 Jan 2023 01:23:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YQ5QF5amIprSf1XJq4SZzH+kqxfzKBG3LemXY3U7+Mg=; b=oeHib+7/aTd6 3ikRlyq13ChBm2UDNcCtwFi1K7O6S+h4FBrCG8tuONXPQrDKIbR2RSyELNb/3UJMYvbhOcaDuK3c4 xR8dfzju4JU+qogtoXxKdXT0RziyCJS/NJ+nqj+hHX+F7hWopk6q0wQ9dD8/05OcZnLIq+Gqc7GCA Zbcvrjo2V8MyP6vnFAAiL8QsF2HV+ysS2w7m3X98Yg6cS1+iegbQMn6f8sKRb8jB5qNGRQTFot1zk AV1JQbfia70I4Az6rHKFKS1JWo/Gnzluao8xXq2EPxBuVAbI/1TzhLLVsB5rWYJ0BhXn8o6jd7/r/ XQAWeTlrprKqcWXx3LOPBA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGwQr-0006T7-PV; Sun, 15 Jan 2023 01:23:54 -0500 Date: Sun, 15 Jan 2023 08:23:58 +0200 Message-Id: <837cxo71tt.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <69384620685645c180d46d62042feb7d@vodafonemail.de> (bug-gnu-emacs@gnu.org) References: <69384620685645c180d46d62042feb7d@vodafonemail.de> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 14 Jan 2023 22:55:15 +0100 > From: "Farblos" via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > This is Emacs 28.2 from the Debian emacs-lucid package running on fvwm3 > on Xorg. I guess that either the lucid toolkit or fvwm3 is part of the > problem here, since I cannot reproduce this on a gtk3 Emacs. > > To demonstrate the problem: > > emacs -Q > M-x find-function fundamental-mode RET > C-u C-M-x ; instrument function > C-x 4 b *Messages* RET ; show message buffer > C-x o > M-x fundamental-mode RET ; call function > > Then step through function `fundamental-mode' in edebug using SPC. > While doing so I do not get the intermediate evaluation results > displayed, but rather only the message "Stop". My message buffer looks > like this after stepping through the function: > > fundamental-mode > Stop > > Result: nil > Stop > > Stop > > Result: nil > Stop > > Meaning: These permanent "Stop" messages hide the intermediate > results. I haven't found much information on this on the net, > only the following thread on gnu.emacs.help: > > https://groups.google.com/g/gnu.emacs.help/c/ojSN-PgNvxg > > The cause seems to be the call to function `x-focus-frame' in > function `edebug--display-1': > > (if (not (memq (framep (selected-frame)) '(nil t pc))) > (x-focus-frame (selected-frame))) > > When I instrument that snippet to > > (when (not (memq (framep (selected-frame)) '(nil t pc))) > (message "input-pending-pre: %S" (input-pending-p)) > (x-focus-frame (selected-frame)) > (message "input-pending-pst: %S" (input-pending-p))) > > my message buffer looks like this instead: > > fundamental-mode > input-pending-pre: t > input-pending-pst: t > Stop > > input-pending-pre: nil > input-pending-pst: t > Result: nil > Stop > > input-pending-pre: nil > input-pending-pst: t > Stop > > input-pending-pre: nil > input-pending-pst: t > Result: nil > Stop > > That spurious pending input caused by `x-focus-frame' triggers > the following snippet later in function `edebug--display-1': > > (when (input-pending-p) > (setq edebug-stop t) > (setq edebug-execution-mode 'step) ; for `edebug-overlay-arrow' > (edebug-stop)) > > which causes the "Stop" messages. AFAIU, input-pending-p should filter out focus events, so I don't think I understand why you see this. Can you try this in Emacs 29 or the master branch of the Emacs Git repository, so we make sure this problem was not fixed already? If it still happens in those newer versions, maybe you can step with GDB through get_input_pending, when it's called from input-pending-p, and through readable_events called by get_input_pending, and see why focus events aren't filtered out? From unknown Sun Jun 22 04:17:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60817: 28.2; `x-focus-frame' causes spurious input events causes edebug not showing intermediate results Resent-From: Farblos Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Jan 2023 20:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60817 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 60817@debbugs.gnu.org Received: via spool by 60817-submit@debbugs.gnu.org id=B60817.167433144922184 (code B ref 60817); Sat, 21 Jan 2023 20:05:01 +0000 Received: (at 60817) by debbugs.gnu.org; 21 Jan 2023 20:04:09 +0000 Received: from localhost ([127.0.0.1]:49835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJK5w-0005lj-K0 for submit@debbugs.gnu.org; Sat, 21 Jan 2023 15:04:08 -0500 Received: from mr3.vodafonemail.de ([145.253.228.163]:59096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJK5u-0005l7-8g for 60817@debbugs.gnu.org; Sat, 21 Jan 2023 15:04:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1674331440; bh=LfBSdpHWnya6I3Xj3D9fSpDzKejBBvEp2AuEPuYoT18=; h=Message-ID:Date:User-Agent:Subject:To:References:Content-Language: From:In-Reply-To:Content-Type:From; b=fmU02TzfIN3vxTOxr/vVLrY50ejll9Ro/mxXeybaCBIq1ij/c5YnXFi+sb3OmQqIR 1tO/JkvswLeYTfH6MtXeeoKLhRAjZMs7bngVZzk2UqxqqFXJQjFSvPRqn6iGqnRe0d 2Mn8XdPjH21O8r7DjvemTwanpQYEbIKmI926JFTk= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr3.vodafonemail.de (Postfix) with ESMTPS id 4NznPW6D4Pz1ypL; Sat, 21 Jan 2023 20:03:57 +0000 (UTC) Received: from [192.168.178.42] (port-92-194-150-6.dynamic.as20676.net [92.194.150.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4NznPK5KHMz9rwj; Sat, 21 Jan 2023 20:03:46 +0000 (UTC) Message-ID: <4c47a431-4661-4a94-9cd7-267df5430946@vodafonemail.de> Date: Sat, 21 Jan 2023 21:03:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 References: <69384620685645c180d46d62042feb7d@vodafonemail.de> <837cxo71tt.fsf@gnu.org> Content-Language: de-DE-frami From: Farblos In-Reply-To: <837cxo71tt.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate: clean X-purgate-size: 1447 X-purgate-ID: 155817::1674331433-D2FFC404-269C59D7/0/0 X-Spam-Score: -1.8 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) On 2023-01-15 07:23, Eli Zaretskii wrote: > AFAIU, input-pending-p should filter out focus events, so I don't > think I understand why you see this. Can you try this in Emacs 29 or > the master branch of the Emacs Git repository, so we make sure this > problem was not fixed already? If it still happens in those newer > versions, maybe you can step with GDB through get_input_pending, when > it's called from input-pending-p, and through readable_events called > by get_input_pending, and see why focus events aren't filtered out? I used printf debugging and, admittedly, even back in Emacs 27 for now, since I have the Debian toolchain ready for that. I reduced the test case to this: (defun testcase () (interactive) (message "pre: %S" (input-pending-p)) (x-focus-frame (selected-frame)) (sleep-for 0.5) (message "pst: %S" (input-pending-p))) The error ("pst: t") reproduces only after touching some part of the modeline that provides a tooltip. And the offending event that causes `input-pending-p' to become t is *not* a focus event (I can see indeed these getting filtered in readable_events) but rather a HELP_EVENT. So as soon as one has touched the modeline, the call to `x-focus-frame' produces these HELP_EVENTS. Does that ring a bell? Any new directions where I should look at? I'll try setting up a build environment for a newer Emacs when I find the time to do so. From unknown Sun Jun 22 04:17:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60817: 28.2; `x-focus-frame' causes spurious input events causes edebug not showing intermediate results Resent-From: Farblos Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Jan 2023 21:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60817 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 60817@debbugs.gnu.org Received: via spool by 60817-submit@debbugs.gnu.org id=B60817.167433700217020 (code B ref 60817); Sat, 21 Jan 2023 21:37:02 +0000 Received: (at 60817) by debbugs.gnu.org; 21 Jan 2023 21:36:42 +0000 Received: from localhost ([127.0.0.1]:49980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJLXV-0004QS-Ti for submit@debbugs.gnu.org; Sat, 21 Jan 2023 16:36:42 -0500 Received: from mr6.vodafonemail.de ([145.253.228.166]:48662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJLXU-0004QG-9Z for 60817@debbugs.gnu.org; Sat, 21 Jan 2023 16:36:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1674336994; bh=/yrTy1uZZuCRIacgoZfm7CQhBUv90f5iUQgByED6L2E=; h=Message-ID:Date:User-Agent:Subject:Content-Language:From:To: References:In-Reply-To:Content-Type:From; b=JUG2z75HzNDA+nMLOUhRXTXDpaQpegcBv7nne2scY5zpvHQPg6kpreVX0dUSlGMC6 lwzXmhWMxAJ1ZhFEkUp9UD4iVT3lYWs05Si2bdUuEJ5JDaZ45btSS9nyW9dTMBTxSd XE1s31UF3ybAfo3Tbnb1Gaa2/tMWk9SBkP6U4j/U= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr6.vodafonemail.de (Postfix) with ESMTPS id 4NzqSL5n6Pz1yDf; Sat, 21 Jan 2023 21:36:32 +0000 (UTC) Received: from [192.168.178.42] (port-92-194-150-6.dynamic.as20676.net [92.194.150.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4NzqS83hbCzKn3p; Sat, 21 Jan 2023 21:36:21 +0000 (UTC) Message-ID: <25376940-6fb8-bca1-962a-1df3424a2554@vodafonemail.de> Date: Sat, 21 Jan 2023 22:36:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Content-Language: de-DE-frami, en-US From: Farblos References: <69384620685645c180d46d62042feb7d@vodafonemail.de> <837cxo71tt.fsf@gnu.org> <4c47a431-4661-4a94-9cd7-267df5430946@vodafonemail.de> In-Reply-To: <4c47a431-4661-4a94-9cd7-267df5430946@vodafonemail.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-purgate-type: clean X-purgate: clean X-purgate-size: 724 X-purgate-ID: 155817::1674336987-B27FB4F8-4BBB06A4/0/0 X-Spam-Score: -1.8 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) On 2023-01-21 21:03, Farblos wrote: > I used printf debugging and, admittedly, even back in Emacs 27 for now, > since I have the Debian toolchain ready for that.  I reduced the test > case to this: Bit the bullet and cloned master, compiled it, and: Bug *does not* reproduce. Only after seeing that HELP_EVENT in Emacs 27 I understood that hovering over the modeline is a necessary precondition to reliably reproduce this issue. So without debugging in Emacs 27 I wouldn't have been able to ensure that the bug is gone in master ... Feel free to close this issue. Optionally: If you happen to have an explanation why this bug is gone, I'd really appreciate that. Thanks for developing Emacs! From unknown Sun Jun 22 04:17:18 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Farblos" Subject: bug#60817: closed (Re: bug#60817: 28.2; `x-focus-frame' causes spurious input events causes edebug not showing intermediate results) Message-ID: References: <83v8ktenyp.fsf@gnu.org> <69384620685645c180d46d62042feb7d@vodafonemail.de> X-Gnu-PR-Message: they-closed 60817 X-Gnu-PR-Package: emacs Reply-To: 60817@debbugs.gnu.org Date: Thu, 26 Jan 2023 07:48:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1674719282-21919-1" This is a multi-part message in MIME format... ------------=_1674719282-21919-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #60817: 28.2; `x-focus-frame' causes spurious input events causes edebug no= t showing intermediate results which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 60817@debbugs.gnu.org. --=20 60817: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D60817 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1674719282-21919-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 60817-done) by debbugs.gnu.org; 26 Jan 2023 07:47:52 +0000 Received: from localhost ([127.0.0.1]:60531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKwz9-0005gH-Vv for submit@debbugs.gnu.org; Thu, 26 Jan 2023 02:47:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKwz8-0005fL-5b for 60817-done@debbugs.gnu.org; Thu, 26 Jan 2023 02:47:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKwz1-0001Yn-Tx; Thu, 26 Jan 2023 02:47:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=UyLn0lKD7voT7TF1hBypIg3yd4kZFNVVlA4B5bR0K9M=; b=FGiqO1mTLWGm3586fEdP VWdU5HB083wwYC9kqcvMYhXD54/dIfT/ONkSfRBpEiMPsti5J39zr1sSVrjwmALscsMvJTeAz95Pw egf7H2aI6GvlPUK6RUTJkGA2xbbwSeK5jLkdl7ADCnorBqHM5K+/h5hdhOnNT+SLMAOK+cAQ9DLGE RgtKzixWVeniJ9ab3fvGJMD3o22u7De19rDU9KtSyK7TvLTo/oOHb/oYBBMU57u/zInxDF/GR5FVk qTz85n+7QU7eVaYzvugDldWwXmkmWuPsOtHhRv6S3Lc6pIa2WlG1cxGV9Ovfn4ehd89IhoSNr45LJ R3rP50qc6o4Aeg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKwz0-00042d-89; Thu, 26 Jan 2023 02:47:43 -0500 Date: Thu, 26 Jan 2023 09:47:58 +0200 Message-Id: <83v8ktenyp.fsf@gnu.org> From: Eli Zaretskii To: Farblos In-Reply-To: <25376940-6fb8-bca1-962a-1df3424a2554@vodafonemail.de> (message from Farblos on Sat, 21 Jan 2023 22:36:16 +0100) Subject: Re: bug#60817: 28.2; `x-focus-frame' causes spurious input events causes edebug not showing intermediate results References: <69384620685645c180d46d62042feb7d@vodafonemail.de> <837cxo71tt.fsf@gnu.org> <4c47a431-4661-4a94-9cd7-267df5430946@vodafonemail.de> <25376940-6fb8-bca1-962a-1df3424a2554@vodafonemail.de> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60817-done Cc: 60817-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 21 Jan 2023 22:36:16 +0100 > From: Farblos > Cc: 60817@debbugs.gnu.org > > On 2023-01-21 21:03, Farblos wrote: > > I used printf debugging and, admittedly, even back in Emacs 27 for now, > > since I have the Debian toolchain ready for that.  I reduced the test > > case to this: > > Bit the bullet and cloned master, compiled it, and: Bug *does not* > reproduce. > > Only after seeing that HELP_EVENT in Emacs 27 I understood that hovering > over the modeline is a necessary precondition to reliably reproduce this > issue. So without debugging in Emacs 27 I wouldn't have been able to > ensure that the bug is gone in master ... > > Feel free to close this issue. Optionally: If you happen to have an > explanation why this bug is gone, I'd really appreciate that. I'm afraid I don't know what change fixed this, and the problem doesn't reproduce in my configuration, so I have difficulty trying this out in different versions to try to answer that question. So I'll just close the bug. Thanks for testing the current codebase. ------------=_1674719282-21919-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Jan 2023 21:55:46 +0000 Received: from localhost ([127.0.0.1]:55687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGoV7-0002Ty-KN for submit@debbugs.gnu.org; Sat, 14 Jan 2023 16:55:46 -0500 Received: from lists.gnu.org ([209.51.188.17]:50942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGoV3-0002Tq-VN for submit@debbugs.gnu.org; Sat, 14 Jan 2023 16:55:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGoUy-0003DQ-Ml for bug-gnu-emacs@gnu.org; Sat, 14 Jan 2023 16:55:40 -0500 Received: from mr5.vodafonemail.de ([145.253.228.165]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGoUs-0007Es-9U for bug-gnu-emacs@gnu.org; Sat, 14 Jan 2023 16:55:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1673733318; bh=JFMQxYNLyipl/w5CQUWd0CnQR7LYS6X+AcqrJI/mqwo=; h=From:To:Message-ID:Date:Subject:Content-type:From; b=qR4NC5qC1rUGExMISFBwhfyEL0x2T7IlHMi7QKtMviAq4/Sdko1hKXGl9OHKHGS3i uipJ95tly7W4LWg2RL46ttKkNeeqIBqBzO5uK5Qb67dk6zZM8lCmKgFaM38tlqP4J4 rXvH8l/Z8ob8KOEx2Rgh2wsDdNoRDslqxED+/l3Y= Received: from mp103.fra-mediabeam.com (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr5.vodafonemail.de (Postfix) with ESMTPS id 4NvXCB0x0Sz1yZd for ; Sat, 14 Jan 2023 21:55:18 +0000 (UTC) Received: from mailbackend01 (unknown [10.0.0.2]) by mp103.fra-mediabeam.com (Postfix) with ESMTP id 4NvXCB0WVkz8t5n for ; Sat, 14 Jan 2023 21:55:18 +0000 (UTC) From: "Farblos" To: bug-gnu-emacs@gnu.org Message-ID: <69384620685645c180d46d62042feb7d@vodafonemail.de> Date: Sat, 14 Jan 2023 22:55:15 +0100 X-Priority: 3 Subject: 28.2; `x-focus-frame' causes spurious input events causes edebug not showing intermediate results MIME-Version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-purgate-type: clean X-purgate: clean X-purgate-size: 15300 X-purgate-ID: 155817::1673733318-4AFFC1CD-C3ECCE97/0/0 Received-SPF: pass client-ip=145.253.228.165; envelope-from=AKFKQU.9DF7RP@vodafonemail.de; helo=mr5.vodafonemail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) This is Emacs 28=2E2 from the Debian emacs-lucid package running on fvw= m3 on Xorg=2E I guess that either the lucid toolkit or fvwm3 is part of t= he problem here, since I cannot reproduce this on a gtk3 Emacs=2E To demonstrate the problem: emacs -Q M-x find-function fundamental-mode RET C-u C-M-x ; instrument function C-x 4 b *Messages* RET ; show message buffer C-x o M-x fundamental-mode RET ; call function Then step through function `fundamental-mode' in edebug using SPC=2E While doing so I do not get the intermediate evaluation results displayed, but rather only the message "Stop"=2E My message buffer loo= ks like this after stepping through the function: fundamental-mode Stop Result: nil Stop Stop Result: nil Stop Meaning: These permanent "Stop" messages hide the intermediate results=2E I haven't found much information on this on the net, only the following thread on gnu=2Eemacs=2Ehelp: https://groups=2Egoogle=2Ecom/g/gnu=2Eemacs=2Ehelp/c/ojSN-PgNvxg The cause seems to be the call to function `x-focus-frame' in function `edebug--display-1': (if (not (memq (framep (selected-frame)) '(nil t pc))) (x-focus-frame (selected-frame))) When I instrument that snippet to (when (not (memq (framep (selected-frame)) '(nil t pc))) (message "input-pending-pre: %S" (input-pending-p)) (x-focus-frame (selected-frame)) (message "input-pending-pst: %S" (input-pending-p))) my message buffer looks like this instead: fundamental-mode input-pending-pre: t input-pending-pst: t Stop input-pending-pre: nil input-pending-pst: t Result: nil Stop input-pending-pre: nil input-pending-pst: t Stop input-pending-pre: nil input-pending-pst: t Result: nil Stop That spurious pending input caused by `x-focus-frame' triggers the following snippet later in function `edebug--display-1': (when (input-pending-p) (setq edebug-stop t) (setq edebug-execution-mode 'step) ; for `edebug-overlay-arrow' (edebug-stop)) which causes the "Stop" messages=2E The following hack works around the problem, at least most of the time, as the exact behavior also seems to depend on timing: (define-advice x-focus-frame (:after (&rest _dummy) emacs-fix) "Discards any spurious input to avoid stop events in edebug=2E" (let ((backtrace-frame (backtrace-frame 1 'x-focus-frame))) (when (and (listp backtrace-frame) (eq (nth 1 backtrace-frame) 'edebug--display-1)) ;; a little sleep seems to make work-around safer (sleep-for 0 50) (discard-input)))) If you cannot reproduce (which is rather likely) pls let me know what I should do to follow up on this=2E In GNU Emacs 28=2E2 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo ver= sion 1=2E16=2E0, Xaw3d scroll bars) of 2022-12-20, modified by Debian built on x86-csail-01 Windowing system distributor 'The X=2EOrg Foundation', version 11=2E0=2E= 12101005 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/libexec --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/28=2E2/site= -lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28=2E2/site-lis= p:/usr/share/emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --with-native-compilation --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/libexec --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/28=2E2/site= -lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28=2E2/site-lis= p:/usr/share/emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --with-native-compilation --with-x=3Dyes --with-x-toolkit=3Dlucid --with-toolkit-scroll-bars --without-gsettings 'CFLAGS=3D-g -O2 -ffile-prefix-map=3D/build/emacs-OltuXQ/emacs-28=2E2+1=3D=2E -fstack-p= rotector-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG JSON LCMS= 2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIF= Y INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XIM XPM LUCID ZLIB Important settings: value of $LC_COLLATE: POSIX value of $LC_TIME: POSIX value of $LANG: en_US=2EUTF-8 locale-coding-system: utf-8-unix Major mode: Outline Minor modes in effect: shell-dirtrack-mode: t display-time-mode: t delete-selection-mode: t tooltip-mode: t show-paren-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t Load-path shadows: ~/work/elisp/refold hides ~/etc/elisp/refold ~/work/elisp/precious-text hides ~/etc/elisp/precious-text ~/work/elisp/patch hides ~/etc/elisp/patch ~/work/elisp/bbdb-diary hides ~/etc/elisp/bbdb-diary /usr/share/emacs/site-lisp/elpa/htmlize-1=2E56/htmlize hides /usr/share= /emacs/site-lisp/elpa-src/htmlize-1=2E56/htmlize /usr/share/emacs/site-lisp/elpa/htmlize-1=2E56/htmlize-autoloads hides = /usr/share/emacs/site-lisp/elpa-src/htmlize-1=2E56/htmlize-autoloads /usr/share/emacs/site-lisp/elpa/htmlize-1=2E56/htmlize-pkg hides /usr/s= hare/emacs/site-lisp/elpa-src/htmlize-1=2E56/htmlize-pkg /usr/share/emacs/site-lisp/elpa/markdown-mode-2=2E5/markdown-mode-pkg h= ides /usr/share/emacs/site-lisp/elpa-src/markdown-mode-2=2E5/markdown-m= ode-pkg /usr/share/emacs/site-lisp/elpa/markdown-mode-2=2E5/markdown-mode hides= /usr/share/emacs/site-lisp/elpa-src/markdown-mode-2=2E5/markdown-mode /usr/share/emacs/site-lisp/elpa/markdown-mode-2=2E5/markdown-mode-autol= oads hides /usr/share/emacs/site-lisp/elpa-src/markdown-mode-2=2E5/mark= down-mode-autoloads /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-xml-common hides /usr/= share/emacs/site-lisp/elpa-src/muse-3=2E20/muse-xml-common /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-http hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-http /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-poem hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-poem /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-backlink hides /usr/sh= are/emacs/site-lisp/elpa-src/muse-3=2E20/muse-backlink /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-wiki hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-wiki /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-split hides /usr/share= /emacs/site-lisp/elpa-src/muse-3=2E20/muse-split /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-latex hides /usr/share= /emacs/site-lisp/elpa-src/muse-3=2E20/muse-latex /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-ipc hides /usr/share/e= macs/site-lisp/elpa-src/muse-3=2E20/muse-ipc /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-context hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-context /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-project hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-project /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-regexps hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-regexps /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-groff hides /usr/share= /emacs/site-lisp/elpa-src/muse-3=2E20/muse-groff /usr/share/emacs/site-lisp/elpa/muse-3=2E20/httpd hides /usr/share/emac= s/site-lisp/elpa-src/muse-3=2E20/httpd /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-pkg hides /usr/share/e= macs/site-lisp/elpa-src/muse-3=2E20/muse-pkg /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-import-xml hides /usr/= share/emacs/site-lisp/elpa-src/muse-3=2E20/muse-import-xml /usr/share/emacs/site-lisp/elpa/muse-3=2E20/cgi hides /usr/share/emacs/= site-lisp/elpa-src/muse-3=2E20/cgi /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-texinfo hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-texinfo /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-autoloads hides /usr/s= hare/emacs/site-lisp/elpa-src/muse-3=2E20/muse-autoloads /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-colors hides /usr/shar= e/emacs/site-lisp/elpa-src/muse-3=2E20/muse-colors /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse hides /usr/share/emacs= /site-lisp/elpa-src/muse-3=2E20/muse /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-import-docbook hides /= usr/share/emacs/site-lisp/elpa-src/muse-3=2E20/muse-import-docbook /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-blosxom hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-blosxom /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-mode hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-mode /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-html hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-html /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-import-latex hides /us= r/share/emacs/site-lisp/elpa-src/muse-3=2E20/muse-import-latex /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-protocols hides /usr/s= hare/emacs/site-lisp/elpa-src/muse-3=2E20/muse-protocols /usr/share/emacs/site-lisp/elpa/muse-3=2E20/htmlize-hack hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/htmlize-hack /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-xml hides /usr/share/e= macs/site-lisp/elpa-src/muse-3=2E20/muse-xml /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-message hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-message /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-protocol-iw hides /usr= /share/emacs/site-lisp/elpa-src/muse-3=2E20/muse-protocol-iw /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-latex2png hides /usr/s= hare/emacs/site-lisp/elpa-src/muse-3=2E20/muse-latex2png /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-ikiwiki hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-ikiwiki /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-mathml hides /usr/shar= e/emacs/site-lisp/elpa-src/muse-3=2E20/muse-mathml /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-cite hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-cite /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-docbook hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-docbook /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-journal hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-journal /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-book hides /usr/share/= emacs/site-lisp/elpa-src/muse-3=2E20/muse-book /usr/share/emacs/site-lisp/elpa/muse-3=2E20/muse-publish hides /usr/sha= re/emacs/site-lisp/elpa-src/muse-3=2E20/muse-publish /usr/share/emacs/site-lisp/elpa/simple-httpd-1=2E5=2E1/simple-httpd hid= es /usr/share/emacs/site-lisp/elpa-src/simple-httpd-1=2E5=2E1/simple-ht= tpd /usr/share/emacs/site-lisp/elpa/simple-httpd-1=2E5=2E1/simple-httpd-pkg= hides /usr/share/emacs/site-lisp/elpa-src/simple-httpd-1=2E5=2E1/simpl= e-httpd-pkg /usr/share/emacs/site-lisp/elpa/simple-httpd-1=2E5=2E1/simple-httpd-aut= oloads hides /usr/share/emacs/site-lisp/elpa-src/simple-httpd-1=2E5=2E1= /simple-httpd-autoloads Features: (align compare-w diff-mode log-edit add-log bbdb-diary dabbrev log-view pcvs-util org-element avl-tree generator ol-eww eww xdg url-queue mm-ur= l ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win ol-docview doc-view image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat org-macs org-loaddefs format-spec shadow sort mail-extr emacsbug message rmc pun= y dired dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils mailheader sendmail noutline outline bbdb-mua gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr tex-mode latexenc bbdb-tex shell pcomplete files-x grep compile comint ansi-color ring rect bbdb-migrate bbdb-com pcase crm mailabbrev bbdb derived bbdb-site timezone vc-filewise ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util vc eieio-opt shortdoc text-property-search ede/speedbar ede/files ede ede/detect ede/base ede/auto ede/source eieio-base eieio-speedbar speedbar ezimage dframe eieio-custom cedet mule-util info edebug cal-coptic cal-julian help-fns radix-tree cl-print debug backtrace thingatpt misearch multi-isearch vc-dispatcher parse-time iso8601 time-date vc-cvs vc-rcs refold easy-mmode cus-edit pp cus-start wid-edit jka-compr appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs comp comp-cstr warnings rx cl-extra help-mode patch find-func time delsel cus-load server advice finder-inf bbdb-loaddefs muse-autoloads package browse-ur= l 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 subr-x map url-vars seq byte-opt gv 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/x-win x-win term/common-win x-dn= d 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 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 charscrip= t charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting font-render-setting cairo x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 704166 122624) (symbols 48 28618 68) (strings 32 126343 6802) (string-bytes 1 4754220) (vectors 16 64650) (vector-slots 8 1765583 103981) (floats 8 572 696) (intervals 56 46854 1402) (buffers 992 46)) ------------=_1674719282-21919-1--