GNU bug report logs - #5578
23.1.92; M-x man should consider $MANPATH when making completions

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Sat, 13 Feb 2010 23:49:01 UTC

Severity: normal

Done: jidanni <at> jidanni.org

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5578 in the body.
You can then email your comments to 5578 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5578; Package emacs. (Sat, 13 Feb 2010 23:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 13 Feb 2010 23:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Cc: rfrancoise <at> debian.org
Subject: 23.1.92; M-x man should consider $MANPATH when making completions
Date: Sun, 14 Feb 2010 07:48:04 +0800
M-x man should consider $MANPATH when making completions. It (via
/usr/bin/man) finds the pages fine, but one must type them in without
any TAB completion help. The TAB completion should examine one's e.g.,
MANPATH=/usr/local/man:/home/jidanni/.spamassassin-tree/man: too.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5578; Package emacs. (Sun, 14 Feb 2010 01:30:03 GMT) Full text and rfc822 format available.

Message #8 received at 5578 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: jidanni <at> jidanni.org
Cc: rfrancoise <at> debian.org, 5578 <at> debbugs.gnu.org
Subject: Re: bug#5578: 23.1.92;
	M-x man should consider $MANPATH when making completions
Date: Sat, 13 Feb 2010 20:29:18 -0500
jidanni <at> jidanni.org writes:

> M-x man should consider $MANPATH when making completions. It (via
> /usr/bin/man) finds the pages fine, but one must type them in without
> any TAB completion help. The TAB completion should examine one's e.g.,
> MANPATH=/usr/local/man:/home/jidanni/.spamassassin-tree/man: too.

It does complete, using `man -k'.  Please provide a proper bug report.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5578; Package emacs. (Sun, 14 Feb 2010 06:13:01 GMT) Full text and rfc822 format available.

Message #11 received at 5578 <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: cyd <at> stupidchicken.com, man-db <at> packages.debian.org
Cc: rfrancoise <at> debian.org, 5578 <at> debbugs.gnu.org
Subject: Re: bug#5578: 23.1.92;
	M-x man should consider $MANPATH when making completions
Date: Sun, 14 Feb 2010 14:12:31 +0800
>>>>> "CY" == Chong Yidong <cyd <at> stupidchicken.com> writes:
CY> jidanni <at> jidanni.org writes:

>> M-x man should consider $MANPATH when making completions. It (via
>> /usr/bin/man) finds the pages fine, but one must type them in without
>> any TAB completion help. The TAB completion should examine one's e.g.,
>> MANPATH=/usr/local/man:/home/jidanni/.spamassassin-tree/man: too.

CY> It does complete, using `man -k'.  Please provide a proper bug report.

$ 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
$

Well, OK, but to change things, the user must probably fiddle with
/etc/manpath.config and run roots cronjob, when all he wants to do is
expand the names and not look at the definitions...

Just like one can expand the names of $PATH, why not $MANPATH...




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5578; Package emacs. (Sun, 14 Feb 2010 08:58:02 GMT) Full text and rfc822 format available.

Message #14 received at 5578 <at> debbugs.gnu.org (full text, mbox):

From: Colin Watson <cjwatson <at> debian.org>
To: jidanni <at> jidanni.org
Cc: cyd <at> stupidchicken.com, rfrancoise <at> debian.org, man-db <at> packages.debian.org,
	5578 <at> debbugs.gnu.org
Subject: Re: bug#5578: 23.1.92; M-x man should consider $MANPATH when
	making completions
Date: Sun, 14 Feb 2010 08:57:23 +0000
On Sun, Feb 14, 2010 at 02:12:31PM +0800, jidanni <at> jidanni.org 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
> $
> 
> Well, OK, but to change things, the user must probably fiddle with
> /etc/manpath.config and run roots cronjob, when all he wants to do is
> expand the names and not look at the definitions...

Not at all.  Run mandb as your ordinary user and then 'man -k' will
work.

You may only care about the names, but if M-x man currently searches
definitions as well then that means a number of users have almost
certainly got used to that, and 'man -k' seems like a reasonable way to
do that kind of thing.  Having to make sure the database is up to date
seems like a not unreasonable price to pay, given that user manual
hierarchies are comparatively rare.

-- 
Colin Watson                                       [cjwatson <at> debian.org]




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5578; Package emacs. (Sun, 14 Feb 2010 16:31:02 GMT) Full text and rfc822 format available.

Message #17 received at 5578 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: jidanni <at> jidanni.org
Cc: cyd <at> stupidchicken.com, rfrancoise <at> debian.org, man-db <at> packages.debian.org,
	5578 <at> debbugs.gnu.org
Subject: Re: bug#5578: 23.1.92;
	M-x man should consider $MANPATH when making completions
Date: Sun, 14 Feb 2010 11:30:10 -0500
> $ 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.


        Stefan




Reply sent to jidanni <at> jidanni.org:
You have taken responsibility. (Sun, 14 Feb 2010 21:07:01 GMT) Full text and rfc822 format available.

Notification sent to jidanni <at> jidanni.org:
bug acknowledged by developer. (Sun, 14 Feb 2010 21:07:02 GMT) Full text and rfc822 format available.

Message #22 received at 5578-close <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: cjwatson <at> debian.org
Cc: 5578-close <at> debbugs.gnu.org, cyd <at> stupidchicken.com, rfrancoise <at> debian.org,
	man-db <at> packages.debian.org
Subject: Re: bug#5578: 23.1.92;
	M-x man should consider $MANPATH when making completions
Date: Mon, 15 Feb 2010 05:06:06 +0800
>>>>> "CW" == Colin Watson <cjwatson <at> debian.org> writes:
CW> Run mandb as your ordinary user
OK, I found that works and am closing the bug. Maybe that should be
documented in emacs as at least working on Debian.

(I discovered it makes files inside my private man tree... the mandb page
perhaps isn't that clear about that.)




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5578; Package emacs. (Mon, 15 Feb 2010 08:42:02 GMT) Full text and rfc822 format available.

Message #25 received at 5578 <at> debbugs.gnu.org (full text, mbox):

From: Colin Watson <cjwatson <at> debian.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: cyd <at> stupidchicken.com, rfrancoise <at> debian.org, man-db <at> packages.debian.org,
	5578 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#5578: 23.1.92; M-x man should consider $MANPATH when
	making completions
Date: Mon, 15 Feb 2010 08:41:26 +0000
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 <at> debian.org]




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5578; Package emacs. (Mon, 15 Feb 2010 08:46:02 GMT) Full text and rfc822 format available.

Message #28 received at 5578 <at> debbugs.gnu.org (full text, mbox):

From: Colin Watson <cjwatson <at> debian.org>
To: jidanni <at> jidanni.org
Cc: cyd <at> stupidchicken.com, rfrancoise <at> debian.org, man-db <at> packages.debian.org,
	5578 <at> debbugs.gnu.org
Subject: Re: bug#5578: 23.1.92; M-x man should consider $MANPATH when
	making completions
Date: Mon, 15 Feb 2010 08:45:25 +0000
On Mon, Feb 15, 2010 at 05:06:06AM +0800, jidanni <at> jidanni.org wrote:
> >>>>> "CW" == Colin Watson <cjwatson <at> debian.org> writes:
> CW> Run mandb as your ordinary user
> OK, I found that works and am closing the bug. Maybe that should be
> documented in emacs as at least working on Debian.

The bug title here is incorrect anyway; there's nothing Emacs is doing
that would avoid honouring $MANPATH, and that was never related to your
problem.  This isn't Debian-specific.

> (I discovered it makes files inside my private man tree... the mandb page
> perhaps isn't that clear about that.)

I don't think it needs to be.  It's creating an index for your private
manual hierarchy; either (a) it should be obvious that this would live
within your private manual hierarchy, since where else would it go or
(b) you should not need to care. :-)

-- 
Colin Watson                                       [cjwatson <at> debian.org]




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5578; Package emacs. (Mon, 15 Feb 2010 14:48:02 GMT) Full text and rfc822 format available.

Message #31 received at 5578 <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: cjwatson <at> debian.org
Cc: cyd <at> stupidchicken.com, rfrancoise <at> debian.org, man-db <at> packages.debian.org,
	5578 <at> debbugs.gnu.org
Subject: Re: bug#5578: 23.1.92;
	M-x man should consider $MANPATH when making completions
Date: Mon, 15 Feb 2010 22:47:17 +0800
>>>>> "CW" == Colin Watson <cjwatson <at> debian.org> writes:

>> (I discovered it makes files inside my private man tree... the mandb page
>> perhaps isn't that clear about that.)

CW> I don't think it needs to be.  It's creating an index for your private
CW> manual hierarchy; either (a) it should be obvious that this would live
CW> within your private manual hierarchy, since where else would it go or
CW> (b) you should not need to care. :-)

I found 'gosh, mandb worked'. 'Now where did it store whatever it
stored?' At first I thought it might be in some mode 4777 directory in
/usr or /var ... nope, hmmm find ~ -mtime -1 ... ah ha, it saved it
right under my nose.

Anyway, I made a anacrontab to remind me to run it (mandb) as me (user 1000)
every 444 days.




bug archived. Request was from Debbugs Internal Request <bug-gnu-emacs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 16 Mar 2010 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 96 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.