From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Colin Watson Newsgroups: gmane.emacs.bugs Subject: bug#5578: 23.1.92; M-x man should consider $MANPATH when making completions Date: Mon, 15 Feb 2010 08:41:26 +0000 Message-ID: <20100215084125.GZ4484@riva.ucam.org> References: <87r5oohafl.fsf@stupidchicken.com> <87tytkpcq8.fsf@jidanni.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1266223983 14026 80.91.229.12 (15 Feb 2010 08:53:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Feb 2010 08:53:03 +0000 (UTC) Cc: cyd@stupidchicken.com, jidanni@jidanni.org, rfrancoise@debian.org, man-db@packages.debian.org, 5578@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 15 09:53:00 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NgwhO-0007Sw-W2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Feb 2010 09:52:59 +0100 Original-Received: from localhost ([127.0.0.1]:40995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NgwhO-0007ay-GK for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Feb 2010 03:52:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NgwhD-0007YQ-1k for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2010 03:52:47 -0500 Original-Received: from [140.186.70.92] (port=34816 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NgwhC-0007Y3-9U for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2010 03:52:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NgwhB-0003KE-Bu for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2010 03:52:46 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33723) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NgwhB-0003KA-4h for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2010 03:52:45 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NgwWo-00075L-DP; Mon, 15 Feb 2010 03:42:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Colin Watson Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Feb 2010 08:42:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5578 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5578-submit@debbugs.gnu.org id=B5578.126622329927209 (code B ref 5578); Mon, 15 Feb 2010 08:42:02 +0000 Original-Received: (at 5578) by debbugs.gnu.org; 15 Feb 2010 08:41:39 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NgwWQ-00074o-P3 for submit@debbugs.gnu.org; Mon, 15 Feb 2010 03:41:38 -0500 Original-Received: from smarthost02.mail.zen.net.uk ([212.23.3.141]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NgwWO-00074j-Up for 5578@debbugs.gnu.org; Mon, 15 Feb 2010 03:41:37 -0500 Original-Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost02.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1NgwWG-0007JK-UF; Mon, 15 Feb 2010 08:41:29 +0000 Original-Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) id 1NgwWF-0000Or-00; Mon, 15 Feb 2010 08:41:27 +0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost02-IP: [82.69.40.219] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 15 Feb 2010 03:42:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35123 Archived-At: On Sun, Feb 14, 2010 at 11:30:10AM -0500, Stefan Monnier wrote: > > $ man -w whoami > > /usr/share/man/man1/whoami.1.gz > > $ man -k whoami > > whoami (1) - print effective userid > > $ man -w sa-update > > /home/jidanni/.spamassassin-tree/man/man1/sa-update.1p > > $ man -k sa-update > > $ > > Looks like a bug/misfeature in the `man' program, then. > Of course, man.el could try to work around this limitation, but I think > we first should try to get it fixed. (Hi, maintainer of man-db speaking here.) In some ways it is not ideal that people have to run 'mandb' by hand before 'man -k' and similar tools work. (I believe that the other commonly-used implementation works similarly, except that the program you have to run is called 'makewhatis'.) On the other hand, some years ago (up to man-db 2.3.19, 2001 or thereabouts) man used to build its databases on the fly and the results were generally regarded as disastrous: they tended to involve lots of waiting around for interactive queries to return while the database was rebuilt. Everyone hated it. I deliberately changed this, and I'm not keen to return to the previous situation as I remember what it was like. On balance, I think I prefer the current state of the trade-off. I don't know that it's appropriate for Emacs to work around this; it clearly has some entitlement to assume that 'man -k' works. (On Debian and allied systems, system manual pages always work fine as the packaging system nowadays takes care to run mandb whenever necessary; this only affects user manual pages, which are relatively rare.) Perhaps 'man -k' ought to print a message on stderr in some circumstances telling you to run mandb, although unfortunately much of the time working out that you need to run mandb involves a substantial part of the work involved in actually running mandb, so I'm not sure whether this would be a good idea ... Regards, -- Colin Watson [cjwatson@debian.org]