[comp.mail.elm] Pager limitations

steve@raspail.UUCP (Steve Schonberger) (10/08/88)

One thing that bothers me about elm (I have 1.7, so this may have
been changed in later versions) is that when you look at a long
note, there is no way to go down a half screen, or go up at all.

If that is in place in the later versions, wonderful -- I'll hassle
some locals for a copy of it.  If not, it would be nice if someone
could think about putting it in place.

If it is already there, but not documented, let me know by mail,
and if it's there and documented, my apologies; flame me by mail.

	Steve Schonberger
	steve@raspail.uucp	raspail!steve@shamash.cdc.com
	...!uunet!rosevax!shamash!rapail!steve

rob@pbhyf.PacBell.COM (Rob Bernardo) (10/08/88)

In article <958@raspail.UUCP> steve@raspail.UUCP (Steve Schonberger) writes:
+One thing that bothers me about elm (I have 1.7, so this may have
+been changed in later versions) is that when you look at a long
+note, there is no way to go down a half screen, or go up at all.

I have proposed an enhancement to the elm 2.2 development team
for the builtin pager. I have proposed that the pager be capable of:

    moving forward or backward one screenful
    skipping forward or backward a specified number of screenfuls

    moving forward or backward one line
    skipping forward or backward a specified number of lines

    moving to a specific line number
    moving to a specific percentage of the way through the message
	(which includes returning to the beginning of the message
	and going to the end of the message) (cf. the pager "less")

    searching forward or backward for a pattern

Wrt to the last capability, regular expressions would be nice. Is
regex(3) and recmp(3) (part of libPW.a) found on most UNIX systems?
(If not, we'd have to come up with look-alikes to include this capability
uniformly. - >groan<)

+If that is in place in the later versions, wonderful -- I'll hassle
+some locals for a copy of it.  If not, it would be nice if someone
+could think about putting it in place.

I hope to have enhancement worked out and submitted for the official
release of elm 2.2. Maybe this is a good time to rewrite *all* the pager
stuff since, if you saw the other postings here about scrambled stdio
buffers, the interface to standalone pagers needs revamping as well.
Got my work cut out for me. :-(
-- 
Rob Bernardo, Pacific Bell UNIX/C Reusable Code Library
Email:     ...![backbone]!pacbell!rob   OR  rob@PacBell.COM
Office:    (415) 823-2417  Room 4E750A, San Ramon Valley Administrative Center
Residence: (415) 827-4301  R Bar JB, Concord, California

rob@pbhyf.PacBell.COM (Rob Bernardo) (10/09/88)

In article <4801@b-tech.UUCP> zeeff@b-tech.UUCP (Jon Zeeff) writes:
+I agree, a backwards page command in the builtin pager would be really nice.
+Using less is too slow.

Less is slow only because you have to exec it. Once it's running, it's not
slow. So any external pager would have this difficulty.

One thing on the side of enhancing the builtin pager is that as a 
builtin it understands some of the index screen commands. E.g. if 
you are in the midst of paging through one message, you can go 
directly to paging through the next message with the 'n' command 
without having to return to the index screen. 

For the these two reasons it is probably the best to enhance
the builtin pager rather than simply recommend use of less as
an external pager.
-- 
Rob Bernardo, Pacific Bell UNIX/C Reusable Code Library
Email:     ...![backbone]!pacbell!rob   OR  rob@PacBell.COM
Office:    (415) 823-2417  Room 4E750A, San Ramon Valley Administrative Center
Residence: (415) 827-4301  R Bar JB, Concord, California

chip@vector.UUCP (Chip Rosenthal) (10/09/88)

In article <958@raspail.UUCP> steve@raspail.UUCP (Steve Schonberger) writes:
>One thing that bothers me about elm [...] there is no way [with the
>builtin pager] to go down a half screen, or go up at all.

Yeah...this remains a limitation of the builtin pager.  And this has
kind of bothered me as well.

But I think it is wrong wrong wrong to start adding features to the
builtin pager.  Instead, I would strongly prefer a modification of
the "pager" variable so I can say something like "pager = 48:less"
which says, "use 'less' as my pager for messages 48 lines or longer and
builtin for anything smaller."

On the other hand, I'd be willing to forgoe this if it adds a lot
of code.  Elm is already humongous, and a bit of dieting wouldn't hurt.
-- 
Chip Rosenthal     chip@vector.UUCP | I've been a wizard since my childhood.
Dallas Semiconductor   214-450-0486 | And I've earned some respect for my art.

scs@itivax.UUCP (Steve C. Simmons) (10/10/88)

In article <4035@pbhyf.PacBell.COM> rob@pbhyf.PacBell.COM (Rob Bernardo) writes:
>regular expressions would be nice. Is
>regex(3) and recmp(3) (part of libPW.a) found on most UNIX systems?
>(If not, we'd have to come up with look-alikes to include this capability
>uniformly. - >groan<)

Why not use the regex suite that was posted?  It's as close a match
as you're likely to find on compatibility; many sites have adopted it
as their standard; it's faster than blue blazes, and the more common
it gets the closer it gets to becoming the standard.  Wouldn't it
be nice if ed, ex, vi, grep, sed, sh, ksh, csh, etc all used the same
regular expression?  Strike a blow for compatibility.

>I hope to have enhancement worked out and submitted for the official
>release of elm 2.2. Maybe this is a good time to rewrite *all* the pager
>stuff since, if you saw the other postings here about scrambled stdio
>buffers, the interface to standalone pagers needs revamping as well.
>Got my work cut out for me. :-(

Again, how about a blow for compatibility?  If the author will grant
permission, it probably wouldn't be that hard to shoehorn less right
into elm.  The big diffs would be teaching it that BOF/EOF should be
replaced by BOMsg/EOMsg, and an "escape" mode to let the elm j/k/d/etc
commands work.

-- 
Steve Simmons		...!umix!itivax!scs
Industrial Technology Institute, Ann Arbor, MI.
"You can't get here from here."

steve@raspail.UUCP (Steve Schonberger) (10/11/88)

I wrote:
> One thing that bothers me about elm (I have 1.7, so this may have
> been changed in later versions) is that when you look at a long
> note, there is no way to go down a half screen, or go up at all.

Some other suggested using less, adapting elm to conditionally use
less, and so forth.  The problem with an external pager is the exec
overhead.  Since less seems to be a fairly portable program also,
why not make an option to compile less into elm mostly as is?  I
don't know how ugly it would be to make less work as a subroutine
of elm, rather than a standalone program, but I would imagine it
is probably less (pun not intended, but intentionally noted) trouble
than writing a whole new pager for elm that is a less work-alike.

	Steve Schonberger
	steve@raspail.uucp	raspail!steve@shamash.cdc.com
	...!uunet!rosevax!shamash!rapail!steve

lyndon@nexus.ca (Lyndon Nerenberg) (10/13/88)

In article <603@vector.UUCP>, chip@vector (Chip Rosenthal) writes:
>
>But I think it is wrong wrong wrong to start adding features to the
>builtin pager.  Instead, I would strongly prefer a modification of
>the "pager" variable so I can say something like "pager = 48:less"
>which says, "use 'less' as my pager for messages 48 lines or longer and
>builtin for anything smaller."

If we are to call an external pager, elm should honor the PAGER
environment variable. Assume the builtin pager by default, with
a syntax similar to Mail(1), where your .mailrc says:

set crt=22

causing messages longer than 22 lines to be piped through the
pager.
--