emacs-devel
[Top][All Lists]
Advanced

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

RE: isearch multiple buffers


From: Drew Adams
Subject: RE: isearch multiple buffers
Date: Wed, 24 Oct 2007 15:52:57 -0700

> > Is there no way for a user to interactively choose the buffers
> > to search? If so, how about at least letting a user search,
> > say, all of the buffers marked (with `>') in the Buffer List
> > (C-x C-b), in the order they currently appear in that list?
> > That is, have the default value of
> > `isearch-buffers-next-buffer-function' be a function that
> > provides this behavior.
>
> Actually this suggests adding a new global mode isearch-buffers-mode.
> When it is active and the global variable
> isearch-buffers-next-buffer-function
> contains a function that return the next buffer from the set of marked
> buffers from the buffer list, this could work.  But what to do when
> isearch enters a ChangeLog buffer that has a buffer-local value
> of isearch-buffers-next-buffer-function?  After leaving this buffer,
> isearch will continue to search the next ChangeLog file, not the next
> buffer from the buffer list.

I probably don't understand you, but I don't see why another minor mode
would be needed or what the problem would be.

In my thinking, if buffers are marked in Buffer List, then they are always
used. To use another sequence of buffers, such as in a change log mode,
either the user or the mode code would need to unmark the Buffer List
buffers first. If it is the change-log code that does that, then it could
restore the marked buffers when it exits.

Alternatively, the mode could just bind isearch-buffers-next-buffer-function
for its own use. When it exits, the global binding would take effect. By
default, that would mean the marked buffers.

Or are you speaking of isearch crossing between buffers that have different
values of the function? In that case, the thing to do would be to work from
a snapshot: the function value when isearch started. IOW, not let isearch
use the current definition of the function, but the definition that was
current when it started searching.

Again, I'm probably missing your point. Please try again.






reply via email to

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