emacs-devel
[Top][All Lists]
Advanced

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

Re: Type Ahead Find


From: Juri Linkov
Subject: Re: Type Ahead Find
Date: Sun, 20 Mar 2005 22:17:02 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/linux)

Miles Bader <address@hidden> writes:
> Something like:
>
>    Global info I-search:  foo
>
> [Maybe "Cross-node" would be better than "Global"?]
>
> or whatever would be even more similar to the existing "Wrapped", get
> the point across well, and address your concern about the prompt size
> bouncing around excessively.

I don't like "[initial node]" too.  Your idea of using a prefix
looks better.  We could have the following prefixes:

1. In the initial node:

Info I-search: foo

2. Before leaving the initial node:

Failing Info I-search: foo

3. After leaving the initial node:

Cross-node Info I-search: foo

4. When failing for the rest of the manual:

Failing Cross-node Info I-search: foo

5. After wrapping to the top node:

Wrapped Cross-node Info I-search: foo

6. Failing wrapped search:

Failing wrapped Cross-node Info I-search: foo

The prefix "Info " indicates that a special Info search is active
that will wrap to the next node instead of the top of the current node.

This can be implemented by adding a new variable `isearch-type'
holding a search type string and set in the `isearch-search-fun-function'
or the proposed `isearch-success-function'.  With both these
functions defined (e.g. to search menu items, references and links
through multiple nodes in Info) the search message will look like this:

Cross-node Links Info regexp I-search: foo

In the function `isearch-message-prefix' the most suitable place for
this variable seems to be after the error prefixes ("failing", "wrapped")
and before generic search type prefixes "regexp", "word", "backward"
(shown by the arrow below):

    (if isearch-success "" "failing ")
    (if isearch-adjusted "pending " "")
    (if (and isearch-wrapped ...) "over")
    (if isearch-wrapped "wrapped ")
->  (or isearch-type "")
    (if isearch-word "word " "")
    (if isearch-regexp "regexp " "")
    (if nonincremental "search" "I-search")
    (if isearch-forward "" " backward")
    (if current-input-method (concat " [" current-input-method-title "]: ")
    ": ")

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





reply via email to

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