* [RFC 0/1] mconf: Emacs-like isearch @ 2018-06-06 21:56 Dirk Gouders 2018-06-06 22:24 ` Randy Dunlap 0 siblings, 1 reply; 9+ messages in thread From: Dirk Gouders @ 2018-06-06 21:56 UTC (permalink / raw) To: Masahiro Yamada, linux-kbuild, linux-kernel; +Cc: Dirk Gouders Hello, being an Emacs user, I frequently find myself pressing CTRL-s in mconf to search for some menu entry, especially in large menus. I decided to implement a basic isearch in mconf and would like to hear if others find this functionality useful, as well. The new functionality is started with pressing CTRL-s followed by characters that form the search string. To search for further occurences of an entered string, press CTRL-s instead of further characters. For example: to navigate to the USB device drivers, press CTRL-s de ENTER ENTER usb ENTER ENTER Pressing just CTRL-s subsequently results in line-by-line navigation through the menu (search for empty strings). The isearch is terminated by pressing either ESC ESC or ENTER. Because I expect that errors are found in the code and changes are requested, I completely left out the documentation part and will add it to V2 should anyone find this functionality useful. Thanks, Dirk Dirk Gouders (1): Emacs-like isearch for mconf. scripts/kconfig/lxdialog/dialog.h | 5 ++ scripts/kconfig/lxdialog/menubox.c | 140 ++++++++++++++++++++++++++++++++++++- scripts/kconfig/lxdialog/util.c | 1 + 3 files changed, 145 insertions(+), 1 deletion(-) -- 2.16.4 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC 0/1] mconf: Emacs-like isearch 2018-06-06 21:56 [RFC 0/1] mconf: Emacs-like isearch Dirk Gouders @ 2018-06-06 22:24 ` Randy Dunlap 2018-06-06 22:32 ` Dirk Gouders 0 siblings, 1 reply; 9+ messages in thread From: Randy Dunlap @ 2018-06-06 22:24 UTC (permalink / raw) To: Dirk Gouders, Masahiro Yamada, linux-kbuild, linux-kernel On 06/06/2018 02:56 PM, Dirk Gouders wrote: > Hello, > > being an Emacs user, I frequently find myself pressing CTRL-s in mconf > to search for some menu entry, especially in large menus. > > I decided to implement a basic isearch in mconf and would like to hear > if others find this functionality useful, as well. > > The new functionality is started with pressing CTRL-s followed by > characters that form the search string. To search for further > occurences of an entered string, press CTRL-s instead of further > characters. > > For example: to navigate to the USB device drivers, press CTRL-s de ENTER ENTER usb ENTER ENTER Not being an emacs user, what is the "de" for above? > Pressing just CTRL-s subsequently results in line-by-line navigation > through the menu (search for empty strings). > > The isearch is terminated by pressing either ESC ESC or ENTER. > > Because I expect that errors are found in the code and changes are requested, I > completely left out the documentation part and will add it to V2 > should anyone find this functionality useful. Hm, it seems to take 2 entries of Ctrl-s to begin the search?? No, it takes 2 entries of Ctrl-s to display the "isearch:" prompt, but entering one Ctrl-s + a string will display it also. Anyway, I am having trouble getting the USB drivers example to work. > Thanks, > > Dirk > > Dirk Gouders (1): > Emacs-like isearch for mconf. > > scripts/kconfig/lxdialog/dialog.h | 5 ++ > scripts/kconfig/lxdialog/menubox.c | 140 ++++++++++++++++++++++++++++++++++++- > scripts/kconfig/lxdialog/util.c | 1 + > 3 files changed, 145 insertions(+), 1 deletion(-) > thanks, -- ~Randy ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC 0/1] mconf: Emacs-like isearch 2018-06-06 22:24 ` Randy Dunlap @ 2018-06-06 22:32 ` Dirk Gouders 2018-06-06 23:31 ` Randy Dunlap 0 siblings, 1 reply; 9+ messages in thread From: Dirk Gouders @ 2018-06-06 22:32 UTC (permalink / raw) To: Randy Dunlap; +Cc: Masahiro Yamada, linux-kbuild, linux-kernel Randy Dunlap <rdunlap@infradead.org> writes: > On 06/06/2018 02:56 PM, Dirk Gouders wrote: >> Hello, >> >> being an Emacs user, I frequently find myself pressing CTRL-s in mconf >> to search for some menu entry, especially in large menus. >> >> I decided to implement a basic isearch in mconf and would like to hear >> if others find this functionality useful, as well. >> >> The new functionality is started with pressing CTRL-s followed by >> characters that form the search string. To search for further >> occurences of an entered string, press CTRL-s instead of further >> characters. >> >> For example: to navigate to the USB device drivers, press CTRL-s de ENTER ENTER usb ENTER ENTER > > Not being an emacs user, what is the "de" for above? "de" (with my .config) causes a match for "Device Drivers" -- no other menu entry matching the string "de" is befor that entry. > >> Pressing just CTRL-s subsequently results in line-by-line navigation >> through the menu (search for empty strings). >> >> The isearch is terminated by pressing either ESC ESC or ENTER. >> >> Because I expect that errors are found in the code and changes are requested, I >> completely left out the documentation part and will add it to V2 >> should anyone find this functionality useful. > > Hm, it seems to take 2 entries of Ctrl-s to begin the search?? > No, it takes 2 entries of Ctrl-s to display the "isearch:" prompt, > but entering one Ctrl-s + a string will display it also. > > Anyway, I am having trouble getting the USB drivers example to work. Yes, I should have stated that this example explains what _I_ have to do to navigate to the USB device drivers. Probably, "de" in your case matches some other menu entry and the navigation requires more or other input. I'm sorry for causing confusion. Dirk >> Thanks, >> >> Dirk >> >> Dirk Gouders (1): >> Emacs-like isearch for mconf. >> >> scripts/kconfig/lxdialog/dialog.h | 5 ++ >> scripts/kconfig/lxdialog/menubox.c | 140 ++++++++++++++++++++++++++++++++++++- >> scripts/kconfig/lxdialog/util.c | 1 + >> 3 files changed, 145 insertions(+), 1 deletion(-) >> > > thanks, ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC 0/1] mconf: Emacs-like isearch 2018-06-06 22:32 ` Dirk Gouders @ 2018-06-06 23:31 ` Randy Dunlap 2018-06-06 23:54 ` Dirk Gouders 0 siblings, 1 reply; 9+ messages in thread From: Randy Dunlap @ 2018-06-06 23:31 UTC (permalink / raw) To: Dirk Gouders; +Cc: Masahiro Yamada, linux-kbuild, linux-kernel On 06/06/2018 03:32 PM, Dirk Gouders wrote: > Randy Dunlap <rdunlap@infradead.org> writes: > >> On 06/06/2018 02:56 PM, Dirk Gouders wrote: >>> Hello, >>> >>> being an Emacs user, I frequently find myself pressing CTRL-s in mconf >>> to search for some menu entry, especially in large menus. >>> >>> I decided to implement a basic isearch in mconf and would like to hear >>> if others find this functionality useful, as well. >>> >>> The new functionality is started with pressing CTRL-s followed by >>> characters that form the search string. To search for further >>> occurences of an entered string, press CTRL-s instead of further >>> characters. >>> >>> For example: to navigate to the USB device drivers, press CTRL-s de ENTER ENTER usb ENTER ENTER >> >> Not being an emacs user, what is the "de" for above? > > "de" (with my .config) causes a match for "Device Drivers" -- > no other menu entry matching the string "de" is befor that entry. > Device Drivers is the first match for me also. To get to the USB drivers, I have to enter: CTRL-s de ENTER ENTER CTRL-s usb ENTER ENTER >> >>> Pressing just CTRL-s subsequently results in line-by-line navigation >>> through the menu (search for empty strings). >>> >>> The isearch is terminated by pressing either ESC ESC or ENTER. >>> >>> Because I expect that errors are found in the code and changes are requested, I >>> completely left out the documentation part and will add it to V2 >>> should anyone find this functionality useful. >> >> Hm, it seems to take 2 entries of Ctrl-s to begin the search?? >> No, it takes 2 entries of Ctrl-s to display the "isearch:" prompt, >> but entering one Ctrl-s + a string will display it also. >> >> Anyway, I am having trouble getting the USB drivers example to work. > > Yes, I should have stated that this example explains what _I_ have to do to > navigate to the USB device drivers. Probably, "de" in your case matches > some other menu entry and the navigation requires more or other input. > > I'm sorry for causing confusion. No problem. Thanks. > Dirk > >>> Thanks, >>> >>> Dirk >>> >>> Dirk Gouders (1): >>> Emacs-like isearch for mconf. >>> >>> scripts/kconfig/lxdialog/dialog.h | 5 ++ >>> scripts/kconfig/lxdialog/menubox.c | 140 ++++++++++++++++++++++++++++++++++++- >>> scripts/kconfig/lxdialog/util.c | 1 + >>> 3 files changed, 145 insertions(+), 1 deletion(-) >>> >> >> thanks, -- ~Randy ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC 0/1] mconf: Emacs-like isearch 2018-06-06 23:31 ` Randy Dunlap @ 2018-06-06 23:54 ` Dirk Gouders 2018-06-07 2:02 ` Masahiro Yamada 0 siblings, 1 reply; 9+ messages in thread From: Dirk Gouders @ 2018-06-06 23:54 UTC (permalink / raw) To: Randy Dunlap; +Cc: Masahiro Yamada, linux-kbuild, linux-kernel Randy Dunlap <rdunlap@infradead.org> writes: > On 06/06/2018 03:32 PM, Dirk Gouders wrote: >> Randy Dunlap <rdunlap@infradead.org> writes: >> >>> On 06/06/2018 02:56 PM, Dirk Gouders wrote: >>>> Hello, >>>> >>>> being an Emacs user, I frequently find myself pressing CTRL-s in mconf >>>> to search for some menu entry, especially in large menus. >>>> >>>> I decided to implement a basic isearch in mconf and would like to hear >>>> if others find this functionality useful, as well. >>>> >>>> The new functionality is started with pressing CTRL-s followed by >>>> characters that form the search string. To search for further >>>> occurences of an entered string, press CTRL-s instead of further >>>> characters. >>>> >>>> For example: to navigate to the USB device drivers, press CTRL-s de ENTER ENTER usb ENTER ENTER >>> >>> Not being an emacs user, what is the "de" for above? >> >> "de" (with my .config) causes a match for "Device Drivers" -- >> no other menu entry matching the string "de" is befor that entry. >> > > Device Drivers is the first match for me also. > > To get to the USB drivers, I have to enter: > CTRL-s de ENTER ENTER CTRL-s usb ENTER ENTER Yes, I left out the second CTRL-s, thank you! Oh well, I shouldn't have sent this late at night, then I would probably have explained the needed input as: 1) CTRL-s // start isearch 2) de // substring that matches "Device Drivers" 3) ENTER // quit isearch 4) ENTER // enter Device Drivers menu 5) CTRL-s // start isearch 6) usb // navigate to USB support 7) ENTER // quit isearch 8) ENTER // enter USB support menu Again, I'm really sorry for the confusion. Dirk ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC 0/1] mconf: Emacs-like isearch 2018-06-06 23:54 ` Dirk Gouders @ 2018-06-07 2:02 ` Masahiro Yamada 2018-06-07 5:56 ` Dirk Gouders 0 siblings, 1 reply; 9+ messages in thread From: Masahiro Yamada @ 2018-06-07 2:02 UTC (permalink / raw) To: Dirk Gouders Cc: Randy Dunlap, Linux Kbuild mailing list, Linux Kernel Mailing List 2018-06-07 8:54 GMT+09:00 Dirk Gouders <dirk@gouders.net>: > Randy Dunlap <rdunlap@infradead.org> writes: > >> On 06/06/2018 03:32 PM, Dirk Gouders wrote: >>> Randy Dunlap <rdunlap@infradead.org> writes: >>> >>>> On 06/06/2018 02:56 PM, Dirk Gouders wrote: >>>>> Hello, >>>>> >>>>> being an Emacs user, I frequently find myself pressing CTRL-s in mconf >>>>> to search for some menu entry, especially in large menus. I use Emacs, but I have never typed Ctrl-s in menuconfig. Is it important to use the same key pattern as in Emacs? You intercepted Ctrl-* Currently, Ctrl-C terminates the program, but this patch makes it no-op. >>>>> I decided to implement a basic isearch in mconf and would like to hear >>>>> if others find this functionality useful, as well. >>>>> >>>>> The new functionality is started with pressing CTRL-s followed by >>>>> characters that form the search string. To search for further >>>>> occurences of an entered string, press CTRL-s instead of further >>>>> characters. >>>>> >>>>> For example: to navigate to the USB device drivers, press CTRL-s de ENTER ENTER usb ENTER ENTER >>>> >>>> Not being an emacs user, what is the "de" for above? >>> >>> "de" (with my .config) causes a match for "Device Drivers" -- >>> no other menu entry matching the string "de" is befor that entry. >>> >> >> Device Drivers is the first match for me also. >> >> To get to the USB drivers, I have to enter: >> CTRL-s de ENTER ENTER CTRL-s usb ENTER ENTER > > Yes, I left out the second CTRL-s, thank you! > > Oh well, I shouldn't have sent this late at night, then I would probably > have explained the needed input as: > > 1) CTRL-s // start isearch > 2) de // substring that matches "Device Drivers" > 3) ENTER // quit isearch > 4) ENTER // enter Device Drivers menu > 5) CTRL-s // start isearch > 6) usb // navigate to USB support > 7) ENTER // quit isearch > 8) ENTER // enter USB support menu Hmm. I tried this, but I was a bit annoyed. I wonder if this could be more user-friendly. For example, I want KEY_UP/DOWN/LEFT/RIGHT to quit the search mode without pressing ENTER. > Again, I'm really sorry for the confusion. > > Dirk > -- > To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html You in -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC 0/1] mconf: Emacs-like isearch 2018-06-07 2:02 ` Masahiro Yamada @ 2018-06-07 5:56 ` Dirk Gouders 2018-06-07 16:32 ` Sam Ravnborg 0 siblings, 1 reply; 9+ messages in thread From: Dirk Gouders @ 2018-06-07 5:56 UTC (permalink / raw) To: Masahiro Yamada Cc: Randy Dunlap, Linux Kbuild mailing list, Linux Kernel Mailing List, Segher Boessenkool Masahiro Yamada <yamada.masahiro@socionext.com> writes: > 2018-06-07 8:54 GMT+09:00 Dirk Gouders <dirk@gouders.net>: >> Randy Dunlap <rdunlap@infradead.org> writes: >> >>> On 06/06/2018 03:32 PM, Dirk Gouders wrote: >>>> Randy Dunlap <rdunlap@infradead.org> writes: >>>> >>>>> On 06/06/2018 02:56 PM, Dirk Gouders wrote: >>>>>> Hello, >>>>>> >>>>>> being an Emacs user, I frequently find myself pressing CTRL-s in mconf >>>>>> to search for some menu entry, especially in large menus. > > > I use Emacs, but I have never typed Ctrl-s in menuconfig. > > Is it important to use the same key pattern as in Emacs? > > You intercepted Ctrl-* > > Currently, Ctrl-C terminates the program, > but this patch makes it no-op. Yes, Segher also pointed out that I at least should have mentioned this in the cover letter. I simply forgot that, but I was aware that forced raw-mode probably is not acceptable. I'd say it's not important to start isearch with CTRL-s, I am just so used to it. So, I am open for suggestions. Meanwhile, in a V2 I will try to stay with CTRL-s (and probably another unused simpler key) but also create a possibility to toggle raw-mode with default off. >>>>>> I decided to implement a basic isearch in mconf and would like to hear >>>>>> if others find this functionality useful, as well. >>>>>> >>>>>> The new functionality is started with pressing CTRL-s followed by >>>>>> characters that form the search string. To search for further >>>>>> occurences of an entered string, press CTRL-s instead of further >>>>>> characters. >>>>>> >>>>>> For example: to navigate to the USB device drivers, press CTRL-s de ENTER ENTER usb ENTER ENTER >>>>> >>>>> Not being an emacs user, what is the "de" for above? >>>> >>>> "de" (with my .config) causes a match for "Device Drivers" -- >>>> no other menu entry matching the string "de" is befor that entry. >>>> >>> >>> Device Drivers is the first match for me also. >>> >>> To get to the USB drivers, I have to enter: >>> CTRL-s de ENTER ENTER CTRL-s usb ENTER ENTER >> >> Yes, I left out the second CTRL-s, thank you! >> >> Oh well, I shouldn't have sent this late at night, then I would probably >> have explained the needed input as: >> >> 1) CTRL-s // start isearch >> 2) de // substring that matches "Device Drivers" >> 3) ENTER // quit isearch >> 4) ENTER // enter Device Drivers menu >> 5) CTRL-s // start isearch >> 6) usb // navigate to USB support >> 7) ENTER // quit isearch >> 8) ENTER // enter USB support menu > > > Hmm. > > I tried this, but I was a bit annoyed. > > > I wonder if this could be more user-friendly. > > For example, I want KEY_UP/DOWN/LEFT/RIGHT > to quit the search mode without pressing ENTER. Thank you for testing it. Concerning annoyance, did you mean the isearch functionality itself or the incomplete implementation, i.e. the missing possibility to use above keys? I will handle the above keys in V2, additionally to fixing a problem with mismatches. Dirk ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC 0/1] mconf: Emacs-like isearch 2018-06-07 5:56 ` Dirk Gouders @ 2018-06-07 16:32 ` Sam Ravnborg 2018-06-08 7:56 ` Dirk Gouders 0 siblings, 1 reply; 9+ messages in thread From: Sam Ravnborg @ 2018-06-07 16:32 UTC (permalink / raw) To: Dirk Gouders Cc: Masahiro Yamada, Randy Dunlap, Linux Kbuild mailing list, Linux Kernel Mailing List, Segher Boessenkool > > I'd say it's not important to start isearch with CTRL-s, I am just so > used to it. So, I am open for suggestions. Today we have first or one of the first letters as shortcut to menus. How about considering everything typed as search inputs. Search is then stopped by ESC, arrow keys and maybe more. Search is only possible when a menu is selected, not with focus on the buttons. This will break the habits of people used to the shortcut variant, but then we have the more flexible i-search variant. Idea? Sam ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC 0/1] mconf: Emacs-like isearch 2018-06-07 16:32 ` Sam Ravnborg @ 2018-06-08 7:56 ` Dirk Gouders 0 siblings, 0 replies; 9+ messages in thread From: Dirk Gouders @ 2018-06-08 7:56 UTC (permalink / raw) To: Sam Ravnborg Cc: Masahiro Yamada, Randy Dunlap, Linux Kbuild mailing list, Linux Kernel Mailing List, Segher Boessenkool Sam Ravnborg <sam@ravnborg.org> writes: >> >> I'd say it's not important to start isearch with CTRL-s, I am just so >> used to it. So, I am open for suggestions. > > Today we have first or one of the first letters as shortcut to menus. > How about considering everything typed as search inputs. > Search is then stopped by ESC, arrow keys and maybe more. > > Search is only possible when a menu is selected, not with focus on the buttons. > > This will break the habits of people used to the shortcut variant, > but then we have the more flexible i-search variant. > > Idea? Sounds very interesting, I will see if I can prepare a prototype so that users can test it an see if they feel that would be an improvement for them. In mconf, a focus on the buttons would be conceptually new and I am anticipating I am not yet realizing all of the consequences. One situation, I am still thinking about how to handle it (without a dedicated search key): * The user types a string and then doesn't want to enter further string characters but find further occurences of the already entered string. (In my imagination, TAB is reserved to change focus to the buttons, ENTER is reserved to stop searching -- and enter a submenu, depending on the item.) Dirk ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-06-08 8:12 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-06-06 21:56 [RFC 0/1] mconf: Emacs-like isearch Dirk Gouders 2018-06-06 22:24 ` Randy Dunlap 2018-06-06 22:32 ` Dirk Gouders 2018-06-06 23:31 ` Randy Dunlap 2018-06-06 23:54 ` Dirk Gouders 2018-06-07 2:02 ` Masahiro Yamada 2018-06-07 5:56 ` Dirk Gouders 2018-06-07 16:32 ` Sam Ravnborg 2018-06-08 7:56 ` Dirk Gouders
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox