2006-03-27 19:53:15

by Shlomi Fish

[permalink] [raw]
Subject: [PATCH] PoC "make xconfig" Search Facility

Hi all!

[ I'm not subscribed to this list so please CC me on your replies. ]

This patch adds a proof-of-concept search facility to "make xconfig". Current
problems and limitations:

1. Only case-insensitive single-substring search is supported.

2. The style is completely wrong, as I could not find a suitable vim
configuration for editing Linux kernel source (and Google was not help). If
anyone can refer me to one, I'll be grateful.

3. At the moment the results are displayed in a listbox as text. One cannot go
from the result node to the place to toggle it in the configuration. (much
less from one of it ancessorts)

But it works!

The patch is against kernel 2.6.16-git13.

Comments, suggestions, corrections, and flames are welcome.

Regards,

Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish [email protected]
Homepage: http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.


Attachments:
(No filename) (0.99 kB)
xconfig-search-2.6.16-git13.patch (4.97 kB)
Download all attachments

2006-03-28 18:41:24

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] PoC "make xconfig" Search Facility

On Mon, 27 Mar 2006 21:50:41 +0200 Shlomi Fish wrote:

> Hi all!
>
> [ I'm not subscribed to this list so please CC me on your replies. ]
>
> This patch adds a proof-of-concept search facility to "make xconfig". Current
> problems and limitations:
>
> 1. Only case-insensitive single-substring search is supported.
>
> 2. The style is completely wrong, as I could not find a suitable vim
> configuration for editing Linux kernel source (and Google was not help). If
> anyone can refer me to one, I'll be grateful.

I don't know of a vim config for kernel source code.
Just read/use Documentation/CodingStyle, although for this code that probably
doesn't matter so much (since this isn't kernel run-time code).

> 3. At the moment the results are displayed in a listbox as text. One cannot go
> from the result node to the place to toggle it in the configuration. (much
> less from one of it ancessorts)
>
> But it works!
>
> The patch is against kernel 2.6.16-git13.
>
> Comments, suggestions, corrections, and flames are welcome.

Thanks. It's useful and a good start.

A one-line comment about how to invoke it would have been nice:
Use Edit/Find or Ctrl-F to invoke the search (find) tool.

To be really useful it needs to display items that SELECT the search string
IMO. Look at how menuconfig can do that.

E.g., for FW_LOADER (my favorite because it keeps me from disabling HOTPLUG
so often), using /FW_LOADER in menuconfig tells me what SELECTs FW_LOADER
as well as where it's defined.

Being able to enter more queries without leaving the dialog box is nice/good.

