Project file list support for the grepview part

Matthew Woehlke mwoehlke at tibco.com
Thu Oct 19 21:48:04 UTC 2006


Kris Wong wrote:
>> Um, why do you not 'cat <project>.filelist | sed 1d | xargs ...'? 
>> Wouldn't this be a lot simpler, and not need the extra (and redundant)
>> temp file?
> 
> This file does not exist for qmake or automake projects.  I would
> imagine there are other project types that this file does not exist for
> as well.  For projects in which this file does exist, it contains
> relative paths.

Right, my bad. :-)

>> I see you disable files_combo (good), dir_combo (ditto), and 
>> no_find_err_box (also good), but why do you disable exclude_combo?
>> This should work fine with cat'ing a file list, since it operates
>> downstream  of 'find'. (You'll have to move it outside your added
>> if-block, of course.)
> 
> The exclude combo removes find results that match certain strings (such
> as directories that have files the user doesn't care about such as
> version control files).  I am no longer doing a find, and I am limiting
> the search to files in the project, which makes exclude combobox
> somewhat useless (unless for some reason the user wanted to disclude
> files that were in the project).

Well, yeah, I didn't understand why you would want to remove a means of 
excluding files in "the result list". In this case, "the result list", 
as you say, is the list of files in the project. Say for instance I am 
working on bash and want to look everywhere (in files in the project) 
except lib/readline - how do I do that now?

Would be nice if you could filter by 'file types' as well (what if I 
want to look in only *.h's?) but that isn't nearly as simple, and should 
be left for a later date.

(Ok, one way you could do it is to still do the search, then somehow 
merge it with the file list and do '| sort | uniq -c | sed -n '/^ *2/s/ 
*2//p', but that's not the most efficient solution.)

> In order to avoid user confusion, I
> disabled this combo.  An argument could be made that user might still
> want to use this combo, in which case I can re-enable it and implement
> its functionality.

I guess I just did. :-)
Hmm... I don't think it would be confusing, you do... any tie breakers? ;-)

>> Also removing the 'quote spaces before going into xargs' sed 
>> pipe looks like a bug waiting to happen.
> 
> The sed command replaces all " " characters with "\ ".  The files listed
> in the temporary file are enclosed in "'" characters, so escaping the
> spaces causes issues.

Ok, I didn't look at it that closely. If you've tested files with spaces 
in them, I'll take your word this isn't needed.

> This new patch contains fixes for the 2 bugs (both caused by spaces in
> the project directory path) and updated tabbing.  There was mixed
> tabbing in these files so I tried to match the surrounding code the best
> I could.

Yep, that fixed the patch; thanks. No more bits that do nothing but 
change the indentation...

> If it is desired I can also re-enable the exclude_combo.

Well /I/ desire it, but (as the one responsible for that particular 
feature) I'm biased. :-) Though it does seem silly (to me) to disable a 
potentially useful feature. Again, any tie breakers?

-- 
Matthew
"Try to bring it back in one piece this time." -- Q (MI6)





More information about the KDevelop-devel mailing list