[comp.sys.apollo] more

braner@batcomputer.tn.cornell.edu (Moshe Braner) (07/19/89)

[]

The Apollo "more" tool chooses it's own font, and takes a lot
of time to start up.  Quite annoying when, e.g., reading mail
letter by letter (with PAGER=more).  Is there an alternative?
Has somebody written a simple "more" that does not do cursor
addressing (and thus escapes the vt100 emulator)?

Thanks.

- Moshe

<braner@tcgould.tn.cornell.edu>

PS: still would like a replacement for "vt100" too!

kellogg@EF8.UMD.EDU (Royal B. Kellogg) (07/19/89)

Regarding the use of more in the mailer, 
what about using the line editor, ed?
The brouse command, b, bor b 20, say,
gives a screenfull of message. I do not 
know if it can be used with mail.


         Bruce Kellogg
         Univ. of Maryland
         rbk@julia.umd.edu

GBOPOLY1@NUSVM.BITNET (fclim) (07/19/89)

In article <8441@batcomputer.tn.cornell.edu> braner@tcgould.tn.
 cornell.edu  (Moshe Braner)

> The Apollo "more" tool chooses it's own font, and takes a lot
> of time to start up.  Quite annoying when, e.g., reading mail
> letter by letter (with PAGER=more).  Is there an alternative?
> Has somebody written a simple "more" that does not do cursor
> addressing (and thus escapes the vt100 emulator)?

[digress]
Darryl Conliffe and I were corresponding over this newgroup about
a couple of weeks ago.  Darryl started off by saying that most
non-Aegis users invoke "more" or "cat" whenever they want to
browse a file.
[egress]

There is a better method: use m3 (the right button on the mouse).
Its definition is the same whether you use /sys/dm/std_keys or
/sys/dm/unix_keys.
Move the cursor onto any part of the filename and click the m3.
The action taken by m3 is basically asking the DM (ie Display
Manager) to invoke cv (Create a View) of the given file.  A DM
pad is created giving a porthole to the file.  You can use the
scroll keys (boxed arrow keys on the left of the keyboard) to
scroll back and forth. [tis hard to get "more" to scroll back].

You can't setenv PAGE to cv because it's not a shell command.
A workaround is to write a shell script:
    % cat > cv << BLAAAH
    #!/bin/sh
    /com/xdmc cv $1
    BLAAAH
    % mv cv /bin      # or your favorite binaries dir.
    % rehash
    % setenv PAGER cv

"More" pulls the shell pad into a vt100 which uses the
/sys/dm/fonts/vt100l font.  So does vi.  What I did was:
    % pushd /sys/dm/fonts
    % /com/chn vt100l -y   # rename vt100l as vt100l.yy.mm.dd
    % ln -s vt100l.b vt100l
    % popd
Now my vi is "brighter" because it is using a bold font.

Hope this helps.

fclim          --- gbopoly1 % nusvm.bitnet @ cunyvm.cuny.edu
computer centre
singapore polytechnic
dover road
singapore 0513.

kts@quintro.uucp (Kenneth T. Smelcer) (07/20/89)

In article <8907191307.AA03786@umix.cc.umich.edu> GBOPOLY1@NUSVM.BITNET (fclim) writes:
>In article <8441@batcomputer.tn.cornell.edu> braner@tcgould.tn.
> cornell.edu  (Moshe Braner)
>
>> The Apollo "more" tool chooses it's own font, and takes a lot
>> of time to start up.  Quite annoying when, e.g., reading mail
>> letter by letter (with PAGER=more).  Is there an alternative?
>> Has somebody written a simple "more" that does not do cursor
>> addressing (and thus escapes the vt100 emulator)?
>
>[digress]
>Darryl Conliffe and I were corresponding over this newgroup about
>a couple of weeks ago.  Darryl started off by saying that most
>non-Aegis users invoke "more" or "cat" whenever they want to
>browse a file.
>[egress]
>
[ description of cv with the m3 button ]
>
>You can't setenv PAGE to cv because it's not a shell command.
>A workaround is to write a shell script:
>    % cat > cv << BLAAAH
>    #!/bin/sh
>    /com/xdmc cv $1
>    BLAAAH
>    % mv cv /bin      # or your favorite binaries dir.
>    % rehash
>    % setenv PAGER cv
>
>fclim          --- gbopoly1 % nusvm.bitnet @ cunyvm.cuny.edu

