Hi Bram :)

 * Bram Moolenaar <[EMAIL PROTECTED]> dixit:
> DervishD wrote:
> >     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.

    I hadn't seen this from that point of view. For me they were
documentation (as "things you put under /usr/doc") rather than help
files (as "things you probably should place under /usr/lib").

> Generally I find it quite strange to order application-specific files
> by their type instead of by the application.

    But that's a very sensible thing to do. This way you can partition
the hiearchy much more efficiently. For example, I have my /usr "zone"
backup recorded on a DVD, and the rest of my system is on a CD and a USB
pendrive. This way, if my hard disk decides to break, I can have my
system up and running again in less than 10 minutes, booting from the
CD, putting the read-write portion of my system in a ramdisk (under
Linux, I mean) and mounting my backup DVD as /usr. By dividing by type
and not by app, all read-only files are placed under the same mount
point. Take a look at the FHS standard for a much deeper rationale
(e.g., the division between /var and /usr, for example).

    I know, it is weird outside UNIX, and when I started to use Linux,
almost a decade ago, I found it very strange and mind boggling, but in
the end, that kind of filesystem structure has been a bless ;))

> 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).

    Of course, those kind of files should go under /usr/lib/vim: they
are static data needed for the program to run. If you modify them
frequently (and you shouldn't, because you have all the "/after" dirs
for modifying the vim runtime behaviour), you can place them under
/etc/vim, for example. I have my own runtime under /etc/vim because I
consider them configuration files and not exactly a runtime. Having the
documentation under /etc/vim is weird in that case.

    But that's not the point. The point is that I may not want to use
the default runtime. Then, where should I put the documentation for Vim?
OK, they may count as help files, and so they should go under
/usr/lib/vim/doc, no problem with that. But imagine I have a system
which indexes ALL documentation in my system. Then I'll prefer to have
all the documentation under /usr/doc.

    The point is: I should be able to put the application files,
separated by type, where they fit under my hierarchy, always under
common sense (for example, doesn't put help files under /var/lib/).
Things like autoconf or mobs do these kind of duties (amongs others).

    And, BTW, I have my own vim runtime under /etc/vim, with no subdirs,
it is very small (only handles the filetypes I use, and indentation,
syntax and the like are fully adapted to my likings) and I have it
mirrored on a SVN server so I can go back and forth between revisions of
the files ;) It's weird, but I can do it because vim is flexible enough
to allow it (except for helpgrep, but that can be fixed without touching
the source code at all).

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

    I think the same.

> > 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.

    If you want, I can try to make the modification, but since I'm not
familiar with the code, I cannot make promises about the code quality
O:)

    Thanks for your answer :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

Reply via email to