On Saturday, May 2, 2020 at 11:37:57 AM UTC-7, Sébastien Labbé wrote:
>
>
>
> On Saturday, May 2, 2020 at 7:55:25 PM UTC+2, John H Palmieri wrote:
>>
>>
>>
>> On Saturday, May 2, 2020 at 9:59:18 AM UTC-7, Sébastien Labbé wrote:
>>>
>>>
>>> I feel the same way about functions like search_src() that badly 
>>>> reimplement grep (even if they still work). 
>>>>
>>>
>>> I am fine with getting rid of the log_* functions, but I definitively 
>>> want search_src(), search_def() and search_doc() to stay. Shame on me, but 
>>> I use them when I need from the sage command line as well as the `sage 
>>> -grep` instead of grep when I want to search the sage source from *any* 
>>> directory on my computer.
>>>
>>
>> OMG, why does "sage -grep" use the "find" command?
>>
>
> I don't know, but just to mention that `sage -grep` can also be called as 
> `sage -search_src` which is the equivalent of search_src() from the command 
> line.
>
> $ sage -advanced
> ...
>   -search_src <string> -- search through all the Sage library code for 
> string
>   -search_doc <string> -- search through the Sage documentation for string
>   -grep <string>      -- same as -search_src
>   -grepdoc <string>   -- same as -search_doc
> ...
>

And search_src (etc.) used to be implemented with a combination of find and 
grep, just like sage -grep now. It was reimplemented in Python to make it 
work across platforms (because of differences in grep syntax, for example) 
and to make it faster (true story! see #6429).

If anyone has any interest in developing Sage for Solaris or other 
platforms whose grep doesn't support "-r", this is another reason to keep 
search_src, etc.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/3a94c844-2d51-4d38-80dd-64b6d6e8dd82%40googlegroups.com.

Reply via email to