From: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: jpw@gnu.org, juri@linkov.net, Eshel Yaron <me@eshelyaron.com>,
basil@contovou.net, 71927@debbugs.gnu.org,
kickingvegas@gmail.com
Subject: bug#71927: 29.4; ibuffer-do-isearch and ibuffer-do-isearch-regexp not prompting for input
Date: Thu, 04 Jul 2024 12:06:40 +0200 [thread overview]
Message-ID: <878qyh79ov.fsf@gmx.net> (raw)
In-Reply-To: <86y16h8olf.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 04 Jul 2024 12:59:24 +0300")
[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]
On Thu, 04 Jul 2024 12:59:24 +0300 Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Eshel Yaron <me@eshelyaron.com>
>> Cc: Juri Linkov <juri@linkov.net>, John Paul Wallington <jpw@gnu.org>,
>> Basil L. Contovounesios <basil@contovou.net>, kickingvegas@gmail.com,
>> 71927@debbugs.gnu.org
>> Date: Thu, 04 Jul 2024 09:12:10 +0200
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> > I have a question: ibuffer-do-isearch just calls
>> > multi-isearch-buffers. Does multi-isearch-buffers exit immediately,
>> > or does it exit only when the multi-isearch is done? If the former, I
>> > guess this is why the problem happens.
>> >
>> >> So we need someone who knows ibuffer internals.
>> >
>> > I've added two people who might be able to help.
>>
>> FWIW, AFAICT everything is working correctly, it's just that the
>> "Operation finished" message hides the prompt. ibuffer-do-isearch
>> should tell define-ibuffer-op not to display that message, somehow.
>
> I don't see how this could be considered "correct": the "Operation
> finished" message is supposed to be shown only after the Isearch is
> finished in all the marked buffer, not before. It looks like we need
> a function that will not return until all the buffers where searched,
> because that's what define-ibuffer-op expects. Don't you agree?
The attached patch appears to DTRT, but I only tested it briefly.
Steve Berman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ibuffer patch for bug#71927 --]
[-- Type: text/x-patch, Size: 2146 bytes --]
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 95ff014aa5b..9ad033b5fdb 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -598,7 +598,7 @@ revert
(define-ibuffer-op ibuffer-do-isearch ()
"Perform a `isearch-forward' in marked buffers."
(:interactive ()
- :opstring "searched in"
+ :no-opstring t
:complex t
:modifier-p :maybe)
(multi-isearch-buffers (ibuffer-get-marked-buffers)))
@@ -607,7 +607,7 @@ ibuffer-do-isearch
(define-ibuffer-op ibuffer-do-isearch-regexp ()
"Perform a `isearch-forward-regexp' in marked buffers."
(:interactive ()
- :opstring "searched regexp in"
+ :no-opstring t
:complex t
:modifier-p :maybe)
(multi-isearch-buffers-regexp (ibuffer-get-marked-buffers)))
diff --git a/lisp/ibuf-macs.el b/lisp/ibuf-macs.el
index 1fd94967836..ace1972054f 100644
--- a/lisp/ibuf-macs.el
+++ b/lisp/ibuf-macs.el
@@ -166,6 +166,7 @@ define-ibuffer-op
mark
modifier-p
dangerous
+ no-opstring
(opstring "operated on")
(active-opstring "Operate on")
before
@@ -196,6 +197,8 @@ define-ibuffer-op
OPSTRING is a string which will be displayed to the user after the
operation is complete, in the form:
\"Operation complete; OPSTRING x buffers\"
+NO-OPSTRING is a boolean which should be set to suppress the message
+after the operation is complete.
ACTIVE-OPSTRING is a string which will be displayed to the user in a
confirmation message, in the form:
\"Really ACTIVE-OPSTRING x buffers?\"
@@ -246,9 +249,10 @@ define-ibuffer-op
())
(and after `(,after)) ; post-operation form.
`((ibuffer-redisplay t)
- (message ,(concat "Operation finished; " opstring
- " %s %s")
- count (ngettext "buffer" "buffers" count)))))
+ (unless ,no-opstring
+ (message ,(concat "Operation finished; " opstring
+ " %s %s")
+ count (ngettext "buffer" "buffers" count))))))
(inner-body (if complex
`(progn ,@body)
`(progn
next prev parent reply other threads:[~2024-07-04 10:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 21:25 bug#71927: 29.4; ibuffer-do-isearch and ibuffer-do-isearch-regexp not prompting for input Charles Choi
2024-07-04 6:58 ` Juri Linkov
2024-07-04 7:55 ` Eli Zaretskii
2024-07-04 7:12 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-04 9:59 ` Eli Zaretskii
2024-07-04 10:06 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-07-04 12:50 ` Eli Zaretskii
2024-07-04 13:32 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-04 14:12 ` Eli Zaretskii
2024-07-04 15:09 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-04 16:04 ` Juri Linkov
2024-07-04 17:36 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-04 18:07 ` Eli Zaretskii
2024-07-04 18:29 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-04 18:46 ` Eli Zaretskii
2024-07-06 21:13 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-07 16:59 ` Juri Linkov
2024-07-12 7:03 ` Eli Zaretskii
2024-07-12 10:20 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-12 17:05 ` Charles Choi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878qyh79ov.fsf@gmx.net \
--to=bug-gnu-emacs@gnu.org \
--cc=71927@debbugs.gnu.org \
--cc=basil@contovou.net \
--cc=eliz@gnu.org \
--cc=jpw@gnu.org \
--cc=juri@linkov.net \
--cc=kickingvegas@gmail.com \
--cc=me@eshelyaron.com \
--cc=stephen.berman@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.