DervishD wrote:

>     I've discovered that ":helpgrep pattern" doesn't work for me, always
> returning "E480" (BTW, ":help E480" shows help about "argdelete", as if
> E numbers in source code and docs weren't synchronized).
> 
>     But that's not the weird part. If I search for a very common word
> (let's say "most", for example), "helpgrep" returns the E480 error and
> it does *lightning fast!*. That's the weird problem it is not doing the
> search at all, and the E480 error is probably masking the real problem,
> which I couldn't isolate.
> 
>     Finally, examining the source code, I found the problem. I have my
> vim documentation installed in /usr/doc, which is where all
> documentation is installed on my system. I've set "helpfile" so ":help"
> finds the docs. BUT ":helpgrep" doesn't use "helpfile", but only
> "runtimepath/doc". This is a problem for me, because no matter which
> value I assign to "runtimepath", the documentation is not going to be
> found in any "/doc" subdir!
> 
>     Given that "/usr/doc" or "/usr/share/doc" are pretty standard when
> it comes to install documentation, shouldn't "ex_helpgrep" use the
> directory from "helpfile" too, just like ":help" does?

Vim documentation must be in the runtime directory.  It doesn't make any
sense to put it below /usr/doc.  These are help files, not generic
documentation files.  Generally I find it quite strange to order
application-specific files by their type instead of by the application.
You scatter files all over the system and are left with files that you
don't know where to put (there is no /usr/syntax, /usr/indent or
/usr/vimplugins).

Anyway, using the directory from 'helpfile' for ":helpgrep" should indeed
be done.  Otherwise it's not consistent with ":help".

>     I'm not familiar enough with the source to be able to add support
> for "helpfile" path to "ex_helpgrep" without resorting to a dirty hack,
> but I can try... "ex_helpgrep" looks like it is tailored to only process
> "runtimepath/doc" in the main loop, so any nonintrusive modification is
> almost impossible.

I think that changing the source code would be the right thing to do.

-- 
hundred-and-one symptoms of being an internet addict:
60. As your car crashes through the guardrail on a mountain road, your first
    instinct is to search for the "back" button.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to