From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 02 07:30:54 2025 Received: (at submit) by debbugs.gnu.org; 2 Sep 2025 11:30:54 +0000 Received: from localhost ([127.0.0.1]:60637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1utPDx-0000UG-R8 for submit@debbugs.gnu.org; Tue, 02 Sep 2025 07:30:54 -0400 Received: from lists.gnu.org ([2001:470:142::17]:52570) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1utPDu-0000Ai-Qy for submit@debbugs.gnu.org; Tue, 02 Sep 2025 07:30:51 -0400 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 1utPDo-00035o-8y for bug-gnu-emacs@gnu.org; Tue, 02 Sep 2025 07:30:44 -0400 Received: from mr4.vodafonemail.de ([145.253.228.164]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utPDj-0000ya-Ds for bug-gnu-emacs@gnu.org; Tue, 02 Sep 2025 07:30:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-23sep; t=1756812630; bh=ZtJlzWsQnBZzk371Cyv5imgxMXQIGtDqVotfU+X6X/o=; h=Message-ID:Date:User-Agent:From:Content-Language:To:Subject: Content-Type:From; b=KH+f0IfH/TZPptsAKmqcz2CRYM7Ca3KPAbswShFz+TlNJB12NsENibgE3pecnU6C9 fY2NYWKo+advoTzMl5v4nLCvHuSlEfUFAhsL71RXnKjaREelPZ/w92Z59BXdtzyzC+ cvjkqbLy63WS9Ich6X9kMtrPgofCLwDEyT2Pla1E= 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 mr4.vodafonemail.de (Postfix) with ESMTPS id 4cGNpG2LZ7z1y18 for ; Tue, 2 Sep 2025 11:30:30 +0000 (UTC) Received: from [10.51.106.92] (tmo-082-78.customers.d1-online.com [80.187.82.78]) (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 4cGNp93Hzrz90r5 for ; Tue, 2 Sep 2025 11:30:22 +0000 (UTC) Message-ID: <89847696-da5b-425d-9048-f88c51c84321@vodafonemail.de> Date: Tue, 2 Sep 2025 13:30:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Jens Schmidt Content-Language: de-DE-frami, en-US To: bug-gnu-emacs@gnu.org Subject: 31.0.50; exiting a recursive isearch through an error keeps isearch map active Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate: clean X-purgate-size: 4600 X-purgate-ID: 155817::1756812626-6B5335CF-FEC3576A/0/0 Received-SPF: pass client-ip=145.253.228.164; envelope-from=jschmidt4gnu@vodafonemail.de; helo=mr4.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) 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: -1.0 (-) X-Debbugs-Cc: Juri Linkov Start off an "emacs -Q" with the following sequence: #+begin_example C-s ;; isearch-forward M-e ;; isearch-edit-string C-x o ;; other-window C-s ;; isearch-forward M-e ;; isearch-edit-string #+end_example That results in an error #+begin_example isearch-edit-string: Command attempted to use minibuffer while in minibuffer #+end_example which is expected. However, any self-inserting key presses after that reactivate isearch mode. C-g or ESC ESC ESC do not help to escape that state. The minibuffer window cannot be selected with C-x o, either, to get back to the isearch prompt. A C-h b in that state reveals that the isearch mode bindings are still active. I remember having seen a report on emacs-devel about a similar issue, IIRC it was related to isearch during an edebug sesssion. Might be related or not. Emacs 28 does not seem to be affected by this issue, or at least not that gravely: It somehow seems to get rid of the recursive isearches in a more graceful manner. Other Emacs versions I haven't tried. Backing out commit 6760cedc5e0e8dc2a49d3d13e54f5f153df5a3d0 seems to "fix" this issue as well. In GNU Emacs 31.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2025-09-02 built on sappc2 Repository revision: 66ef930ebea4618c1dac71a09495766476ced1d6 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12201009 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --with-native-compilation --with-mailutils' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB Important settings: value of $LC_COLLATE: POSIX value of $LC_TIME: POSIX value of $LANG: en_US.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 eldoc-mode: t show-paren-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 minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr compile comint ansi-osc ansi-color ring comp-run bytecomp byte-compile comp-common rx emacsbug lisp-mnt message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen 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 seq simple cl-generic indonesian philippine 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 theme-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 lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process tty-child-frames native-compile emacs) Memory information: ((conses 16 65894 9755) (symbols 48 6839 0) (strings 32 17084 1981) (string-bytes 1 541088) (vectors 16 11097) (vector-slots 8 152107 3492) (floats 8 22 13) (intervals 56 250 0) (buffers 984 11)) From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 03 02:52:26 2025 Received: (at 79368) by debbugs.gnu.org; 3 Sep 2025 06:52:26 +0000 Received: from localhost ([127.0.0.1]:38031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uthM2-0000hO-EO for submit@debbugs.gnu.org; Wed, 03 Sep 2025 02:52:26 -0400 Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]:57540) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uthLy-0000gx-Td; Wed, 03 Sep 2025 02:52:24 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4cGtZh2ftvz9t0f; Wed, 3 Sep 2025 08:52:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1756882332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Zo/EjM4UeSO1GDiGAvJVgIoxf/OQacQNtRlhIxDCQ1g=; b=gvucP8EuYAuBf3MOJIAlelAAuUJ9awoHNhaqmQd8hKXEzzRcqBTskrSbSuglN09Bi4YTeQ SFZ7x7MsipOz4HAbhQGeTeBY7UnjK6UPxzeBhlvJN/es7uPpwW8t7JRNqxMe+crz9jJtmU rfvcA7T2+cIeVfna6bl7b9s/gbPM8Jydd6uCeTMGxsYZMsr4Hj4DVA1GT+SHw4ryhUCHQS eEnham5PNdrYwR7oxjnPuhMm8bGHj6U40DQVGoOr/pYXmJ9rna02O96q/YNLiUnjgiwVuF Tp8XsdRBKfM12nps6Z8uIE257OvhHOnuZ/Z8ASPzKfvwZ6Y4/ojXPkJClWrRJg== From: Juri Linkov To: Jens Schmidt Subject: Re: bug#79368: 31.0.50; exiting a recursive isearch through an error keeps isearch map active In-Reply-To: <89847696-da5b-425d-9048-f88c51c84321@vodafonemail.de> Organization: LINKOV.NET References: <89847696-da5b-425d-9048-f88c51c84321@vodafonemail.de> Date: Wed, 03 Sep 2025 09:45:54 +0300 Message-ID: <874itknie5.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79368 Cc: 79368@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: -1.7 (-) close 79368 31.0.50 thanks > However, any self-inserting key presses after that reactivate > isearch mode. C-g or ESC ESC ESC do not help to escape that > state. The minibuffer window cannot be selected with C-x o, > either, to get back to the isearch prompt. > > A C-h b in that state reveals that the isearch mode bindings > are still active. I remember having seen a report on > emacs-devel about a similar issue, IIRC it was related to > isearch during an edebug sesssion. Might be related or not. Thanks for the bug report. The problem is that when 'read-from-minibuffer' in 'isearch-edit-string' raises an error because of recursive minibuffers, then in 'with-isearch-suspended' the unwind form is called twice in a row, and 'isearch-mode' is called twice. But 'isearch-mode' overrides the original 'overriding-terminal-local-map' on the second call. So after (progn (isearch-mode t) (isearch-mode t) (isearch-done)) 'isearch-done' restored a wrong map. Now 'isearch-mode' is fixed to protect from multiple calls.