I don't think this will work because mail sends the text to more via
stdin, not by filename.  You could get this to work by creating a temp
file and using DM with it, but that seems silly.  Is there a way to
get a pad to take data from stdin instead of a file?  

BTW, if you want a pager that lets you move around in the file, there 
is a program in the comp.sources.unix archives called 'less' that works
similarly to more, but gives you full cursor movement (ala vi) and has 
quite a few nice features.

In response to the original problem, the small font size isn't due to
invoking the vt100, but because it isn't!  When you invoke 'more' with
a filename, it start the emulator and everything works fine.  When 'more'
reads from stdin, it doesn't start a vt100 window; it switches to a
tiny font and displays to the output pad.  I assume this is because 
the 'curses' package sees that input is not from the terminal, so it 
doesn't start the emulator (is this how curses/vt100 works?).  I'm don't
have any ideas how to fix this (except by using a mailer like 'elm' :-)
Anybody else have a suggestion?

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Ken Smelcer        Quintron Corp.           quintro!kts@lll-winken 
                   Quincy,  IL              tiamat!quintro!kts@uunet

kts@quintro.uucp (Kenneth T. Smelcer) (07/20/89)

In article <1989Jul20.145401.23083@quintro.uucp> kts@quintro.UUCP (Kenneth T. Smelcer) writes:
>In response to the original problem, the small font size isn't due to
>invoking the vt100, but because it isn't!  When you invoke 'more' with
>a filename, it start the emulator and everything works fine.  When 'more'
>reads from stdin, it doesn't start a vt100 window; it switches to a
>tiny font and displays to the output pad.  I assume this is because 
>the 'curses' package sees that input is not from the terminal, so it 
>doesn't start the emulator (is this how curses/vt100 works?).  I'm don't
>have any ideas how to fix this (except by using a mailer like 'elm' :-)
>Anybody else have a suggestion?
>
Its been pointed out to me that I wasn't very clear about this.  Here are
some examples:  (BTW, the font behavior only happens at 10.1)

1.  /usr/ucb/more textfile
       (start vt100 emulator with vt100 font; normal operation)

2.  cat textfile | /usr/ucb/more
       (keep normal pad, switch to small font, display text in output area)

We tried this at 9.7 and it works the same, except that it uses the normal
font.
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Ken Smelcer        Quintron Corp.           quintro!kts@lll-winken 
                   Quincy,  IL              tiamat!quintro!kts@uunet

dennis@peanuts.nosc.mil (Dennis Cottel) (07/21/89)

kts@quintro.uucp (Kenneth T. Smelcer) writes:
> I don't think this will work because mail sends the text to more via
> stdin, not by filename.  You could get this to work by creating a temp
> file and using DM with it, but that seems silly.  Is there a way to
> get a pad to take data from stdin instead of a file?  

We use the Berkeley Mail program which, at least at SR9.7, has the
file name '/usr/ucb/more' wired in.  I patched the binary to change the
name to the relative pathname 'more.pager' and then put a link from
more.pager to /com/crpad in our local bin directory.  Now each user
gets a Display Manager pad by default, but can set a personal pager 
if desired.  Ugly but it works.

	Dennis Cottel  Naval Ocean Systems Center, San Diego, CA  92152
	(619) 553-1645      dennis@nosc.MIL      sdcsvax!noscvax!dennis

bergstr@hi-csc.UUCP (Darryl Bergstrom) (07/21/89)

