Subject: Re: bug#12646: 24.2.50; Eshell problem with mailx(1)

From: Stephen Berman <[email-masked]>
Date: Mon, 15 Oct 2012 01:05:26 +0200

On Sun, 14 Oct 2012 15:00:34 +0200 Andreas Schwab <[email-masked]> wrote:

> Stephen Berman <[email-masked]> writes:
>
>> Welcome to the Emacs shell
>>
>> /data/steve/lib/emacs/gtk $ mail
>> Heirloom mailx version 12.5 7/5/10.  Type ? for help.
>> "/var/spool/mail/steve": 1 message 1 unread
>>>U  1 [email-masked] Sat Oct 13 23:53  109/4392  Re: bug#12612: 24.2.50; F
>> ? 
>> WARNING: terminal is not fully functional
>> -  (press RETURN)
>
> This is a bug in less, which crashes here.  As a workaround, disable the
> pager.
>
> Andreas.

Thanks for your explanation and your suggestion, but I have problems
with each and, even though this apparently is not an Emacs issue, I hope
you will indulge me a bit further:

First, regarding your suggested workaround, I'm not sure exactly what
you mean.  I tried `export PAGER=""' both from eshell and also from the
shell before starting Emacs, and neither changed the mailx problem in
eshell.  Then I tried `export PAGER="more"' and with that I could now
read mail with mailx from eshell; is that what you meant?  However, this
is an unsatisfactory workaround, since `more' is much worse than `less';
also, if this is only a problem with mailx, I wouldn't want to have
`less' replaced by `more' generally in eshell.  Or if you meant
something else, please say precisely what I have to do to disable the
pager.

Regarding your explanation, both my openSUSE 12.1 and 12.2 installations
contain the same version of less, less 444, yet the eshell problem with
mailx only happens in 12.2, so the bug must be elsewhere; is it in the
12.2 packaging (less-444-9.1.2.x86_64.rpm vs. less-444-3.2.1.x86_64.rpm
in 12.1)?  But if so, why is there no problem using less itself from
eshell in openSUSE 12.2?  And why does this bug only show up with mailx
in eshell (AFAIK)?  There is no problem using mailx with `M-x shell' or
`M-x term', nor from outside of Emacs (all with `less' as pager).  If
there is a bug in `less' in openSUSE 12.2, I should report it, but aside
from just repeating my Emacs bug report, I can't see what else to say;
if you can elaborate the issue, that would help.

Steve Berman