bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13160: 24.3.50; [PATCH] man page completion support beyond man-db


From: Kevin Ryde
Subject: bug#13160: 24.3.50; [PATCH] man page completion support beyond man-db
Date: Sun, 23 Dec 2012 11:16:07 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Wolfgang Jenkner <wjenkner@inode.at> writes:
>
> So let's just cache all entries at the first completion attempt.

I do that for speed and because I have some pagename-at-point stuff
which tries some prefix/suffix combinations to make a good guess.
Holding everything uses up a fair amount of memory but I never came up
with anything better.  I only keep the description part of each name if
needed for completing-help.el or icicles.  I suppose turfing the cache
after a timer could reclaim memory.

For the cache I also watch /var/cache/man/index.db (configurable) for
mtime changes indicating newly installed programs.  If like me you
download and install to have a look at something then new pagenames
happen quite often and an automatic reload is good.

With man-db the index.db is a gdbm or whatever database of course.
I suppose direct access would be both much less ram and faster, but I
don't think man-db advertises it for external use.  I never worked out
why running man -k isn't already faster than it seems to be -- just the
quantity of data being churned by it and then by emacs I suppose.




-- 
Walk without rhythm and it won't attract the worm.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]