In article <8441@batcomputer.tn.cornell.edu> braner@tcgould.tn.cornell.edu (Moshe Braner) writes:
>The Apollo "more" tool chooses it's own font, and takes a lot
>of time to start up.  Quite annoying when, e.g., reading mail
>letter by letter (with PAGER=more).  Is there an alternative?
>Has somebody written a simple "more" that does not do cursor
>addressing (and thus escapes the vt100 emulator)?
>Thanks.
>- Moshe
><braner@tcgould.tn.cornell.edu>

Put something like this in your .login/.cshrc (take your pick)

switch (`tty`)
  case '/dev/tty':
  case '/dev/display':
    echo "Terminal type is: $TERM"
    setenv EDITOR ~/com/dm_editor
    setenv VISUAL ~/com/dm_editor
    setenv PAGER  /com/crpad
    breaksw
  default:
    set term=unknown
    source ~/com/termset
    setenv EDITOR /usr/ucb/vi
    setenv PAGER ~/com/less
    stty erase  kill ^U intr ^C quit ^] start ^Q stop ^S eof ^D \
    susp ^Z rprnt ^R flush ^O werase ^W lnext ^V crtkill crterase -nohang
endsw

and here is the script dm_editor


#!/com/sh
# This is a shell hook into the apollo display manager editor.
# Author R. Cloutier -- Aug 8 1986
# Darryl Bergstrom  -- June 10 1989
# 
# This aegis shell script will open a dm editor window to the file that
# is passed as the first argument to this script. 
#  
# change the line below if you want to run on SR9 display ==> tty
IF eqs ((^"/usr/bin/tty")) "/dev/display" THEN
# uncomment this line if you want to have caps mapped to :x in SR9 
# xdmc ce ((^"args ^1 | /bin/sed -e 's/[A-Z]/:&/g'"))
   xdmc ce ^1 
   IF eqs ^1 THEN
      args "You must supply a filename:" "^0 filename"
   ELSE
#      readc -p "Hit the return key AFTER you have saved the file: ^1" ans
      while llkob | fpat ^1 > /dev/null do
      enddo
   ENDIF
ELSE
   args "Cannot use a display manager edit window, using ex, instead."
   /bin/ex ^1
ENDIF

This works here at hi-csc and should elsewhere.  Much faster you get to
use the DM editor.


-- 
-Darryl Bergstrom
-Honeywell Sensor & System Development Center, Golden Valley, Mn
-UUCP: uunet!hi-csc!bergstr
-ARPA: bergstr@hi-csc.honeywell.com || darryl@ux.acss.umn.edu

achille@cernvax.UUCP (achille petrilli) (07/22/89)

In article <8441@batcomputer.tn.cornell.edu> braner@tcgould.tn.cornell.edu (Moshe Braner) writes:
>[]
>
>The Apollo "more" tool chooses it's own font, and takes a lot
>of time to start up.  Quite annoying when, e.g., reading mail
>letter by letter (with PAGER=more).  Is there an alternative?

Hi, I defined PAGER to be a small program that opens an edit pad
in read-only mode. This way I get a new window for each message and
I can keep it around as long as I want. Another possibility is to use
/com/crpad as a pager, but it's slower than opening an edit pad.
If there is interest for such a program, I could post it.
Keep in mind that it's running under sr10.
Hope this helps,
	Achille Petrilli
	Cray and PWS operations

GBOPOLY1@NUSVM.BITNET (fclim) (07/24/89)

I like to thank Deborah Swanberg for sending me the following note
which I am resending to netland for the perusal of others.

