Why do you think GAP is relevant? The relevant command seems to be
cmd = 'sage -grepdoc "%s" | grep "%s"'%(s,extra)
(The default is extra=''). So can you try 'sage -grepdoc' on your
architecture?
Nick
SAGE_ROOT/local/bin/sage-foo
> but I don't know where find is used here. Does grep call find?
Yes, depending on what parameters you give it. The string you give to
search_doc is actually considered a shell command first and a regular
expression second. Can you try "cannot\;" and "cannot\\;" (note
slashes)? I am a little curious that just "cannot" fails at all.
Nick
I've definitely used the "search path too" behavior on purpose at
various times. In particular, doing things like adding "matrix" to the
search essentially narrows the result to the sage/matrix/ directory,
which can be handy. Of course, this is clearly a bit of a hack, and
inconsistent (as John is pointing out). So how about instead, we
implement what I'm actually trying to do with this -- add a "path"
optional argument to the search_* functions. (If you're using os.walk,
this should be pretty trivial to add, I think.) It'd be especially fun
if you could give it the name of a module (so that I could tab
complete), too.
-cc