Prev: [PATCH] vmscan: synchronous lumpy reclaim don't call congestion_wait()
Next: [PATCH wq#for-next] workqueue: explain for_each_*cwq_cpu() iterators
From: Sam Ravnborg on 1 Aug 2010 05:30 On Sun, Aug 01, 2010 at 10:20:33AM +0300, nir.tzachar(a)gmail.com wrote: > From: Nir Tzachar <nir.tzachar(a)gmail.com> > > Remove the old hotkeys feature, and replace by a regular string search. > >From nconfig help: > > Pressing '/' triggers search mode. nconfig does regular string match, case > insensitive, starting at the begining of each menu line. > Pressing Enter highlights the next match, Backspace removes one character from > the match string. Pressing either '/' again or ESC exits search mode. > > Rebind the '/' key (which allowed to search for symbols) to F8 > > Signed-off-by: Nir Tzachar <nir.tzachar(a)gmail.com> Got following warning when I build: scripts/kconfig/nconf.c: In function ât_mext_matchâscripts/kconfig/nconf.c:512: warning: implicit declaration of function âblankâ The searching works great! And good to see the capitilazation gone. But it is ackward that I have to press ESC to leave searcing. I can navigate up/down, but entering a menu should terminate search. Also pressing enter (to select a symbol) should terminate search. I also tried to do first search using "/", then search for a symbol using F8. Again search was not terminated when I came back. There is likely much more cases... Sam -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Nir Tzachar on 1 Aug 2010 06:30 On Sun, Aug 1, 2010 at 12:28 PM, Sam Ravnborg <sam(a)ravnborg.org> wrote: > On Sun, Aug 01, 2010 at 10:20:33AM +0300, nir.tzachar(a)gmail.com wrote: >> From: Nir Tzachar <nir.tzachar(a)gmail.com> >> >> Remove the old hotkeys feature, and replace by a regular string search. >> >From nconfig help: >> >> Pressing '/' triggers search mode. nconfig does regular string match, case >> insensitive, starting at the begining of each menu line. >> Pressing Enter highlights the next match, Backspace removes one character from >> the match string. Pressing either '/' again or ESC exits search mode. >> >> Rebind the '/' key (which allowed to search for symbols) to F8 >> >> Signed-off-by: Nir Tzachar <nir.tzachar(a)gmail.com> > > Got following warning when I build: > scripts/kconfig/nconf.c: In function �t_mext_match�scripts/kconfig/nconf.c:512: warning: implicit declaration of function �blank� > > The searching works great! And good to see the capitilazation gone. Perhaps now we can make nconfig the default?? ;) > But it is ackward that I have to press ESC to leave searcing. > > I can navigate up/down, but entering a menu should terminate search. > Also pressing enter (to select a symbol) should terminate search. > > I also tried to do first search using "/", then search for a symbol using F8. > Again search was not terminated when I came back. > > There is likely much more cases... Sure, but we need to come up with a good description of the behavior we desire. As we did not discuss it, I just went ahead and implemented a POC. As to your input, the main problem with terminating a search is how to still allow iteration between possible matches. We can let Return terminate the search and use a different key (say, 'p') to navigate to the next match. However, I dislike this idea, but if no one can come up with something prettier, I'll implement it. > � � � �Sam Cheers. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Sam Ravnborg on 1 Aug 2010 07:50 > Sure, but we need to come up with a good description of the behavior > we desire. As we did not discuss it, I just went ahead and implemented > a POC. How about something like this: In search mode: - all normal letters / numbers are added to the search criteria arrow-up/arrow-down move cursor to prev/next match ESC terminate search mode All other keys terminate search and take usual action This include space, arrow-left/right, page-up/down, F*, enter, etc. Sam -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Randy Dunlap on 2 Aug 2010 12:40 On Sun, 1 Aug 2010 10:20:33 +0300 nir.tzachar(a)gmail.com wrote: > From: Nir Tzachar <nir.tzachar(a)gmail.com> > > Remove the old hotkeys feature, and replace by a regular string search. > From nconfig help: > > Pressing '/' triggers search mode. nconfig does regular string match, case > insensitive, starting at the begining of each menu line. What is a "regular string match"? That's not the same as a regular expression match, right? Maybe it's a "simple string match"? > Pressing Enter highlights the next match, Backspace removes one character from > the match string. Pressing either '/' again or ESC exits search mode. > > Rebind the '/' key (which allowed to search for symbols) to F8 > > Signed-off-by: Nir Tzachar <nir.tzachar(a)gmail.com> > --- > scripts/kconfig/nconf.c | 261 ++++++++++++++++++++++------------------------- > scripts/kconfig/nconf.h | 3 +- > 2 files changed, 125 insertions(+), 139 deletions(-) > > diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c > index 762caf8..2a7cb37 100644 > --- a/scripts/kconfig/nconf.c > +++ b/scripts/kconfig/nconf.c > @@ -41,9 +41,12 @@ static const char nconf_readme[] = N_( > " pressing <Enter> of <right-arrow>. Use <Esc> or <left-arrow> to go back.\n" > " Submenus are designated by \"--->\".\n" > "\n" > -" Shortcut: Press the option's highlighted letter (hotkey).\n" > -" Pressing a hotkey more than once will sequence\n" > -" through all visible items which use that hotkey.\n" > +" Searching: pressing '/' triggers search mode. nconfig does a\n" > +" regular string match, case insensitive, starting at\n" > +" the begining of each menu line.\n" > +" Pressing Enter highlights the next match, Backspace\n" > +" removes one character from the match string.\n" > +" Pressing either '/' again or ESC exits search mode.\n" > "\n" > " You may also use the <PAGE UP> and <PAGE DOWN> keys to scroll\n" > " unseen options into view.\n" --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: rdunlap on 2 Aug 2010 17:30
On Sun, August 1, 2010 12:20 am, nir.tzachar(a)gmail.com wrote: > From: Nir Tzachar <nir.tzachar(a)gmail.com> > > > Remove the old hotkeys feature, and replace by a regular string search. > From nconfig help: > > > Pressing '/' triggers search mode. nconfig does regular string match, > case insensitive, starting at the begining of each menu line. Pressing > Enter highlights the next match, Backspace removes one character from > the match string. Pressing either '/' again or ESC exits search mode. > > Rebind the '/' key (which allowed to search for symbols) to F8 > > > Signed-off-by: Nir Tzachar <nir.tzachar(a)gmail.com> > --- > scripts/kconfig/nconf.c | 261 > ++++++++++++++++++++++------------------------- > scripts/kconfig/nconf.h | 3 +- 2 files changed, 125 insertions(+), 139 > deletions(-) A few other comments: These help text lines should end with a period: Pressing SpaceBar toggles between the above options <Esc> always leaves the current window The F-key help along the bottom line should be forced to fit into 80 columns. F9 (exit) especially should be visible. This F3 should be F5: Press <Esc>, <F3> or <left-arrow> to go back one menu, How about we make nconfig the default in linux-next so that it will be used more? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |