gen_doc_cache

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

gen_doc_cache

Juan Pablo Carbajal
Hello,

The lines 111 to 123 of scripts/help/gen_doc_cache.m could be replaced with

dir_in_path = ismember (directory, strsplit (path (), pathsep ()));

would people go against such change? (makes the code more readable)

If you like it I can make a changeset and post it in savannah.

Thanks

--
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/
Reply | Threaded
Open this post in threaded view
|

Re: gen_doc_cache

c.-2

On 16 Mar 2012, at 09:57, Juan Pablo Carbajal wrote:

> Message: 8
> Date: Fri, 16 Mar 2012 09:56:50 +0100
> From: Juan Pablo Carbajal <[hidden email]>
> To: octave maintainers mailing list <[hidden email]>
> Subject: gen_doc_cache
> Message-ID:
> <[hidden email]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello,
>
> The lines 111 to 123 of scripts/help/gen_doc_cache.m could be replaced with
>
> dir_in_path = ismember (directory, strsplit (path (), pathsep ()));
>
> would people go against such change? (makes the code more readable)
>
> If you like it I can make a changeset and post it in savannah.
>
> Thanks

I like this change, wouldn't it also make sense to change gen_doc_cache.m
so that it can operate on a list of directories passed as a cell-array?
That would allow to get rid of scripts/pkg/private/generate_lookfor_cache.m
c.
Reply | Threaded
Open this post in threaded view
|

Re: gen_doc_cache

Juan Pablo Carbajal
On Fri, Mar 16, 2012 at 10:42 AM, c. <[hidden email]> wrote:

>
> On 16 Mar 2012, at 09:57, Juan Pablo Carbajal wrote:
>
>> Message: 8
>> Date: Fri, 16 Mar 2012 09:56:50 +0100
>> From: Juan Pablo Carbajal <[hidden email]>
>> To: octave maintainers mailing list <[hidden email]>
>> Subject: gen_doc_cache
>> Message-ID:
>>       <[hidden email]>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Hello,
>>
>> The lines 111 to 123 of scripts/help/gen_doc_cache.m could be replaced with
>>
>> dir_in_path = ismember (directory, strsplit (path (), pathsep ()));
>>
>> would people go against such change? (makes the code more readable)
>>
>> If you like it I can make a changeset and post it in savannah.
>>
>> Thanks
>
> I like this change, wouldn't it also make sense to change gen_doc_cache.m
> so that it can operate on a list of directories passed as a cell-array?
> That would allow to get rid of scripts/pkg/private/generate_lookfor_cache.m
> c.

I have uploaded the patch with the changes c. suggested.
https://savannah.gnu.org/patch/index.php?7744

Please do check the that the concatenations of the cells in line 138 is correct.

--
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/