public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Man not finding pages
@ 2004-02-29  0:35 Ross Boulet
  2004-03-01 20:01 ` Thorsten Kampe
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Boulet @ 2004-02-29  0:35 UTC (permalink / raw)
  To: Cygwin

I solved my own problem with man not finding pages but in doing the research
on it, I found something I thought might be worthy of mentioning.  From the
message:

http://www.cygwin.com/ml/cygwin/2002-04/msg00064.html

I learned the a colon prefix to $MANPATH allows man to search its default
paths in addition to what is specified in $MANPATH.  The
/etc/profile.d/openssl.sh script handles this ok.  However, the
/etc/profile.d/XFree86-man.sh does not handle it the same way.  I had an
empty $MANPATH (since corrected by a new /etc/profile script).  The
XFree86-man.sh ran first and found no $MANPATH and thus assigned
"/usr/X11R6/man" (no colon prefix) to $MANPATH.  Then openssl.sh appended
":/usr/ssl/man".  The absence of a leading colon caused man to not find the
basic pages so that basic stuff like 'man ls' produced 'No manual entry for
ls'.

I would suggest the XFree86-man.sh script be modified to add a colon prefix
to $MANPATH to be consistent with the openssl.sh treatment of an empty
$MANPATH.

My apologies if this should have been posted to the cygwin-xfree ML, but I
thought it appropriate here because it affects more than X.

Ross



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Man not finding pages
  2004-02-29  0:35 Man not finding pages Ross Boulet
@ 2004-03-01 20:01 ` Thorsten Kampe
  2004-03-02  4:00   ` Ross Boulet
  0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Kampe @ 2004-03-01 20:01 UTC (permalink / raw)
  To: cygwin

* Ross Boulet (2004-02-28 23:06 +0100)
> I solved my own problem with man not finding pages but in doing the research
> on it, I found something I thought might be worthy of mentioning.  From the
> message:
> 
> http://www.cygwin.com/ml/cygwin/2002-04/msg00064.html
> 
> I learned the a colon prefix to $MANPATH allows man to search its default
> paths in addition to what is specified in $MANPATH.  The
> /etc/profile.d/openssl.sh script handles this ok.  However, the
> /etc/profile.d/XFree86-man.sh does not handle it the same way.  I had an
> empty $MANPATH (since corrected by a new /etc/profile script).  The
> XFree86-man.sh ran first and found no $MANPATH and thus assigned
> "/usr/X11R6/man" (no colon prefix) to $MANPATH.  Then openssl.sh appended
> ":/usr/ssl/man".  The absence of a leading colon caused man to not find the
> basic pages so that basic stuff like 'man ls' produced 'No manual entry for
> ls'.
> 
> I would suggest the XFree86-man.sh script be modified to add a colon prefix
> to $MANPATH to be consistent with the openssl.sh treatment of an empty
> $MANPATH.
> 
> My apologies if this should have been posted to the cygwin-xfree ML, but I
> thought it appropriate here because it affects more than X.

You. Man. Are. Genius.

Recently I posted http://article.gmane.org/gmane.os.cygwin/44906 but
found no answer or solution. Suddenly completion started to work again
but on the next day not even calling a single man page was found by
man because of the wrong $MANPATH.

Now I corrected 'export MANPATH="${X11MANPATH}"' to 'export
MANPATH=":${X11MANPATH}"' in XFree86-man.sh and now everything is
okay.

Thanks, Thorsten


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Man not finding pages
  2004-03-01 20:01 ` Thorsten Kampe
@ 2004-03-02  4:00   ` Ross Boulet
  0 siblings, 0 replies; 3+ messages in thread
From: Ross Boulet @ 2004-03-02  4:00 UTC (permalink / raw)
  To: cygwin; +Cc: 'Thorsten Kampe'

> 
> You. Man. Are. Genius.
> 

Thanks, but you embarrass me.  I just get lucky occasionally.  I'm not an
expert at man and I know next to nothing about zsh, but based on some
personal observations, I think I can answer some of your questions about man
and manpath.

> Recently I posted http://article.gmane.org/gmane.os.cygwin/44906 but
> found no answer or solution. Suddenly completion started to work again
> but on the next day not even calling a single man page was found by
> man because of the wrong $MANPATH.
> 
> Now I corrected 'export MANPATH="${X11MANPATH}"' to 'export
> MANPATH=":${X11MANPATH}"' in XFree86-man.sh and now everything is
> okay.
> 
> Thanks, Thorsten
> 
> ,--- * MANPATH statements in /etc/man.conf
> | MANPATH /usr/share/man
> | MANPATH /usr/X11R6/man
> | MANPATH /usr/local/man
> | MANPATH /usr/man
> `---
> ,--- * Cygwin host (where it "doesn't work")
> | % echo $MANPATH
> | :/usr/X11R6/man:/usr/ssl/man
> | ^ see the empty path? ($manpath is "'' /usr/X11R6/man /usr/ssl/man")
> | % manpath
> | /usr/share/man:/usr/X11R6/man:/usr/ssl/man:/usr/man:/usr/local/man
> `---
> ,--- * Linux host (where it "works")
> | % echo $MANPATH
> |
/usr/share/man:/usr/local/share/man:/usr/share/gcc-data/i686-pc-linux-gnu/3.
3/man:/usr/
> | X11R6/man::/opt/sun-jdk-1.4.2.03/man:/usr/qt/3/doc/man:/opt/vmware/man
> | % manpath
> | zsh: command not found: manpath
> `---
> /etc/zprofile and /etc/profile.d/zshell.zsh don't contain man
> settings. When I manually do "export MANPATH=/usr/share/man" then zsh
> does the man completion.
> 
> My questions are (I know they might not be specifically Cygwin
> related):
> 
> 1. Where and how is $MANPATH assembled?

It's a combination of things.  In my case, I run the pdksh shell.  MANPATH
is set in /etc/profile and further modified by .sh scripts in
/etc/profile.d.  It looks to me like zsh runs the same scripts as part of
/etc/zprofile.

> 2. Where does the path that the "manpath" command shows come from?

I'm not positive about this, but I believe manpath takes $MANPATH and,
assuming $MANPATH has an empty path in it, adds any paths specified in the
man.conf file, but eliminates any paths which do not actually have man
pages.

> 3. Why does $MANPATH and "manpath" output differ?

I think manpath eliminates any paths which do not actually contain man pages
(see previous answer) and adds paths from man.conf.

> 4. Why is /usr/share/man not in $MANPATH?

Because there is an empty path in $MANPATH, it is picked up from the
man.conf file.

> 5. Why is the first entry in $MANPATH empty?

From my tests, an empty path, whether at the end or beginning or somewhere
in between (::) is what tells man to include the paths from man.conf.  If
there is not an empty path, man and manpath use only what is in $MANPATH

> 6. How and where can I fix this?

Hopefully, this is done.  HTH

> Thanks to all that can help,
> Thorsten



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-03-02  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-29  0:35 Man not finding pages Ross Boulet
2004-03-01 20:01 ` Thorsten Kampe
2004-03-02  4:00   ` Ross Boulet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).