GNU bug report logs - #4947
Comments on misearch.el [repost from emacs-devel]

Previous Next

Package: emacs;

Reported by: "Tobias C. Rittweiler" <tcr <at> freebits.de>

Date: Tue, 17 Nov 2009 18:40:05 UTC

Severity: wishlist

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4947 in the body.
You can then email your comments to 4947 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4947; Package emacs. (Tue, 17 Nov 2009 18:40:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Tobias C. Rittweiler" <tcr <at> freebits.de>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 17 Nov 2009 18:40:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Tobias C. Rittweiler" <tcr <at> freebits.de>
To: emacs-pretest-bug <at> gnu.org
Subject: Comments on misearch.el [repost from emacs-devel]
Date: Tue, 17 Nov 2009 19:36:28 +0100
I just tried misearch.el which provides the ability to search through
multiple files / buffers via isearch. Thank you, Juri, for writing it,
it's exactly what I need.

(BTW., is there something like misearch but for query-replace, too?)

I do have some comments on it:

  * The docstring of `multi-isearch-next-buffer-function' says that the
    function is called with the current buffer as first argument.

    However, in case of the initial buffer, it's actually called with
    `nil' as first argument.

   Is that intended? If so, the docstring should reflect that.
   I now have in my next-buffer function

     (setq current-buffer (or current-buffer (current-buffer)))

   as a workaround.


  * It'd be nice, not only to display "Repeat for next buffer", but
    actually include the next buffer's name.


  * If I'm in a file that contains matches, and I'm at the last match,
    it exhibits the following behaviour in the minibuffer:

      Multi Isearch: ...                         (pressing C-s)

      Failing multi Isearch: ... [Repeat ...]    (pressing C-s)

      jumps to first match in next buffer

   However, if I'm in a buffer that won't have a match, I see the
   following behaviour:

      Multi Isearch: ..(incremently typing)..    --> turns to
      Failing multi Isearch: ... [Repeat ...]    (pressing C-s)
 
      Failing mutli Isearch: ...                 (pressing C-s)

      goes to next file

   I.e., as you can hopefully see, it expects one C-s too much. (The
   line without the "[Repeat ...]" is superfluous.)

  -T.

   

-- 
Diese Nachricht wurde auf Viren und andere gefaerliche Inhalte untersucht
und ist - aktuelle Virenscanner vorausgesetzt - sauber.
Freebits E-Mail Virus Scanner




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4947; Package emacs. (Mon, 30 Nov 2009 21:55:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 30 Nov 2009 21:55:06 GMT) Full text and rfc822 format available.

Message #10 received at 4947 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: "Tobias C. Rittweiler" <tcr <at> freebits.de>
Cc: 4947 <at> debbugs.gnu.org
Subject: Re: bug#4947: Comments on misearch.el
Date: Mon, 30 Nov 2009 23:45:43 +0200
> I just tried misearch.el which provides the ability to search through
> multiple files / buffers via isearch. Thank you, Juri, for writing it,
> it's exactly what I need.
>
> I do have some comments on it:
>
>   * The docstring of `multi-isearch-next-buffer-function' says that the
>     function is called with the current buffer as first argument.
>
>     However, in case of the initial buffer, it's actually called with
>     `nil' as first argument.
>
>    Is that intended? If so, the docstring should reflect that.
>    I now have in my next-buffer function
>
>      (setq current-buffer (or current-buffer (current-buffer)))
>
>    as a workaround.

Thanks for the suggestion.  I fixed `multi-isearch-next-buffer-function'
to always provide a non-nil value of the argument `buffer'.

>   * It'd be nice, not only to display "Repeat for next buffer", but
>     actually include the next buffer's name.

I see two problems with this:

1. A buffer name might be too long to display in the prompt.

2. To get a buffer name, we should preemptively call
`multi-isearch-next-buffer-function' that might break it
if this function expects that we call it only when we really
are going to switch to the next buffer (not just to get and
display its name).

> There's another wishlist item, though it's not that important: I'd like
> to see a small buffer pop up which contains all the files we're going to
> search through, and highlight where we currently are.

`list-buffers' (`C-x C-b') already allows selecting buffers to Isearch.
So we could mark the currently searched buffer in the *Buffer List*.