--------------------Original Message------------------------------------
From: Deborah Swanberg <deborah@citi.umich.edu>
To: GBOPOLY1%NUSVM.BITNET@CUNYVM.CUNY.EDU, <APOLLO@UMIX.CC.UMICH.EDU>,
Date: 21 Jul 1989 10:41 EDT
Subject: Re: More

    From: fclim  <@CUNYVM.CUNY.EDU:GBOPOLY1@NUSVM.BITNET>
    To: One ADU to another <UMIX.CC.UMICH.EDU!APOLLO>
    Date: Wed, 19 Jul 89 16:56:23 SST
    Subject: Re: More

    "More" pulls the shell pad into a vt100 which uses the
    /sys/dm/fonts/vt100l font.  So does vi.  What I did was:
        % pushd /sys/dm/fonts
        % /com/chn vt100l -y   # rename vt100l as vt100l.yy.mm.dd
        % ln -s vt100l.b vt100l
        % popd
    Now my vi is "brighter" because it is using a bold font.


This requires administrative control. Individual users can have
control over their own vi fonts.  To give credit, here's a message
from long long ago.

    From: bts%sas%rti.uucp@mcnc.org
    To: umix.cc.umich.edu!apollo
    Date: 31 Jul 88 05:58:19 GMT
    Organization: SAS Institute Inc, Cary NC
    Subject: Re: Reprogramming the function keys on the vt100 emulator

    ...If a local font
    is available with the name vt100s, vt100 will use that rather then then one
 in
    /sys/dm/fonts.  With the way vt100 works in sr9.7, if you start up one vt100
    session and then end it, the next session will use the same font as the
    previous (now ended) session, unless you sigp the vt100_server.  (This was
    done so that later vt100's fire up super-fast.)  That way, you can start up
    later vt100's in any directory you want, so long as you earlier fired up one
    in a directory with the "vt100s" font you want.

    ... {stuff deleted}

    (I might note parenthetically at this point that I am a user rather than an
    administrator.  I believe I'm a fairly knowledgable user, but I lack the
    [moral if not technical] authority to change /sys/dm/fonts anyway.)

    --Brian,
 __________________________________________________
      the man from              |Brian T. Schellenberger   ...!mcnc!rti!sas!bts
      Babble-On                 |104 Willoughby Lane     work: (919) 467-8000
 x7783
    ____________________________|Cary, NC   27513        home: (919) 469-9389


Deborah Swanberg

Center for Information Technology Integration (CITI)
University of Michigan
2901 Hubbard
Ann Arbor, MI  48105
313-998-7479

deborah@citi.umich.edu

--------------------End of Original Message------------------------------

fclim          --- gbopoly1 % nusvm.bitnet @ cunyvm.cuny.edu
computer centre
singapore polytechnic
dover road
singapore 0513.

nazgul@apollo.COM (Kee Hinckley) (07/25/89)

In article <8441@batcomputer.tn.cornell.edu> braner@tcgould.tn.cornell.edu (Moshe Braner) writes:
>[]
>
>The Apollo "more" tool chooses it's own font, and takes a lot
>of time to start up.  Quite annoying when, e.g., reading mail
>letter by letter (with PAGER=more).  Is there an alternative?
>Has somebody written a simple "more" that does not do cursor
>addressing (and thus escapes the vt100 emulator)?

This is a rather technical nit, but in fact more does none of this.
More requires the use of a terminal emulator, and pads are not
emulators.  Thus what you are watching is actually the startup of
the vt100 emulator each time you read a mail message.  There are
several options.  You can either let the stuff scroll out, and then
scroll back to it, you can use crpad to create a new window with
the output, or you can write a pretty trivial application to pop
up a read-only pane on the message.  There are lots of the latter
hanging around, but I don't believe any get shipped.  Most people
at Apollo do either the first or the third of those choices.  I
suppose if you want to totally give up padness you could also simply
run your mail program from a vt100 emulator.

						-kee
-- 
### User Environment, Apollo Computer Inc. ###  Public Access ProLine BBS   ###
###     {mit-eddie,yale}!apollo!nazgul     ###  nazgul@pro-angmar.cts.com   ###
###           nazgul@apollo.com            ### (617) 641-3722 300/1200/2400 ###
I'm not sure which upsets me more; that people are so unwilling to accept      responsibility for their own actions, or that they are so eager to regulate   everyone else's.