unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Comments on misearch.el
@ 2009-11-17 15:22 Tobias C. Rittweiler
  2009-11-17 17:54 ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias C. Rittweiler @ 2009-11-17 15:22 UTC (permalink / raw)
  To: emacs-devel; +Cc: Juri Linkov


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.

   





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Comments on misearch.el
  2009-11-17 15:22 Comments on misearch.el Tobias C. Rittweiler
@ 2009-11-17 17:54 ` Juri Linkov
  2009-11-17 18:52   ` Tobias C. Rittweiler
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2009-11-17 17:54 UTC (permalink / raw)
  To: Tobias C. Rittweiler; +Cc: emacs-devel

Thank you for your feedback.  Feel free to post bug reports
about misearch.el to emacs-pretest-bug@gnu.org if you want
to track the bug fixing progress ;-)

> 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?)

Yes, there is also multi-file query-replace.  It can be started
from Dired by marking files and typing `Q'.

> 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.

Yes, this should be easy to fix.  I will do that.

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

Good idea!  I'll try to implement this.

>   * 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.)

Could you please try with different values of `multi-isearch-pause'.
You can customize it to: "Don't pause", "Only in initial buffer"
or "All buffers".

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Comments on misearch.el
  2009-11-17 17:54 ` Juri Linkov
@ 2009-11-17 18:52   ` Tobias C. Rittweiler
  2009-11-18  9:56     ` tags-query-replace (was: Comments on misearch.el) Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias C. Rittweiler @ 2009-11-17 18:52 UTC (permalink / raw)
  To: emacs-devel

Juri Linkov <juri@jurta.org> writes:

> > (BTW., is there something like misearch but for query-replace, too?)
>
> Yes, there is also multi-file query-replace.  It can be started
> from Dired by marking files and typing `Q'.

Thanks for pointing that out. It's based on `tags-query-replace'.

Let's say you do a query-replace over multiple files, but now regret
your changes. Is there an easy way to get an `undo' not only relatively
to the current buffer?

  -T.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* tags-query-replace (was: Comments on misearch.el)
  2009-11-17 18:52   ` Tobias C. Rittweiler
@ 2009-11-18  9:56     ` Juri Linkov
  0 siblings, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2009-11-18  9:56 UTC (permalink / raw)
  To: Tobias C. Rittweiler; +Cc: emacs-devel

>> > (BTW., is there something like misearch but for query-replace, too?)
>>
>> Yes, there is also multi-file query-replace.  It can be started
>> from Dired by marking files and typing `Q'.
>
> Thanks for pointing that out. It's based on `tags-query-replace'.
>
> Let's say you do a query-replace over multiple files, but now regret
> your changes. Is there an easy way to get an `undo' not only relatively
> to the current buffer?

Do you mean global multi-buffer undo?  I don't know such a thing.
So I think you have to revisit all modified buffers and undo
query-replace in each of them.

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-18  9:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-17 15:22 Comments on misearch.el Tobias C. Rittweiler
2009-11-17 17:54 ` Juri Linkov
2009-11-17 18:52   ` Tobias C. Rittweiler
2009-11-18  9:56     ` tags-query-replace (was: Comments on misearch.el) Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).