>   * If I'm in a file that contains matches, and I'm at the last match,
>     it exhibits the following behaviour in the minibuffer:
>
>       Multi Isearch: ...                         (pressing C-s)
>
>       Failing multi Isearch: ... [Repeat ...]    (pressing C-s)
>
>       jumps to first match in next buffer
>
>    However, if I'm in a buffer that won't have a match, I see the
>    following behaviour:
>
>       Multi Isearch: ..(incremently typing)..    --> turns to
>       Failing multi Isearch: ... [Repeat ...]    (pressing C-s)
>
>       Failing multi Isearch: ...                 (pressing C-s)
>
>       goes to next file
>
>    I.e., as you can hopefully see, it expects one C-s too much. (The
>    line without the "[Repeat ...]" is superfluous.)

Actually this is the intended behaviour.

The first

      Failing multi Isearch: ... [Repeat ...]    (pressing C-s)

says "There are no more matches in the current buffer, try to search
in the next buffer".

And the second

      Failing multi Isearch: ...                 (pressing C-s)

says "I've tried to search all buffers and there are no more matches
in all remaining buffers".

And

      goes to next file

actually wraps to the first file/buffer.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4947; Package emacs. (Thu, 03 Jun 2021 09:31:02 GMT) Full text and rfc822 format available.

Message #13 received at 4947 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 4947 <at> debbugs.gnu.org, "Tobias C. Rittweiler" <tcr <at> freebits.de>
Subject: Re: bug#4947: Comments on misearch.el [repost from emacs-devel]
Date: Thu, 03 Jun 2021 11:30:07 +0200
Juri Linkov <juri <at> jurta.org> writes:

>> There's another wishlist item, though it's not that important: I'd like
>> to see a small buffer pop up which contains all the files we're going to
>> search through, and highlight where we currently are.
>
> `list-buffers' (`C-x C-b') already allows selecting buffers to Isearch.
> So we could mark the currently searched buffer in the *Buffer List*.

Skimming this bug report, it seems like this wishlist item was the only
thing not handled here?

Is this something that should still be considered, or should this bug
report be closed?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4947; Package emacs. (Thu, 03 Jun 2021 20:34:02 GMT) Full text and rfc822 format available.

Message #16 received at 4947 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 4947 <at> debbugs.gnu.org, "Tobias C. Rittweiler" <tcr <at> freebits.de>
Subject: Re: bug#4947: Comments on misearch.el [repost from emacs-devel]
Date: Thu, 03 Jun 2021 23:24:47 +0300
tags 4947 fixed
close 4947 28.0.50
thanks

>>> There's another wishlist item, though it's not that important: I'd like
>>> to see a small buffer pop up which contains all the files we're going to
>>> search through, and highlight where we currently are.
>>
>> `list-buffers' (`C-x C-b') already allows selecting buffers to Isearch.
>> So we could mark the currently searched buffer in the *Buffer List*.
>
> Skimming this bug report, it seems like this wishlist item was the only
> thing not handled here?
>
> Is this something that should still be considered, or should this bug
> report be closed?

Usually before starting a multi-buffer search you know what files
you are going to search, so perhaps this report could be closed.




Added tag(s) fixed. Request was from Juri Linkov <juri <at> jurta.org> to control <at> debbugs.gnu.org. (Thu, 03 Jun 2021 20:34:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.0.50, send any further explanations to 4947 <at> debbugs.gnu.org and "Tobias C. Rittweiler" <tcr <at> freebits.de> Request was from Juri Linkov <juri <at> jurta.org> to control <at> debbugs.gnu.org. (Thu, 03 Jun 2021 20:34:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 02 Jul 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.