[comp.mail.mush] MUSH and use of more

szoltek@gmuvax2.gmu.edu (S.M. Zoltek) (04/07/90)

     In my .login file I have the line 

     setenv MORE = -c

and I am having trouble getting more to behave properly when reading
mail.  Specifically, after reading two screens of a note that is
several screens long and then pressing the "b" key I just get a beep.
I believe that I should instead get "paged" one page back.  This is
what happens when I use more on a file when I am not reading mail.  

     If someone can help, I would be most appreciative.

Below is a copy of my .mushrc file

-----------------

if $TERM == vt100
    set autoedit
else 
    unset autoedit
endif
set ask # - the default
set autoinclude
set cdpath=". ~/ ~/private/Mail ~/private"
set crt = 24
set dead="~/tmp/dead.letter"
set editor="/usr/local/bin/emacs"
#The next line is not needed since it sets the default value for folder
set folder="~/private/Mail"
set hdr_format="%10n %W %d (%3l/%5c) %27s"
set ignoreeof # - the default -- keeps your from exiting mail by `^D'
set in_reply_to="%n's message as of %d"
set mbox = "~/private/Mail/mbox"
set pager="more -c"
set pre_indent_str = " "
#set pre_indent_str = "/* "
set indent_str = "> "
#set indent_str = " * "
set post_indent_str = " "
#set post_indent_str = " */"
#set record=~/Mail/record
set save_empty
set show_deleted
#set show_hdrs="from date subject to cc"
#set sort="-d"
set tmpdir="~/tmp"
set toplines=5
#set unix
set verify
set visual="/usr/local/bin/emacs"# -- Path name is not needed
set wrap
set wrapcolumn=71
set autosign2="~/private/Mail/.signature2"

-- 
          =========================================================
         | S.M. Zoltek       Internet      szoltek@gmuvax2.gmu.edu |
         |                   BITNET        SZOLTEK@GMUVAX          |
          =========================================================

schaefer@ogicse.ogi.edu (Barton E. Schaefer) (04/08/90)

In article <1127@gmuvax2.gmu.edu> szoltek@gmuvax2.gmu.edu (S.M. Zoltek) writes:
} 
} I am having trouble getting more to behave properly when reading
} mail.  Specifically, after reading two screens of a note that is
} several screens long and then pressing the "b" key I just get a beep.
} I believe that I should instead get "paged" one page back.  This is
} what happens when I use more on a file when I am not reading mail.  

The `problem' here is that "more" is reading from a pipe, not from a
file.  Mush runs the pager via popen(3) and writes the message to the
pager's standard input; "more" does not actually buffer the text, it
"pages backward" by performing an fseek(3) on the paged file and then
re-reading it.  Because fseek() doesn't work on pipes, you get a beep.
You will see the same behavior if you use "cat file | more".

Two possible solutions:

1.  Get and/or start using "less" instead of "more".

2.  set pager = 'cat > temp_file_name; more temp_file_name'

The latter is not guaranteed to behave well for other uses of the pager,
and in fact acts a little oddly on my system for no reason I can discern
(it starts out by printing "--More-- Next file: temp_file_name" as if
there were some other [empty] input file; this is probably because stdin
does not appear to "more" to be a terminal).
-- 
Bart Schaefer          "EARTH: Surrender IMMEDIATELY or we PICKLE DAN QUAYLE"

                                                                    "THPPFT!"
schaefer@cse.ogi.edu (used to be cse.ogc.edu)

henry@GARP.MIT.EDU (Henry Mensch) (04/08/90)

   Date: 7 Apr 90 02:19:53 GMT
   From: gmuvax2!szoltek@gmu90x.gmu.edu  (S.M. Zoltek)
   Organization: George Mason Univ., Fairfax, Va.
   Sender: mush-users-request@garp.mit.edu


	In my .login file I have the line 

	setenv MORE = -c

the earlier explanation is correct, but your setenv above isn't
correct, either:

	setenv MORE -c

(you don't need the "=" with setenv)

# Henry Mensch    /   <henry@garp.mit.edu>   /   E40-379 MIT,  Cambridge, MA
# <hmensch@uk.ac.nsfnet-relay> / <henry@tts.lth.se> / <mensch@munnari.oz.au>

szoltek@gmuvax2.gmu.edu (S.M. Zoltek) (04/08/90)

In article <1127@gmuvax2.gmu.edu> szoltek@gmuvax2.gmu.edu (S.M. Zoltek) writes:
>
>     In my .login file I have the line 
>
-------------------------------------------------------
     ACTUALLY I MADE A MISTAKE WHEN I TYPED THIS MESSAGE AND I DO NOT
HAVE AN EQUALS BETWEEN MORE AND THE C ...


>     setenv MORE = -c
--------------------------------------------------------
However, I do have the problem below and the listing of what is in my
.musrhc file is accurate.  (Although possibley not correct -- that is
why I am posting this.  Thanks for any help)
>
>and I am having trouble getting more to behave properly when reading
>mail.  Specifically, after reading two screens of a note that is
>several screens long and then pressing the "b" key I just get a beep.
>I believe that I should instead get "paged" one page back.  This is
>what happens when I use more on a file when I am not reading mail.  
>
>     If someone can help, I would be most appreciative.
>
>Below is a copy of my .mushrc file
>
>-----------------
>
>if $TERM == vt100
>    set autoedit
>else 
>    unset autoedit
>endif
>set ask # - the default
>set autoinclude
>set cdpath=". ~/ ~/private/Mail ~/private"
>set crt = 24
>set dead="~/tmp/dead.letter"
>set editor="/usr/local/bin/emacs"
>#The next line is not needed since it sets the default value for folder
>set folder="~/private/Mail"
>set hdr_format="%10n %W %d (%3l/%5c) %27s"
>set ignoreeof # - the default -- keeps your from exiting mail by `^D'
>set in_reply_to="%n's message as of %d"
>set mbox = "~/private/Mail/mbox"
>set pager="more -c"
>set pre_indent_str = " "
>#set pre_indent_str = "/* "
>set indent_str = "> "
>#set indent_str = " * "
>set post_indent_str = " "
>#set post_indent_str = " */"
>#set record=~/Mail/record
>set save_empty
>set show_deleted
>#set show_hdrs="from date subject to cc"
>#set sort="-d"
>set tmpdir="~/tmp"
>set toplines=5
>#set unix
>set verify
>set visual="/usr/local/bin/emacs"# -- Path name is not needed
>set wrap
>set wrapcolumn=71
>set autosign2="~/private/Mail/.signature2"
>
>-- 

-- 
          =========================================================
         | S.M. Zoltek       Internet      szoltek@gmuvax2.gmu.edu |
         |                   BITNET        SZOLTEK@GMUVAX          |
          =========================================================