From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13160: 24.3.50; [PATCH] man page completion support beyond man-db Date: Sun, 23 Dec 2012 08:46:28 -0500 Message-ID: References: <856247krc6.fsf@iznogoud.viz> <87sj78fi0w.fsf@blah.blah> <85ip84qpu8.fsf@iznogoud.viz> <87ehisf7vp.fsf@blah.blah> <8562416f6d.fsf@iznogoud.viz> <8538yyt7z8.fsf@iznogoud.viz> <85txrermss.fsf@iznogoud.viz> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1356270413 1754 80.91.229.3 (23 Dec 2012 13:46:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Dec 2012 13:46:53 +0000 (UTC) Cc: 13160@debbugs.gnu.org, Kevin Ryde To: Wolfgang Jenkner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 23 14:47:07 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TmltT-0000cL-Pa for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Dec 2012 14:47:07 +0100 Original-Received: from localhost ([::1]:45750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TmltF-0004ws-RD for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Dec 2012 08:46:53 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tmlt9-0004wb-Bw for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2012 08:46:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tmlt1-0001AT-JH for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2012 08:46:47 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tmlt1-0001AL-Fx for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2012 08:46:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TmltO-00060v-8G for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2012 08:47:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Dec 2012 13:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13160 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 13160-submit@debbugs.gnu.org id=B13160.135627041823105 (code B ref 13160); Sun, 23 Dec 2012 13:47:01 +0000 Original-Received: (at 13160) by debbugs.gnu.org; 23 Dec 2012 13:46:58 +0000 Original-Received: from localhost ([127.0.0.1]:56291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TmltJ-00060c-Q0 for submit@debbugs.gnu.org; Sun, 23 Dec 2012 08:46:58 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:54426) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TmltH-00060T-1X for 13160@debbugs.gnu.org; Sun, 23 Dec 2012 08:46:55 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxLDj/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCwsOJhIUGA0kiBwFugmQRAOIQppxgViDBw X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="210595209" Original-Received: from 69-196-176-227.dsl.teksavvy.com (HELO pastel.home) ([69.196.176.227]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Dec 2012 08:46:29 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 3E30058EA5; Sun, 23 Dec 2012 08:46:28 -0500 (EST) In-Reply-To: <85txrermss.fsf@iznogoud.viz> (Wolfgang Jenkner's message of "Sat, 22 Dec 2012 18:58:43 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:68945 Archived-At: >> 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))