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: Stefan Monnier
Subject: bug#13160: 24.3.50; [PATCH] man page completion support beyond man-db
Date: Sun, 23 Dec 2012 08:46:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> 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.  ]
> My proposed change log entry indicates that the cache handling is rather
> bogus (complete for "foo" then for "bar" and then for "foo" again and
> "man -k ^foo" will be run again and the result prepended to the cache).

Oh, indeed.  Fixed with the trivial patch below, tho.

> The main reason, however, is that it eliminates any dependency on the
> particular flavour of `man -k' output, so everything can be done in
> elisp by the new Man-parse-apropos (I indicated that in the change log
> entry, too).

That indeed the part of the change log I did not understand.  How does
the "man -k" argument relate to the "output flavor"?


        Stefan


=== modified file 'lisp/man.el'
--- lisp/man.el 2012-08-16 01:03:53 +0000
+++ lisp/man.el 2012-12-23 13:45:03 +0000
@@ -815,6 +815,7 @@
               (call-process manual-program nil '(t nil) nil
                             "-k" (concat "^" prefix))))
           (goto-char (point-min))
+          (setq table nil)
           (while (re-search-forward "^\\([^ \t\n]+\\)\\(?: ?\\((.+?)\\)\\(?:[ 
\t]+- \\(.*\\)\\)?\\)?" nil t)
             (push (propertize (concat (match-string 1) (match-string 2))
                               'help-echo (match-string 3))






reply via email to

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