help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: isearch-whole-buffer?


From: Vin Shelton
Subject: Re: isearch-whole-buffer?
Date: Sat, 25 Mar 2006 18:34:22 -0500

xyblor <fake@invalid.email> writes:

> B. T. Raven wrote:
>
>> I'm having trouble imagining why C-s  xxxxxxxxxx... and then C-s again to
>> force wrapping to the beginning of the buffer doesn't work for you. Even
>> if the search string (xxxxxx...) is very long, you don't have to backspace
>> to the beginning to return to the mark. You can just C-x C-x. No?
>
> Being forced to wrap the search is inconvenient when you don't know
> how to spell what you are looking for, and you have to press C-s every
> time you want to try a different spelling. It's also inconvenient to
> start a search when the point is at the end of the buffer, because no
> matter what you're looking for, you'll have to press C-s again, and
> you don't know you've typed enough characters.
>
> There's also a more general design issue at play here: it seems to me
> that most of the time, when a person initiates a search, s/he wants to
> answer the question "where in this buffer will I find this string?"
> not "where will I find this string in the portion of the buffer that
> is below/above the point?". I find Firefox's "find" (control-f) to be
> more sensible in this regard, and I am surprised that in the long
> history of Emacs' development, nobody seems to have shared this view;
> to such an extent that not only is there no built in function or
> variable to enable searching the whole buffer by default, there isn't
> even a convenient workaround. I realize it's a minor point, but given
> Emacs' extensible nature, I'm supposed to bend it to my will, right?
> Or am I just out to lunch on this?

It seems to me that Firefox and emacsen are fundamentally different in
the sense that a emacs (or any screen-based editor) has a sense of
'point' - where you are right now, vs. a browser's sense that you're
viewing a webpage.  In the former case it makes sense to search from
where you are, but in the latter case it makes more sense to search
from the start of the entire webpage.   ... at least IMO.

As to your problem - is it too cumbersome to type M-< before you type
C-s?  This does have the disadvantage that C-g doesn't work in exactly
the same way, but your original point is still in the mark ring.

(Personally, I thought Kevin's advice solution was more elegant than
my proposed solution, but sometimes there's a value to explicitness
and tastes vary, so perhaps you'd prefer my suggestion.)

BTW, if you don't know exactly what you're searching for,
isearch-forward-regexp (bound to M-C-s) may help.

My $.02.

  - Vin Shelton


reply via email to

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