GNU bug report logs -
#13160
24.3.50; [PATCH] man page completion support beyond man-db
Previous Next
Reported by: Wolfgang Jenkner <wjenkner <at> inode.at>
Date: Wed, 12 Dec 2012 19:25:02 UTC
Severity: wishlist
Tags: patch
Found in version 24.3.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 13160 <at> debbugs.gnu.org (full text, mbox):
>>>> It's not used for parsing, it's only prepended to the search string
>>>> passed to `man -k'.
>>> Ah. I even had a note in my bit about that. Yes. Daniel Pittman I
>>> think it was reported that on macos man -k '' empty string gives no
>>> output, hence "^".
>> Right, the empty string deserves special attention, also because it has
>> the potential to mess up the cache. Thanks for reminding me of this.
> Actually, I think the cache is really the clue here: prepending
> completions piecemeal to the cache makes only sense if the user
> consciously avoids completing the empty string because of memory
> constraints... and even then the cache would have to be a trie or
> something to be useful.
I don't consciously avoid it, but I just never hit TAB to complete
a manpage name without first typing a few chars. I doubt I'm the
only one.
On my system "make -k ^" returns about 9K commands of average length
14chars, so that's about 9K * (16B (chars) + 16B (string object) + 2*8B
(cons cells)) or more than 400KB (on a 32bit system) or 700KB (on
a 64bit system) for that cache. I'm not sure it's such a good idea.
Does it fix an actual bug? [ Sorry if it does fix a real bug and this
was mentioned somewhere in this thread, but I haven't found the time to
read all threads as thoroughly as I'd like. ]
> Support man page completion for more man programs. (Bug#13160)
> * man.el (Man-parse-apropos): New function.
> (Man-completion-table): Use it in parsing `man -k' output to
> replace code peculiar to man-db.
> Thanks to Kevin Ryde for commenting on a previous version of this.
This part of the patch looks OK, feel free to install it.
> * automated/man-tests.el: New file.
And that as well, of course.
Stefan
This bug report was last modified 12 years and 136 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.