Skip to content

readline issue with 3.3.1

6 messages · Martin Maechler, Ralf Goertz

#
Hi,

after a recent update to version 3.3.1 on Opensuse Leap I have problems
with command lines longer than the terminal width. E.g. when I do this
so long that it gets wrapped while writing it")

and then hit enter I end up with:
[1] "This is a very long line which is in fact so l
ong that it gets wrapped while writing it"


So the output overwrites the second line of input. This does not happen
when I start R without readline support using "R --no-readline". That's
why I thought it could be a readline problem. But my current readline6
version (6.2) was installed way before the update of R and I had no
problems with the previous R version. Furthermore no other program using
readline seems to have that problem. E.g. in bash:

me at host:~/some/dir> echo This is a very long line which is in fact 
so long that it gets wrapped while writing it
This is a very long line which is in fact so long that it gets wrapped whi
le writing it
#
Am Wed, 20 Jul 2016 11:35:31 +0200
schrieb Ralf Goertz <r_goertz at web.de>:
I installed readline version 6.3 and the issue is gone. So probably some
of the recent changes in R's readline code are incompatible with version
readline version 6.2.
1 day later
#
> Am Wed, 20 Jul 2016 11:35:31 +0200
    > schrieb Ralf Goertz <r_goertz at web.de>:

    >> Hi,
    >> 
    >> after a recent update to version 3.3.1 on Opensuse Leap I have
    >> problems with command lines longer than the terminal width. E.g. when
    >> I do this

    > I installed readline version 6.3 and the issue is gone. So probably some
    > of the recent changes in R's readline code are incompatible with version
    > readline version 6.2.

Yes, it seems so, unfortunately.

Thank you for reporting !

Our plan had been different: the NEWS entry for 3.3.1 (among 'BUG FIXES') says

    ? Use of Ctrl-C to terminate a reverse incremental search started
      by Ctrl-R in the readline-based Unix terminal interface is now
      supported when R was compiled against readline >= 6.0 (Ctrl-G
      always worked).  (PR#16603)

So we had hoped that change (fixing a bug you *should* have been
able to see with readline 6.2, as well) would work correctly in all
versions of readline >= 6.0,
but evidently it did not in yours.

Martin Maechler
ETH Zurich / R Core Team
#
Am Thu, 21 Jul 2016 18:07:43 +0200
schrieb Martin Maechler <maechler at stat.math.ethz.ch>:
It would be great if ? while fixing this ? you also took care of the
SIGWINCH problem described in bug report
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16604 

Thanks, Ralf
2 days later
#
> Am Thu, 21 Jul 2016 18:07:43 +0200 schrieb Martin Maechler
    > <maechler at stat.math.ethz.ch>:

    >> Ralf Goertz <r_goertz at web.de> on Wed, 20 Jul 2016
    >> 16:37:53 +0200 writes:
 
    >>> I installed readline version 6.3 and the issue is
    >>> gone. So probably some of the recent changes in R's
    >>> readline code are incompatible with version readline
    >>> version 6.2.
    >> 
    >> Yes, it seems so, unfortunately.
    >> 
    >> Thank you for reporting !

    > It would be great if ? while fixing this ? you also took
    > care of the SIGWINCH problem described in bug report
    > https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16604

Well, that *has* been fixed in 'R-devel' and 'R 3.3.1 patched'
..  but again only for readline >= 6.3

(The release process of 3.3.1 was already too much advanced, and
 such source changes are delicate)

It is quite a bit of work to get correct code for the different
versions of readline, also dealing with the fact that e.g. on
Mac OSX the code needs to work with the libedit/editlib
"substitute".

One reason we have not closed the bug is that the fix is only
for readline >= 6.3, ... and also that I don't think we got much
of user confirmation of the form
   " yes, the bug goes away once I compile R-devel or R-patched
   "

    > Thanks, Ralf

You are welcome, Martin

    > ______________________________________________
    > R-help at r-project.org mailing list -- To UNSUBSCRIBE and
    > more, see https://stat.ethz.ch/mailman/listinfo/r-help
    > PLEASE do read the posting guide
    > http://www.R-project.org/posting-guide.html
    > and provide commented, minimal, self-contained, reproducible code.
#
Am Mon, 25 Jul 2016 08:57:17 +0200
schrieb Martin Maechler <maechler at stat.math.ethz.ch>:
[snip]
Thanks for the explanation. I will provide confirmation as soon as
R-patched hits my repositories. ;-)

Ralf