* [sup-talk] new in svn: in-buffer search
@ 2007-11-06 22:41 William Morgan
2007-11-06 22:57 ` Ian Taylor
2007-11-07 8:53 ` Marcus Williams
0 siblings, 2 replies; 15+ messages in thread
From: William Morgan @ 2007-11-06 22:41 UTC (permalink / raw)
Thanks to Eyal Oren, who took a first crack at a patch and got me
excited, SVN head now has in-buffer search.
First, note that I've remapped the index search from '/' to '\'. Hah!
'/' now does an in-buffer search, highlights the results, and jumps to
the first one. 'n' jumps to the next result; ^G or any other key cancels
the current search.
Also note that the search is restricted to exactly what you see on the
screen. Collapsed messages in thread-view-mode, etc must be uncollapsed
in order to be in-buffer search candidates. Maybe there will be fancier
behavior in the future.
Future plans: regex search (very easy to do now), and use the
highlighting code to make search-results-mode nicer.
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-06 22:41 [sup-talk] new in svn: in-buffer search William Morgan
@ 2007-11-06 22:57 ` Ian Taylor
2007-11-07 0:18 ` William Morgan
2007-11-07 8:53 ` Marcus Williams
1 sibling, 1 reply; 15+ messages in thread
From: Ian Taylor @ 2007-11-06 22:57 UTC (permalink / raw)
Excerpts from William Morgan's message of Tue Nov 06 17:41:37 -0500 2007:
> Thanks to Eyal Oren, who took a first crack at a patch and got me
> excited, SVN head now has in-buffer search.
>
> First, note that I've remapped the index search from '/' to '\'. Hah!
>
> '/' now does an in-buffer search, highlights the results, and jumps to
> the first one. 'n' jumps to the next result; ^G or any other key cancels
> the current search.
>
> Also note that the search is restricted to exactly what you see on the
> screen. Collapsed messages in thread-view-mode, etc must be uncollapsed
> in order to be in-buffer search candidates. Maybe there will be fancier
> behavior in the future.
>
> Future plans: regex search (very easy to do now), and use the
> highlighting code to make search-results-mode nicer.
>
Not sure if this was introduced as a result of this patch, but '?' in
the first view seems to crash sup with this error:
The problem was: 'unknown key name "ctrl_g"' (error type ArgumentError)
A backtrace follows:
/var/lib/gems/1.8/gems/sup-0.2/lib/sup/keymap.rb:54:in `keysym_to_string': unknown key name "ctrl_g" (ArgumentError)
from /var/lib/gems/1.8/gems/sup-0.2/lib/sup/keymap.rb:80:in `help_text'
from /var/lib/gems/1.8/gems/sup-0.2/lib/sup/keymap.rb:80:in `map'
from /var/lib/gems/1.8/gems/sup-0.2/lib/sup/keymap.rb:80:in `help_text'
from /var/lib/gems/1.8/gems/sup-0.2/lib/sup/keymap.rb:77:in `map'
from /var/lib/gems/1.8/gems/sup-0.2/lib/sup/keymap.rb:77:in `help_text'
from /var/lib/gems/1.8/gems/sup-0.2/lib/sup/modes/help-mode.rb:13:in `initialize'
from /var/lib/gems/1.8/gems/sup-0.2/bin/sup:217:in `new'
from /var/lib/gems/1.8/gems/sup-0.2/bin/sup:217
from /var/lib/gems/1.8/gems/sup-0.2/lib/sup/buffer.rb:262:in `spawn_unless_exists'
from /var/lib/gems/1.8/gems/sup-0.2/bin/sup:217
from /var/lib/gems/1.8/bin/sup:16:in `load'
from /var/lib/gems/1.8/bin/sup:16
My guess is that the following changes need to be made in keymap.rb
when :end: "<end>"
when :enter, :return: "<enter>"
when :ctrl_l: "ctrl-l"
- when :ctrl_l: "ctrl-g"
+ when :ctrl_g: "ctrl-g"
when :tab: "tab"
when " ": "<space>"
else
--
Ian Taylor
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-06 22:57 ` Ian Taylor
@ 2007-11-07 0:18 ` William Morgan
0 siblings, 0 replies; 15+ messages in thread
From: William Morgan @ 2007-11-07 0:18 UTC (permalink / raw)
Excerpts from Ian Taylor's message of Tue Nov 06 14:57:25 -0800 2007:
> My guess is that the following changes need to be made in keymap.rb
Exactly. Thanks!
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-06 22:41 [sup-talk] new in svn: in-buffer search William Morgan
2007-11-06 22:57 ` Ian Taylor
@ 2007-11-07 8:53 ` Marcus Williams
2007-11-07 9:21 ` Eyal Oren
2007-11-07 14:25 ` vasudeva
1 sibling, 2 replies; 15+ messages in thread
From: Marcus Williams @ 2007-11-07 8:53 UTC (permalink / raw)
On 6.11.2007, William Morgan wrote:
> First, note that I've remapped the index search from '/' to '\'. Hah!
>
> '/' now does an in-buffer search, highlights the results, and jumps to
> the first one. 'n' jumps to the next result; ^G or any other key cancels
> the current search.
This feels a bit wrong to me (might just be me though). I'd say that
searching for emails is the most used case for a search option in sup
so should have the '/', and searching in buffer should be something
different.
Better than that, make '/' mode dependant so you can use say ctrl-s to
search for emails (always), ctrl-f to search in buffer (always) but
map '/' to ctrl-s in thread-index mode (so that would be in inbox and
search results). In all other modes '/' could map to ctrl-f.
Any thoughts?
Marcus
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-07 8:53 ` Marcus Williams
@ 2007-11-07 9:21 ` Eyal Oren
2007-11-07 9:43 ` Marcus Williams
` (2 more replies)
2007-11-07 14:25 ` vasudeva
1 sibling, 3 replies; 15+ messages in thread
From: Eyal Oren @ 2007-11-07 9:21 UTC (permalink / raw)
Excerpts from Marcus Williams's message of Wed Nov 07 09:53:35 +0100 2007:
> On 6.11.2007, William Morgan wrote:
> > First, note that I've remapped the index search from '/' to '\'. Hah!
> >
> > '/' now does an in-buffer search, highlights the results, and jumps to
> > the first one. 'n' jumps to the next result; ^G or any other key cancels
> > the current search.
>
> This feels a bit wrong to me (might just be me though). I'd say that
> searching for emails is the most used case for a search option in sup
> so should have the '/', and searching in buffer should be something
> different.
>
> Better than that, make '/' mode dependant so you can use say ctrl-s to
> search for emails (always), ctrl-f to search in buffer (always) but
> map '/' to ctrl-s in thread-index mode (so that would be in inbox and
> search results). In all other modes '/' could map to ctrl-f.
Personally, I feel that '/' should search in buffer, as many other UNIX tools do
(vi, mutt, less, etc).
Btw, William, thanks for the search! It's great. But wouldn't you like to search
from the top instead of searching from cursor position? I often want to use
search instead of hitting cursor-up seven times.
--
-eyal
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-07 9:21 ` Eyal Oren
@ 2007-11-07 9:43 ` Marcus Williams
2007-11-07 9:53 ` Marcus Williams
2007-11-12 0:13 ` William Morgan
2 siblings, 0 replies; 15+ messages in thread
From: Marcus Williams @ 2007-11-07 9:43 UTC (permalink / raw)
On 7.11.2007, Eyal Oren wrote:
> Personally, I feel that '/' should search in buffer, as many other
> UNIX tools do (vi, mutt, less, etc).
I agree with you, but I dont think it makes sense in the inbox or
thread index views which is why I suggested having it mode dependant.
Maybe that would just confuse though.
That aside I like it :)
Marcus
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-07 9:21 ` Eyal Oren
2007-11-07 9:43 ` Marcus Williams
@ 2007-11-07 9:53 ` Marcus Williams
2007-11-12 0:13 ` William Morgan
2 siblings, 0 replies; 15+ messages in thread
From: Marcus Williams @ 2007-11-07 9:53 UTC (permalink / raw)
On 7.11.2007, Eyal Oren wrote:
> Btw, William, thanks for the search! It's great. But wouldn't you
> like to search from the top instead of searching from cursor
> position? I often want to use search instead of hitting cursor-up
> seven times.
Forgot to add - you can just hit '1' to move your cursor to the top of
the buffer if that helps.
Marcus
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-07 8:53 ` Marcus Williams
2007-11-07 9:21 ` Eyal Oren
@ 2007-11-07 14:25 ` vasudeva
2007-11-07 20:41 ` William Morgan
1 sibling, 1 reply; 15+ messages in thread
From: vasudeva @ 2007-11-07 14:25 UTC (permalink / raw)
* on 11-07-07, Marcus Williams wrote:
> On 6.11.2007, William Morgan wrote:
> > First, note that I've remapped the index search from '/' to '\'. Hah!
> >
> > '/' now does an in-buffer search, highlights the results, and jumps to
> > the first one. 'n' jumps to the next result; ^G or any other key cancels
> > the current search.
>
> This feels a bit wrong to me (might just be me though). I'd say that
> searching for emails is the most used case for a search option in sup
> so should have the '/', and searching in buffer should be something
> different.
>
> Better than that, make '/' mode dependant so you can use say ctrl-s to
> search for emails (always), ctrl-f to search in buffer (always) but
> map '/' to ctrl-s in thread-index mode (so that would be in inbox and
> search results). In all other modes '/' could map to ctrl-f.
For purposes of migration from existing tools, and conforming to
established UNIX conventions, I like keeping / as buffer search (per
the 'screen search' CLI norm) and \ as ferret-index search (somewhat
unusual functionality in terms of CLI app search conventions, thus
deserving of a lower-priority keybinding).
That said, I think mode-dependency could be a neat resolve.
/></
--
linkswarm.com :: Collaborative Insolence
vasudeva.linkswarm.com/gallery :: For The Faint of Heart
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-07 14:25 ` vasudeva
@ 2007-11-07 20:41 ` William Morgan
2007-11-07 21:05 ` Marcus Williams
2007-11-07 21:56 ` Colin Bell
0 siblings, 2 replies; 15+ messages in thread
From: William Morgan @ 2007-11-07 20:41 UTC (permalink / raw)
Excerpts from vasudeva's message of Wed Nov 07 06:25:27 -0800 2007:
> For purposes of migration from existing tools, and conforming to
> established UNIX conventions, I like keeping / as buffer search (per
> the 'screen search' CLI norm) and \ as ferret-index search (somewhat
> unusual functionality in terms of CLI app search conventions, thus
> deserving of a lower-priority keybinding).
This was pretty much my thinking. Anyone else want to weight in? (I'll
admit I'm having to retrain myself to use the new keybindings, which is
mildly irritating.)
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-07 20:41 ` William Morgan
@ 2007-11-07 21:05 ` Marcus Williams
2007-11-12 0:11 ` William Morgan
2007-11-07 21:56 ` Colin Bell
1 sibling, 1 reply; 15+ messages in thread
From: Marcus Williams @ 2007-11-07 21:05 UTC (permalink / raw)
On 7.11.2007, William Morgan wrote:
> This was pretty much my thinking. Anyone else want to weight in? (I'll
> admit I'm having to retrain myself to use the new keybindings, which is
> mildly irritating.)
Retraining is one thing, the other is that the '\' is in different
places on all the keyboards I use! I'm sure I'll get over it though :)
Two things - can we make the prompts different to make it more obvious
and make a blank search not do anything?
Marcus
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-07 20:41 ` William Morgan
2007-11-07 21:05 ` Marcus Williams
@ 2007-11-07 21:56 ` Colin Bell
2007-11-12 0:02 ` William Morgan
1 sibling, 1 reply; 15+ messages in thread
From: Colin Bell @ 2007-11-07 21:56 UTC (permalink / raw)
Excerpts from William Morgan's message of Thu Nov 08 07:41:46 +1100 2007:
> Excerpts from vasudeva's message of Wed Nov 07 06:25:27 -0800 2007:
> > For purposes of migration from existing tools, and conforming to
> > established UNIX conventions, I like keeping / as buffer search (per
> > the 'screen search' CLI norm) and \ as ferret-index search (somewhat
> > unusual functionality in terms of CLI app search conventions, thus
> > deserving of a lower-priority keybinding).
>
> This was pretty much my thinking. Anyone else want to weight in? (I'll
> admit I'm having to retrain myself to use the new keybindings, which is
> mildly irritating.)
You could replace \ with F for Filter or Ferret-index search if the \
character is too annoying. My first thought was to borrow L for Limit
from mutt but that doesn't work too well with labels :-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-07 21:56 ` Colin Bell
@ 2007-11-12 0:02 ` William Morgan
2007-11-12 0:33 ` Christopher Warrington
0 siblings, 1 reply; 15+ messages in thread
From: William Morgan @ 2007-11-12 0:02 UTC (permalink / raw)
Excerpts from Colin Bell's message of Wed Nov 07 13:56:21 -0800 2007:
> You could replace \ with F for Filter or Ferret-index search if the \
> character is too annoying. My first thought was to borrow L for Limit
> from mutt but that doesn't work too well with labels :-)
I'm actually quite liking \ now that I've gotten used to it. I'll add F.
If you're tired of being bound by my capricious whims, patches to make
keybindings configurable are welcome!
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-07 21:05 ` Marcus Williams
@ 2007-11-12 0:11 ` William Morgan
0 siblings, 0 replies; 15+ messages in thread
From: William Morgan @ 2007-11-12 0:11 UTC (permalink / raw)
Excerpts from Marcus Williams's message of Wed Nov 07 13:05:58 -0800 2007:
> Two things - can we make the prompts different to make it more obvious
> and make a blank search not do anything?
Done!
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-07 9:21 ` Eyal Oren
2007-11-07 9:43 ` Marcus Williams
2007-11-07 9:53 ` Marcus Williams
@ 2007-11-12 0:13 ` William Morgan
2 siblings, 0 replies; 15+ messages in thread
From: William Morgan @ 2007-11-12 0:13 UTC (permalink / raw)
Excerpts from Eyal Oren's message of Wed Nov 07 01:21:57 -0800 2007:
> Btw, William, thanks for the search! It's great. But wouldn't you like
> to search from the top instead of searching from cursor position? I
> often want to use search instead of hitting cursor-up seven times.
I'm following vi, emacs, and less precedent here. You can hit 1 or Home
to jump up to the top. (Maybe that should be 0.)
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [sup-talk] new in svn: in-buffer search
2007-11-12 0:02 ` William Morgan
@ 2007-11-12 0:33 ` Christopher Warrington
0 siblings, 0 replies; 15+ messages in thread
From: Christopher Warrington @ 2007-11-12 0:33 UTC (permalink / raw)
Excerpts from William Morgan's message of Sun Nov 11 18:02:16 -0600 2007:
> I'm actually quite liking \ now that I've gotten used to it. I'll add F.
> If you're tired of being bound by my capricious whims, patches to make
> keybindings configurable are welcome!
The "Refine Search" keybinding probably needs to be re-adjusted.
Currently, it is '.', which is right next to / on a normal QWERTY
keyboard.
Right now, ']' is unbound and next to '\' on typical QWERTY keyboards.
--
Christopher Warrington <chrisw at rice.edu>
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2007-11-12 0:33 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-06 22:41 [sup-talk] new in svn: in-buffer search William Morgan
2007-11-06 22:57 ` Ian Taylor
2007-11-07 0:18 ` William Morgan
2007-11-07 8:53 ` Marcus Williams
2007-11-07 9:21 ` Eyal Oren
2007-11-07 9:43 ` Marcus Williams
2007-11-07 9:53 ` Marcus Williams
2007-11-12 0:13 ` William Morgan
2007-11-07 14:25 ` vasudeva
2007-11-07 20:41 ` William Morgan
2007-11-07 21:05 ` Marcus Williams
2007-11-12 0:11 ` William Morgan
2007-11-07 21:56 ` Colin Bell
2007-11-12 0:02 ` William Morgan
2007-11-12 0:33 ` Christopher Warrington
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox