🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #2019

M-x (cmu)shell: (which) PAGER instead of "more" ?

#2019
From: Martin Maechler
Date: Thu, 20 Jun 1991 19:47
33 lines
2164 bytes
Many people use to complain about the default way that cmushell handles
Unix "more". The same applies to simple 'shell' (but this is not a big
concern for me since I do nto use it. :-))
needing the extra return and producing all the "^G" "^M" and what not.

I usually tell people "You don't need more within emacs", and this is 95 %
true, since we can visit-file, have M-x manual-entry, dired, etc. AND last
but not least can jump back to the beginning of a long output 
(via C-r <prompt>). 
But the remaining 5 % are still here: Shell scripts and other UNIX programs
utilities that pipe to more (" | more ").

Most "modern" Unix programs/scripts use $PAGER instead of 'more' if it is
defined. Some places I know, they use "less" which is even worse:
It aborts if run within cmushell.

As a first remedy,
I would like to do the equivalent of  "PAGER=cat; export PAGER"
whenever the cmushell is loaded, i.e. in 'cmushell-mode-hook.
 
I can figure out a way to do this in my .cshrc (or its korn-shell
equivalent). But, it would be nice if there was a 'cmushell-pager  variable
that by default may even be set to "cat" instead of "more".

What we would really like, of course,
is a PAGER somewhere between  "cat" and more, to protect us from real long
"cat"s.

Is this is a known / solved problem ?
Thank you for any hints/help:

Martin Maechler, Bellcore 2M-343, 445 South St., Morristown, NJ 07962-1910, USA
maechler@bellcore.com, Tel: (201) 829-4837(w)  993-0944(h), Fax (201) 829-4391.
Technical Details
Message-ID: <9106201947.AA14878@crypto.bellcore.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!tut.cis.ohio-state.edu!unreplyable!garbage

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!tut.cis.ohio-state.edu!unreplyable!garbage
From: maechler@CRYPTO.BELLCORE.COM (Martin Maechler)
Newsgroups: gnu.emacs.help,comp.emacs
Subject: M-x (cmu)shell: (which) PAGER instead of "more" ?
Message-ID: <9106201947.AA14878@crypto.bellcore.com>
Date: 20 Jun 91 19:47:51 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: maechler@bellcore.com (Martin Maechler)
Followup-To: gnu.emacs.help
Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu
Lines: 33