[Top][All Lists]

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

Re: isearch multiple buffers

From: Richard Stallman
Subject: Re: isearch multiple buffers
Date: Tue, 09 Oct 2007 16:03:10 -0400

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

In that case, it needs more comments in the code
so that people can see this is what it does.

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

That is clear.  Good.

    (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.")

That is clear too.

Please write up the NEWS text, wait 4 days for other comments and
suggestions, then install it.

reply via email to

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