[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isearch multiple buffers

From: Juri Linkov
Subject: Re: isearch multiple buffers
Date: Mon, 08 Oct 2007 22:18:18 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

> I am not sure I understand the code in that patch, but it looks like
> isearch-buffers-search-fun will search all the buffers without a
> pause.  Is that right?
> I don't think that is the right UI for this feature.  I think the
> search should fail when it can't find another occurrence in the
> current buffer.  Then if you type C-s again it should go to the next
> buffer which has an occurrence, and search there.

The patch I proposed implements exactly the same behavior as
you described.

> The documentation of `isearch-buffers-next-buffer-function' should
> clearly state what it means to search multiple buffers.

(defvar isearch-buffers-next-buffer-function nil
  "Function to call to get the next buffer to search.

When this variable is set to a function that returns a buffer, then
after typing another C-s or C-r at a failing search, the search goes
to the next buffer in the series and continues searching for the next
occurrence.  The first argument of this function is the current buffer
where the search is currently searching.  It defines the base buffer
relative to which this function should find the next buffer.  When the
isearch direction is backward (when isearch-forward is nil), this
function should return the previous buffer to search. If the second
argument of this function WRAP is non-nil, then it should return
the first buffer in the series; and for the backward search, it
should return the last buffer in the series.")

>     +   "The buffer where the search currently stays.
> The word "stays" is not used in this way in English.

(defvar isearch-buffers-current-buffer nil
  "The buffer where the search is currently searching.
The value is nil when the search still is in the initial buffer.")

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]