help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: does (setq Man-switches "-a") work?


From: Omar Polo
Subject: Re: does (setq Man-switches "-a") work?
Date: Sat, 30 Nov 2019 17:37:59 +0100
User-agent: Mutt/1.12.2 (2019-09-21)

On Sat, Nov 30, 2019 at 03:38:18PM +0100, Emanuel Berg via Users list for the 
GNU Emacs text editor wrote:
> Eli Zaretskii wrote:
> 
> >> What switches are supported?
> >
> > Any switches supported by the 'man' command
> > you have installed, I think.
> 
> zshall(1) with Emacs M-x man RET zshall RET
> 
> "page 1 of 16", and page 1 has 345 lines,
> 
> same with
> (setq Man-switches "-a")
> and
> (setq Man-switches "")
> 
> In the Unix shell with man(1) - no concept of
> a sixteenth division, 'man -a' loads the whole
> manpage immediately and if you hit G you get to
> line 32 213.
> 
> > It does work: it produces all of the man
> > pages by that name, in all of the sections.
> > You just need to go from one to the other
> > with M-n and M-p, as "C-h m" tells you.
> 
> If you are to search the entire document for
> a keyword, the entire document must be in one
> and only one buffer.
> 
> >> The Unix man(1) is a pager.
> >
> > No, 'man' is not a pager. It is a program
> > that formats and displays manual pages.
> > A pager is a program like 'more' or 'less'.
> > At least that's what I would call a "pager".
> 
> $ man man
> 
> MAN(1)                    Manual pager utils                   MAN(1)
> 
> [...]
> 
>        -P pager, --pager=pager
>               Specify which output pager to  use.   By  default,  man
>               uses  pager.  This option overrides the $MANPAGER envi‐
>               ronment variable, which in turn  overrides  the  $PAGER
>               environment  variable.
> 
> What's pager?
> 
> $ t pager # [1]
> /usr/bin/pager
> lrwxrwxrwx 1 root 23 Mar 18  2016 /usr/bin/pager -> /etc/alternatives/pager
>  * links to: /bin/less 
>              -rwxr-xr-x 1 root 148K Mar  5  2016 /bin/less
> 
> 
> [1] https://dataswamp.org/~incal/conf/.zsh/ide (line 67)
> 
> -- 
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
> 
> 


I don't know how to solve your issue (sorry!), but I love nitpicking :)
I hope I'm not too offtopic.

On Sat, Nov 30, 2019 at 03:38:18PM +0100, Emanuel Berg via Users list for the 
GNU Emacs text editor wrote:
> Eli Zaretskii wrote:
[snip]
> >> The Unix man(1) is a pager.
> >
> > No, 'man' is not a pager. It is a program
> > that formats and displays manual pages.
> > A pager is a program like 'more' or 'less'.
> > At least that's what I would call a "pager".
> 
> $ man man
> 
> MAN(1)                    Manual pager utils                   MAN(1)
> 
> [...]
> 
>        -P pager, --pager=pager
>               Specify which output pager to  use.   By  default,  man
>               uses  pager.  This option overrides the $MANPAGER envi‐
>               ronment variable, which in turn  overrides  the  $PAGER
>               environment  variable.

It means that, by default, if stdin is a tty man(1) will exec less(1)
(or more, or most, or ...) to "page" the result.  If I've understood
correctly, emacs itself is acting as a pager in this case paging the
result from man.

Having the headline for man(1) "Manual pager utils" doesn't help, it's
misleading in my opinion.  OpenBSD' manpage is a bit cleaner maybe:

$ man man

MAN(1)               General Commands Manual               MAN(1)

NAME
     man - display manual pages

[...]

     -c      Copy the manual page to the standard output instead
             of using more(1) to paginate it.  This is done by
             default if the standard output is not a terminal
             device.
[...]

EXAMPLES
[...]
     Read a typeset page in a PDF viewer:

           $ MANPAGER=mupdf man -T pdf lpd

> What's pager?

a program that "pages" something (text generally.)

$ man more

MORE(1)              General Commands Manual              MORE(1)

NAME
     more - view files

DESCRIPTION
     The more pager displays text one screenful at a time.

> 
> $ t pager # [1]
> /usr/bin/pager
> lrwxrwxrwx 1 root 23 Mar 18  2016 /usr/bin/pager -> /etc/alternatives/pager
>  * links to: /bin/less 
>              -rwxr-xr-x 1 root 148K Mar  5  2016 /bin/less
> 
> 
> [1] https://dataswamp.org/~incal/conf/.zsh/ide (line 67)
> 
> -- 
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
> 
> 

--
Omar Polo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]