From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#71927: 29.4; ibuffer-do-isearch and ibuffer-do-isearch-regexp not prompting for input Date: Thu, 04 Jul 2024 17:09:13 +0200 Message-ID: <87zfqx5h46.fsf@gmx.net> References: <86ikxltzhx.fsf@mail.linkov.net> <861q49a8vt.fsf@gnu.org> <86y16h8olf.fsf@gnu.org> <878qyh79ov.fsf@gmx.net> <86v81l8gnj.fsf@gnu.org> <874j95706i.fsf@gmx.net> <86o77d8cv8.fsf@gnu.org> Reply-To: Stephen Berman Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36170"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: jpw@gnu.org, juri@linkov.net, me@eshelyaron.com, basil@contovou.net, 71927@debbugs.gnu.org, kickingvegas@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 04 17:10:27 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sPO6M-000980-AB for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Jul 2024 17:10:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPO5x-0004HB-1O; Thu, 04 Jul 2024 11:10:01 -0400 Original-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 1sPO5v-0004FN-Jc for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2024 11:09:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPO5v-0000Yf-Ao for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2024 11:09:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sPO5x-0004Mw-O2 for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2024 11:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Jul 2024 15:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71927 X-GNU-PR-Package: emacs Original-Received: via spool by 71927-submit@debbugs.gnu.org id=B71927.172010577916733 (code B ref 71927); Thu, 04 Jul 2024 15:10:01 +0000 Original-Received: (at 71927) by debbugs.gnu.org; 4 Jul 2024 15:09:39 +0000 Original-Received: from localhost ([127.0.0.1]:42707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPO5a-0004Lo-S0 for submit@debbugs.gnu.org; Thu, 04 Jul 2024 11:09:39 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:57535) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPO5S-0004LU-IR for 71927@debbugs.gnu.org; Thu, 04 Jul 2024 11:09:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1720105756; x=1720710556; i=stephen.berman@gmx.net; bh=Q6w797yv2hYCzx3vqMgMdzqBvMj4xnKl+5T1mO+vtqw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=sllQJcBqc9I7S8RRPJmVBNPhIUOrrwPtcntHr17EoYPRYRq9zDSiWCAu+e9PFpaC UgXG9KbvGRIUkHvcRszguaah/XWaGpFx/Ch5ATj9qPekp+iPCCPnCdthfRzlBkqYW Kak17Dw7g+6FLmNm4sJJZKggWPIz/LK/85vtlKbs4AEGzBWucc/JeMScyPMI3cx5J 3DUVpRVTF+XLpcmrC7Y/+JSvKgQKtv2Aa8B2NPPy9kmWzcqY5Ewroz0OBwJWq1trt 2ZDAEaPax0GgTbsZJfb/+TPh2nb9jgKH7tty8cHhjT7dlRTrcECKcgY3KyvNJEg2i k7TJPAFEhfXQQENTnA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs ([88.130.48.103]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MhlGk-1ruR2q0lzE-00fK8Q; Thu, 04 Jul 2024 17:09:16 +0200 In-Reply-To: <86o77d8cv8.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 04 Jul 2024 17:12:43 +0300") X-Provags-ID: V03:K1:RhjSpkrB8d54hhOpbeLKub3UsWO2XKy/GIuJZ+/oXpzlxzIAubS MW1OU5gt+NJHsfpV2pPzUba2j/d7jXeSdwyo6H5t5LmWtlzz8vZIKxzfj+UyCSqRIiLK+3n vxLJVERYRUQ8yvkohuya1w7DsucT8CqyWse3MI7xei7ADd22cvrMoM9QA7mru7usKq+Q6WY 8a9GRtd50M3FmV5JUExzA== UI-OutboundReport: notjunk:1;M01:P0:wYU84k9d0Zc=;7OdHvQfea0lAdA5qG9YCQWU2Ltx rBDCP5eSVZf7bXyBalnP00abEsUhM/KKTdIp6sJQXJQl9JWGe3xApCFJLw2UBY1tkAhtsNGW6 r1owikwZNcpwG+DG6ABoxjvNncITiFN8UNwwigXUrGfsm6WJCCoGxKKXCWAk9ZUD0CM82YyPs 8Lx9qvuSdOxeSXrzYe1teVpk5ki8MaD9ZuCQCbmQcYKvt8HW0322SIGWjJlplrfe2bzXXDLLY 45vwv9V/5TgNQY86tmA6QirsMsdhVMX8RTqjkrL5jnlD5+gEm4sYF6LourRVsIjCTsr7osq+H EWY1TOu1hu9NSg/AWmhjVrSDzZOJPqxtF3LNaGJ/kPAsilKJv4JaNZtuPoY7fJUe4dYLJWoyE Mt/BI1NdbWEal11kB/NEXhyp5F10CcIFHUQbVAGspIE+jkjviAWpbEu+LQKZ9xkkcoKMIE3Xa txMd/5PYqx70hrvp2QEkkz0EniJNMoqDrGZ0pGSpyqpDG4uqDtBTzcGG/y9KMi0utCQGw6Gat sEjyEcfaRvISVcHsbt7Cx35C4XCsGTLBNIS/r6YaZCg49KYnDehtISSQp9kHW2ufZXgHFvD1k 21cbygCFWyzq7VNI/l1Fu4kVH+CLQXCs/pd+dqjLSclXKr4+JdkMvHeP8el1nWk110yLnRqKY bp0Qt7SRhsgW1LMmueo86AQ9Zwka7I9RnTemQp3xSm3ZC6oeeksqlAu+IbA/ZSDPJSXwvc8bd rskasV62rnZLd9cSmTCSlG5J2S7B3ryAKOsEVtH/YG9qlJkmDqz6f/MsF2Yjb1Pz743xgEnA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288373 Archived-At: On Thu, 04 Jul 2024 17:12:43 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: me@eshelyaron.com, kickingvegas@gmail.com, 71927@debbugs.gnu.org, >> basil@contovou.net, jpw@gnu.org, juri@linkov.net >> Date: Thu, 04 Jul 2024 15:32:05 +0200 >> >> On Thu, 04 Jul 2024 15:50:56 +0300 Eli Zaretskii wrote: >> >> >> From: Stephen Berman >> >> Cc: Eshel Yaron , kickingvegas@gmail.com, >> >> 71927@debbugs.gnu.org, basil@contovou.net, jpw@gnu.org, >> >> juri@linkov.net >> >> Date: Thu, 04 Jul 2024 12:06:40 +0200 >> >> >> >> >> FWIW, AFAICT everything is working correctly, it's just that the >> >> >> "Operation finished" message hides the prompt. ibuffer-do-isearc= h >> >> >> should tell define-ibuffer-op not to display that message, someho= w. >> >> > >> >> > I don't see how this could be considered "correct": the "Operation >> >> > finished" message is supposed to be shown only after the Isearch i= s >> >> > finished in all the marked buffer, not before. It looks like we n= eed >> >> > a function that will not return until all the buffers where search= ed, >> >> > because that's what define-ibuffer-op expects. Don't you agree? >> >> >> >> The attached patch appears to DTRT, but I only tested it briefly. >> > >> > Thanks, but does it really make sense to change define-ibuffer-op to >> > fix the functions which (evidently) use it incorrectly? I think the >> > fix needs to be in the same place where the bug is. >> >> That's what I thought, too, but I don't see a way to do that, because >> define-ibuffer-op hard-codes displaying a message at the end of the >> body. But in this case that message seems superfluous, in addition to >> hiding the isearch prompt, because when isearch goes through the marked >> buffers, it then displays its own message that the operation is >> complete. So this looks like a case when define-ibuffer-op is currentl= y >> too rigid. > > Then maybe these two commands should be defined using defun, not > define-ibuffer-op? There's nothing forcing us to define each ibuffer > command via define-ibuffer-op, is it? No, but doing that does seem rather like admitting that define-ibuffer-op in its current form isn't up to the job in this case, which is basically what my patch addressed. But of course that doesn't mean it's the best fix. >> However, I acknowledge that I don't really grok the interaction with >> isearch, i.e., why the "Operation finished" message is shown >> although isearch hasn't even begun. > > Juri will know for sure, but AFAIU all the commands that invoke > Isearch just enter a special mode (including the conditions/commands > to exit Isearch). IOW, when isearch-forward returns, the search did > not yet begin; instead, Emacs is in a special mode where typing > characters adds them to search string and triggers another round of > search. But if isearch-forward returning is what makes ibuffer-do-isearch (via define-ibuffer-op) emit the "Operation finished" message, then it seems like the only alternatives to suppressing that message are either to somehow postpone isearch-forward's returning or to use some other mechanism to initiate the actual search. Maybe one of those is possible for someone to implement who understands isearch better than I do. Steve Berman