Oh, and patches should apply with 'patch -p1' (i.e., their filenames should
begin with linux-tree/scripts/ etc., not with scripts/*).

---
~Randy

2006-03-28 19:55:28

by Shlomi Fish

[permalink] [raw]
Subject: Re: [PATCH] PoC "make xconfig" Search Facility

On Tuesday 28 March 2006 20:43, Randy.Dunlap wrote:
> On Mon, 27 Mar 2006 21:50:41 +0200 Shlomi Fish wrote:
> > Hi all!
> >
> > [ I'm not subscribed to this list so please CC me on your replies. ]
> >
> > This patch adds a proof-of-concept search facility to "make xconfig".
> > Current problems and limitations:
> >
> > 1. Only case-insensitive single-substring search is supported.
> >
> > 2. The style is completely wrong, as I could not find a suitable vim
> > configuration for editing Linux kernel source (and Google was not help).
> > If anyone can refer me to one, I'll be grateful.
>
> I don't know of a vim config for kernel source code.

Too bad. :(

> Just read/use Documentation/CodingStyle, although for this code that
> probably doesn't matter so much (since this isn't kernel run-time code).

Thing is when I enter tabs by default in Vim it uses 4 whitespace, and I need
it to insert a real tab. This is just an example, I want to edit this in
comfort.

Surely some kernel hackers use Vim, and someone must have come up with a vim
config for editing kernel source.

>
> > 3. At the moment the results are displayed in a listbox as text. One
> > cannot go from the result node to the place to toggle it in the
> > configuration. (much less from one of it ancessorts)
> >
> > But it works!
> >
> > The patch is against kernel 2.6.16-git13.
> >
> > Comments, suggestions, corrections, and flames are welcome.
>
> Thanks. It's useful and a good start.

Thanks.

>
> A one-line comment about how to invoke it would have been nice:
> Use Edit/Find or Ctrl-F to invoke the search (find) tool.
>

Where do you want this comment in? In the source code? In the application
itself? Somewhere else?

> To be really useful it needs to display items that SELECT the search string
> IMO. Look at how menuconfig can do that.
>
> E.g., for FW_LOADER (my favorite because it keeps me from disabling HOTPLUG
> so often), using /FW_LOADER in menuconfig tells me what SELECTs FW_LOADER
> as well as where it's defined.

Yes, I realise that. Of course implementing it in "make xconfig" would be
completely different than in "make menu config".

>
> Being able to enter more queries without leaving the dialog box is
> nice/good.
>
> Oh, and patches should apply with 'patch -p1' (i.e., their filenames should
> begin with linux-tree/scripts/ etc., not with scripts/*).

OK, I'll keep it in mind.

Regards,

Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish [email protected]
Homepage: http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.

2006-03-28 20:09:37

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] PoC "make xconfig" Search Facility

On Tue, 28 Mar 2006 21:53:04 +0200 Shlomi Fish wrote:

> On Tuesday 28 March 2006 20:43, Randy.Dunlap wrote:
> > On Mon, 27 Mar 2006 21:50:41 +0200 Shlomi Fish wrote:
> > > Hi all!
> > >
> > > [ I'm not subscribed to this list so please CC me on your replies. ]
> > >
> > > This patch adds a proof-of-concept search facility to "make xconfig".
> > > Current problems and limitations:
> > >
> > > 1. Only case-insensitive single-substring search is supported.
> > >
> > > 2. The style is completely wrong, as I could not find a suitable vim
> > > configuration for editing Linux kernel source (and Google was not help).
> > > If anyone can refer me to one, I'll be grateful.
> >
> > I don't know of a vim config for kernel source code.
>
> Too bad. :(
>
> > Just read/use Documentation/CodingStyle, although for this code that
> > probably doesn't matter so much (since this isn't kernel run-time code).
>
> Thing is when I enter tabs by default in Vim it uses 4 whitespace, and I need
> it to insert a real tab. This is just an example, I want to edit this in
> comfort.
>
> Surely some kernel hackers use Vim, and someone must have come up with a vim
> config for editing kernel source.

Sure, lots of us do, but I'm not aware of an accepted vim config file for
kernel work. My vim doesn't use spaces for tabs, e.g.
And there are a few source files in the kernel with vi(m) settings in them.
Maybe that could help you.

> > > 3. At the moment the results are displayed in a listbox as text. One
> > > cannot go from the result node to the place to toggle it in the
> > > configuration. (much less from one of it ancessorts)
> > >
> > > But it works!
> > >
> > > The patch is against kernel 2.6.16-git13.
> > >
> > > Comments, suggestions, corrections, and flames are welcome.
> >
> > Thanks. It's useful and a good start.
>
> Thanks.
>
> >
> > A one-line comment about how to invoke it would have been nice:
> > Use Edit/Find or Ctrl-F to invoke the search (find) tool.
> >
>
> Where do you want this comment in? In the source code? In the application
> itself? Somewhere else?

Oh, just in your email mainly. and in the source code could help also.


> > To be really useful it needs to display items that SELECT the search string
> > IMO. Look at how menuconfig can do that.
> >
> > E.g., for FW_LOADER (my favorite because it keeps me from disabling HOTPLUG
> > so often), using /FW_LOADER in menuconfig tells me what SELECTs FW_LOADER
> > as well as where it's defined.
>
> Yes, I realise that. Of course implementing it in "make xconfig" would be
> completely different than in "make menu config".

Right, I just meant the use of it.

> > Being able to enter more queries without leaving the dialog box is
> > nice/good.
> >
> > Oh, and patches should apply with 'patch -p1' (i.e., their filenames should
> > begin with linux-tree/scripts/ etc., not with scripts/*).
>
> OK, I'll keep it in mind.


---
~Randy

2006-03-29 09:27:51

by Shlomi Fish

[permalink] [raw]
Subject: Re: [PATCH] PoC "make xconfig" Search Facility

On Tuesday 28 March 2006 22:11, Randy.Dunlap wrote:
> On Tue, 28 Mar 2006 21:53:04 +0200 Shlomi Fish wrote:
> > On Tuesday 28 March 2006 20:43, Randy.Dunlap wrote:
> > > On Mon, 27 Mar 2006 21:50:41 +0200 Shlomi Fish wrote:
> > > > Hi all!
> > > >
> > > > [ I'm not subscribed to this list so please CC me on your replies. ]
> > > >
> > > > This patch adds a proof-of-concept search facility to "make xconfig".
> > > > Current problems and limitations:
> > > >
> > > > 1. Only case-insensitive single-substring search is supported.
> > > >
> > > > 2. The style is completely wrong, as I could not find a suitable vim
> > > > configuration for editing Linux kernel source (and Google was not
> > > > help). If anyone can refer me to one, I'll be grateful.
> > >
> > > I don't know of a vim config for kernel source code.
> >
> > Too bad. :(
> >
> > > Just read/use Documentation/CodingStyle, although for this code that
> > > probably doesn't matter so much (since this isn't kernel run-time
> > > code).
> >
> > Thing is when I enter tabs by default in Vim it uses 4 whitespace, and I
> > need it to insert a real tab. This is just an example, I want to edit
> > this in comfort.
> >
> > Surely some kernel hackers use Vim, and someone must have come up with a
> > vim config for editing kernel source.
>
> Sure, lots of us do, but I'm not aware of an accepted vim config file for
> kernel work. My vim doesn't use spaces for tabs, e.g.
> And there are a few source files in the kernel with vi(m) settings in them.
> Maybe that could help you.

Thanks! I'll take a look.

>
> > > > 3. At the moment the results are displayed in a listbox as text. One
> > > > cannot go from the result node to the place to toggle it in the
> > > > configuration. (much less from one of it ancessorts)
> > > >
> > > > But it works!
> > > >
> > > > The patch is against kernel 2.6.16-git13.
> > > >
> > > > Comments, suggestions, corrections, and flames are welcome.
> > >
> > > Thanks. It's useful and a good start.
> >
> > Thanks.
> >
> > > A one-line comment about how to invoke it would have been nice:
> > > Use Edit/Find or Ctrl-F to invoke the search (find) tool.
> >
> > Where do you want this comment in? In the source code? In the application
> > itself? Somewhere else?
>
> Oh, just in your email mainly. and in the source code could help also.
>

I see. Well, I didn't see any comments for the other menu options. But I could
add one for the new feature somewhere.

> > > To be really useful it needs to display items that SELECT the search
> > > string IMO. Look at how menuconfig can do that.
> > >
> > > E.g., for FW_LOADER (my favorite because it keeps me from disabling
> > > HOTPLUG so often), using /FW_LOADER in menuconfig tells me what SELECTs
> > > FW_LOADER as well as where it's defined.
> >
> > Yes, I realise that. Of course implementing it in "make xconfig" would be
> > completely different than in "make menu config".
>
> Right, I just meant the use of it.
>

OK.

Regards,

Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish [email protected]
Homepage: http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.