From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.bugs Subject: bug#13160: 24.3.50; [PATCH] man page completion support beyond man-db Date: Sat, 22 Dec 2012 18:58:43 +0100 Message-ID: <85txrermss.fsf@iznogoud.viz> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1356199194 24226 80.91.229.3 (22 Dec 2012 17:59:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Dec 2012 17:59:54 +0000 (UTC) Cc: 13160@debbugs.gnu.org, Kevin Ryde To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 22 19:00:08 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 1TmTMj-0002Xp-TQ for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Dec 2012 19:00:06 +0100 Original-Received: from localhost ([::1]:56355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TmTMV-00070c-S8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Dec 2012 12:59:51 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TmTMP-00070W-FK for bug-gnu-emacs@gnu.org; Sat, 22 Dec 2012 12:59:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TmTMM-0001L6-PV for bug-gnu-emacs@gnu.org; Sat, 22 Dec 2012 12:59:45 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TmTMM-0001L2-M7 for bug-gnu-emacs@gnu.org; Sat, 22 Dec 2012 12:59:42 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TmTMg-0007NA-DR for bug-gnu-emacs@gnu.org; Sat, 22 Dec 2012 13:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Wolfgang Jenkner Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Dec 2012 18:00:02 +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.135619915428253 (code B ref 13160); Sat, 22 Dec 2012 18:00:02 +0000 Original-Received: (at 13160) by debbugs.gnu.org; 22 Dec 2012 17:59:14 +0000 Original-Received: from localhost ([127.0.0.1]:55788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TmTLs-0007Lc-H3 for submit@debbugs.gnu.org; Sat, 22 Dec 2012 12:59:14 -0500 Original-Received: from mx06.lb01.inode.at ([62.99.145.6]:15530 helo=mx.inode.at) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TmTLo-0007LT-JW for 13160@debbugs.gnu.org; Sat, 22 Dec 2012 12:59:10 -0500 Original-Received: from [91.119.206.19] (port=13272 helo=iznogoud.viz) by smartmx-06.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TmTLT-0008VG-Gq; Sat, 22 Dec 2012 18:58:47 +0100 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1TmTLP-000GX8-HZ; Sat, 22 Dec 2012 18:58:43 +0100 In-Reply-To: (Stefan Monnier's message of "Sat, 22 Dec 2012 12:11:44 -0500") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (berkeley-unix) 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:68917 Archived-At: On Sat, Dec 22 2012, Stefan Monnier wrote: > 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. Worrying about this is the main reason why I posted this, but: On an old system with not much memory you probably won't have much room for man pages either (unless you mount a NFS share). I actually tested this with a slax image under qemu emulating a i486 system with 64M (without hardware supported virtualization) and I saw no problem with it. Of course, qemu can't really emulate processor or memory-access speed, I think, and there were only 1000 man entries or so. I'd love to test this on my old thinkpad 350 with 20M, but it's difficult to install a recent emacs on a 120M hard disk ;-) That said, my main system is reasonable 2009 vintage, has man -k ^ | wc -l 8702 (with the actual entries being roughly the double of that) and the delay is not noticeably longer when caching all entries at the first completion attempt instead of just part of them. > 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). 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). Wolfgang