gzz-dev
[Top][All Lists]
Advanced

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

Re: [Gzz] ``search_bindings--benja``: Convenient bindings for full-text


From: Benja Fallenstein
Subject: Re: [Gzz] ``search_bindings--benja``: Convenient bindings for full-text search
Date: Sat, 02 Nov 2002 15:25:43 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020913 Debian/1.1-1

Tuomas Lukka wrote:

I propose that:

- Pressing the space bar once enter "search mode."

Sounds dangerous but might work.

Dangerous because it's easy to switch modes? Yes, but OTOH we have visual feedback (through the "Search for:" at the bottom at the screen, and the characters being typed going there). We can also include information about how to get out there, like with text edit.

I think it would probably be appropriate to make this optional initially
as well.


Ok.

- In search mode, characters and spaces entered will be passed to a
user-specifyable "search policy" object (implementing, for example,
case-insensitive full-text search).

Hmm, do you mean that? Or that the string of the characters will be passed?
I.e. one by one or all the so-far typed ones?


I don't know yet; search policy objects need an own PEG. However, we can use StringSearcher for now (which means passing all the so-far typed ones).

The problem is that we want to be able to have e.g. tab completion depending on the policy object.

The search policy object
will decide on a cell that is the "current search result"
(bindings not specified in this PEG will allow moving between
different possible search results); while in search mode, this cell
will somehow be shown on the screen.

Should be showing more than one.


I'm imagining that it shows the cell with context (like common text search functions show the found text in context). Then also showing more than one search result would probably be confusing.

- Entering two spaces in a row will terminate search mode. The
current search result will be made the next action's
prefix argument.

This is the part that sounds most awkward. Not the not-automatically-moving
but rather, the two spaces.
Modes usually use the same key for entering and exiting.


Hm, true, but outside Gzz, I think having different keys to start and end search mode is quite accepted. E.g. in Emacs Ctrl-S moves between search results; in PUIs, you have a "Find" window you need to close.

I think two spaces is still easier to type than any other option I can think of... What I find most annoying is to have to type three keystrokes to move to the cell, but then again there's the "Return" shortcut.

Would ESC work for exit also?


Sure, it should exit and do nothing (not move, not anything else).

Additionally, it would be nice if ``SP foo Enter`` were
an abbreviation for moving to cell "foo" directly (in the
right window). This is more like searching works in e.g. Emacs
(where to move to word "foo" by searching for it, you type
``Ctrl-S foo Enter``).

This I quite like.

Also needs a binding to go to the next search result in a list.


Yes, but I think this also needs more thinking and another PEG. One possibility:

Up/Down: move between search results
Right: do Tab completion

But there are a number of difficulties here that need more thinking.

- If he decides that he likes his way better, think again. :)
We could decide to follow his opinion, or we could
fork the "Director's Cut" that implements his preference.

We'll need to fork things anyway for the bindings...


Hm, what do you mean?

- Benja





reply via email to

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