From: Nir Tzachar on
On Mon, Aug 2, 2010 at 7:32 PM, Randy Dunlap <rdunlap(a)xenotime.net> wrote:
> 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"?

strcasecmp. I've considered using regex or fnmatch, but it seemed an overkill.

>> 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: Nir Tzachar on
On Tue, Aug 3, 2010 at 12:22 AM, <rdunlap(a)xenotime.net> wrote:
> 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
>

Sure.

> The F-key help along the bottom line should be forced to fit
> into 80 columns. �F9 (exit) especially should be visible.

They were, however I think that the symbol search (F-8) kind of ruind
it. I'll shorten its name.

>
> This F3 should be F5:
>
> �Press <Esc>, <F3> or <left-arrow> to go back one menu,

10x.

>
> How about we make nconfig the default in linux-next
> so that it will be used more?

I would love to see that. Let me finalize a patch which properly
supports searching (based on Sam's input) so as to remove the current
upper case ugliness.

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: Randy Dunlap on
On Tue, 3 Aug 2010 15:28:12 +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.
> Behaviour of search is as advised by Sam.
>
> From nconfig help:
>
> Searching: pressing '/' triggers search mode. nconfig performs a
> regular string compare, case insensitive, starting at

I would say: simple string compare
"regular" has no meaning (at least for me) there.

> the beginning of each menu line.\n"
> Pressing the up/down keys highlights the previous/next
> matching item. Backspace removes one character from the
> match string. Pressing either '/' again or ESC exits\
> search mode. All other keys behave normally.
>
> Miscellaneous other changes (including Rundy's Justin's input).

Yes, the bottom menu and the typos are fixed. Thanks.

However, I'm not finding this terribly useful, mostly due to it starting
comparison at the beginning of each menu line.

E.g., I'd like to be able to find "emulations" in the top-level menu here:
Executable file formats / Emulations --->

or I'd like to be able to find "crc" menu items in any sub-menu.
Maybe I should just stick to config symbol searches. I don't think it's all
that likely that people will know how each menu line text begins.


As for the search UI, I'd rather that it be presented like the symbol search,
in a box, instead of just a single line at the top of the screen.


> Signed-off-by: Nir Tzachar <nir.tzachar(a)gmail.com>
> ---
> scripts/kconfig/nconf.c | 350 +++++++++++++++++++++++++------------------
> scripts/kconfig/nconf.gui.c | 20 ++--
> scripts/kconfig/nconf.h | 3 +-
> 3 files changed, 213 insertions(+), 160 deletions(-)


---
~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: Randy Dunlap on
On 08/05/10 11:13, Nir Tzachar wrote:
> On Thu, Aug 5, 2010 at 8:04 PM, Randy Dunlap <randy.dunlap(a)oracle.com> wrote:
>> On Tue, 3 Aug 2010 15:28:12 +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.
>>> Behaviour of search is as advised by Sam.
>>>
>>> From nconfig help:
>>>
>>> Searching: pressing '/' triggers search mode. nconfig performs a
>>> regular string compare, case insensitive, starting at
>>
>> I would say: simple string compare
>> "regular" has no meaning (at least for me) there.
>
> Regular means strcasecmp...

That's not meaningful to a non-developer user.
I'm a developer and it still has little meaning to me in this context.


>>> the beginning of each menu line.\n"
>>> Pressing the up/down keys highlights the previous/next
>>> matching item. Backspace removes one character from the
>>> match string. Pressing either '/' again or ESC exits\
>>> search mode. All other keys behave normally.
>>>
>>> Miscellaneous other changes (including Rundy's Justin's input).
>>
>> Yes, the bottom menu and the typos are fixed. Thanks.
>>
>> However, I'm not finding this terribly useful, mostly due to it starting
>> comparison at the beginning of each menu line.
>>
>> E.g., I'd like to be able to find "emulations" in the top-level menu here:
>> Executable file formats / Emulations --->
>> or I'd like to be able to find "crc" menu items in any sub-menu.
>> Maybe I should just stick to config symbol searches. I don't think it's all
>> that likely that people will know how each menu line text begins.
>>
>>
>
> We can replace strcasecmp with strcasestr. I agree it would be more useful.

Yes.

>> As for the search UI, I'd rather that it be presented like the symbol search,
>> in a box, instead of just a single line at the top of the screen.
>
> But then it is not interactive. I was aiming for something similar to
> vim's search, where the search is matched as you type and the only
> free terminal real-estate to display the match string was at the top
> of the screen. I think such a minimal design is better than a
> cumbersome text box which displays the search results afterwards (as
> is symbol search), as the search is only intended for the currently
> displayed menu and the user would usually just want to save the extra
> typing of navigating to a specific menu item.

OK, I expect that I'll just mostly use symbol search instead of this one then.

The kicker for me is not how/where the dialog is -- it's this comment:

"as the search is only intended for the currently displayed menu"

I think that's much too limiting.


> Cheers.
>
>>> Signed-off-by: Nir Tzachar <nir.tzachar(a)gmail.com>
>>> ---
>>> scripts/kconfig/nconf.c | 350 +++++++++++++++++++++++++------------------
>>> scripts/kconfig/nconf.gui.c | 20 ++--
>>> scripts/kconfig/nconf.h | 3 +-
>>> 3 files changed, 213 insertions(+), 160 deletions(-)


--
~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: Nir Tzachar on
On Thu, Aug 5, 2010 at 8:04 PM, Randy Dunlap <randy.dunlap(a)oracle.com> wrote:
> On Tue, �3 Aug 2010 15:28:12 +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.
>> Behaviour of search is as advised by Sam.
>>
>> From nconfig help:
>>
>> Searching: pressing '/' triggers search mode. nconfig performs a
>> � � � � � �regular string compare, case insensitive, starting at
>
> I would say: simple string compare
> "regular" has no meaning (at least for me) there.

Regular means strcasecmp...

>> � � � � � �the beginning of each menu line.\n"
>> � � � � � �Pressing the up/down keys highlights the previous/next
>> � � � � � �matching item. Backspace removes one character from the
>> � � � � � �match string. Pressing either '/' again or ESC exits\
>> � � � � � �search mode. All other keys behave normally.
>>
>> Miscellaneous other changes (including Rundy's Justin's input).
>
> Yes, the bottom menu and the typos are fixed. �Thanks.
>
> However, I'm not finding this terribly useful, mostly due to it starting
> comparison at the beginning of each menu line.
>
> E.g., I'd like to be able to find "emulations" in the top-level menu here:
> � � � �Executable file formats / Emulations �--->
> or I'd like to be able to find "crc" menu items in any sub-menu.
> Maybe I should just stick to config symbol searches. �I don't think it's all
> that likely that people will know how each menu line text begins.
>
>

We can replace strcasecmp with strcasestr. I agree it would be more useful.

> As for the search UI, I'd rather that it be presented like the symbol search,
> in a box, instead of just a single line at the top of the screen.

But then it is not interactive. I was aiming for something similar to
vim's search, where the search is matched as you type and the only
free terminal real-estate to display the match string was at the top
of the screen. I think such a minimal design is better than a
cumbersome text box which displays the search results afterwards (as
is symbol search), as the search is only intended for the currently
displayed menu and the user would usually just want to save the extra
typing of navigating to a specific menu item.

Cheers.

>> Signed-off-by: Nir Tzachar <nir.tzachar(a)gmail.com>
>> ---
>> �scripts/kconfig/nconf.c � � | �350 +++++++++++++++++++++++++------------------
>> �scripts/kconfig/nconf.gui.c | � 20 ++--
>> �scripts/kconfig/nconf.h � � | � �3 +-
>> �3 files changed, 213 insertions(+), 160 deletions(-)
>
>
> ---
> ~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/