#12333: Add back functionality that was inadvertantly deleted from Sage
--------------------------------------------+-------------------------------
   Reporter:  was                           |          Owner:  jason         
       Type:  defect                        |         Status:  needs_review  
   Priority:  major                         |      Milestone:  sage-5.0      
  Component:  misc                          |       Keywords:                
Work_issues:                                |       Upstream:  N/A           
   Reviewer:  William Stein, John Palmieri  |         Author:  Francis Clarke
     Merged:                                |   Dependencies:                
--------------------------------------------+-------------------------------
Changes (by jhpalmieri):

  * reviewer:  => William Stein, John Palmieri


Old description:

> I just tried one of my *favorite* command line options in Sage-4.8:
> {{{
> $ sage -grep optional |grep gap # and all kinds of other awesome command
> line stuff
> }}}
> and was very surprised and disappointed that (a) {{{sage -grep}}} is just
> gone, and (b) there is no other equivalent command line functionality.
>
> Searching reveals that #12190 removed {{{sage -grep}}} from sage.  You
> can't just remove functionality without any comment.  At a minimum it
> would have to be deprecated for a year, and should also be discussed on
> sage-devel.
>
> I'm able to accomplish what I want via
> {{{
> ./sage -c "search_src('optional', 'gap')"
> }}}
> However, this requires starting up Sage, which is much slower than the
> old {{{sage -grep}}}.   I admit that "-grep" wasn't the best command line
> option name -- search_src would have been better.
>
> The optimal fix for this ticket would be to refactor the code in
> sage/misc/sagedoc.py (if possible) so it can be imported without
> importing all Sage, then use it to implement a command line
> "-search_src", and add back "-grep" with a 1-year deprecation.
>
> Failing that, just revert #12190 for 1 year.

New description:

 I just tried one of my *favorite* command line options in Sage-4.8:
 {{{
 $ sage -grep optional |grep gap # and all kinds of other awesome command
 line stuff
 }}}
 and was very surprised and disappointed that (a) {{{sage -grep}}} is just
 gone, and (b) there is no other equivalent command line functionality.

 Searching reveals that #12190 removed {{{sage -grep}}} from sage.  You
 can't just remove functionality without any comment.  At a minimum it
 would have to be deprecated for a year, and should also be discussed on
 sage-devel.

 I'm able to accomplish what I want via
 {{{
 ./sage -c "search_src('optional', 'gap')"
 }}}
 However, this requires starting up Sage, which is much slower than the old
 {{{sage -grep}}}.   I admit that "-grep" wasn't the best command line
 option name -- search_src would have been better.

 The optimal fix for this ticket would be to refactor the code in
 sage/misc/sagedoc.py (if possible) so it can be imported without importing
 all Sage, then use it to implement a command line "-search_src", and add
 back "-grep" with a 1-year deprecation.

 Failing that, just revert #12190 for 1 year.

 -------

 Apply:

  - [attachment:trac_12333_restore_grep_root.patch] to the root repo
  - [attachment:trac_12333_restore_grep_scripts.patch] to the scripts repo
  - [attachment:trac_12333-documentation.patch] to the main Sage library
 repo

--

Comment:

 Looks good, works on sage.math, OS X, !OpenSolaris. So there don't seem to
 be any cross-platform issues.

 I'm happy with the two main patches: positive review for those. What do
 you think of the attached patch for the reference manual?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12333#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to