help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird interaction between chroot jail and shell-mode


From: Sean McAfee
Subject: Re: Weird interaction between chroot jail and shell-mode
Date: Wed, 08 Dec 2010 15:34:57 -0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin)

Ilya Zakharevich <nospam-abuse@ilyaz.org> writes:
> On 2010-11-01, Sean McAfee <eefacm@gmail.com> wrote:
>> Ultimately this routine uses the terminal size reported by the
>> GetTerminalSize function in the standard Term::ReadKey module, which in
>> a shell-mode shell explicitly reports a screen width and height of zero.
>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> Ultimately, this would seem to be Term::ReadKey's fault.
>
> How do you interpret this as a fault of Term::ReadKey?  It got an
> "explicit report".  Why should it indicate that it did not?

I meant that Term::ReadKey explicitly reported a screen size of 0x0, not
that a screen size of 0x0 had been explicitly reported to it.  Whether
that is in fact the case, or that T::RK misinterpreted some kind of
unavailability code from the underlying terminal driver, I don't know.

> P.S.  Of course, sometimes it is more useful to cheat than to
>       "stupidly follow the specification" in the corner cases.  But
>       one needs to have a more-or-less clear picture of possible
>       consequences.  As the simplest example, does wrap_msg() handle
>       the empty list return from GetTerminalSize()?

Yes, it does.  The core bit of the relevant code in the module
Locale::Po4a::Common is:

    my @term=eval "use Term::ReadKey; Term::ReadKey::GetTerminalSize()";
    $col=$term[0] if (!$@);
    $col=76 if (!defined $col);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]