From brod|e@g@@|@m @end|ng |rom y@hoo@com  Sun May 10 20:46:48 2020
From: brod|e@g@@|@m @end|ng |rom y@hoo@com (brodie gaslam)
Date: Sun, 10 May 2020 18:46:48 +0000 (UTC)
Subject: [Rd] Minor Infelicity in Printing of Objects Nested in Lists
In-Reply-To: <CAJf4E3rYXEQyjaMx8eC=z8GcExsq+ANj_4yPGtd0+JAeON0fLA@mail.gmail.com>
References: <952966889.973899.1589123587774.ref@mail.yahoo.com>
 <952966889.973899.1589123587774@mail.yahoo.com>
 <CAJf4E3rYXEQyjaMx8eC=z8GcExsq+ANj_4yPGtd0+JAeON0fLA@mail.gmail.com>
Message-ID: <9084527.1033395.1589136408991@mail.yahoo.com>

 > On Sunday, May 10, 2020, 12:24:17 PM EDT, Lionel Henry <lionel at rstudio.com> wrote:
>
> The main reason for resetting the tagbuf in `print.default()` and
> other entry points to the print routine is that it is currently not
> reset on exit. Creating a context to reset it on exit to its last
> value might work. This should be done in the entry points rather than
> in print-value-rec though, since callers of the latter might write to
> the tagbuf.
>
> Another solution to this problem is proposed with the first patch in
> https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17610. Maybe I
> should extract this patch into its own entry so the discussion can be
> separate from the other patches.

Ah, looks like the exact same issue, at least the first patch.? I'm not
 wed to any particular solution, but I am happy to help test/work on this
if there is interest in addressing this.

Best,

B.

>On 5/10/20, brodie gaslam via R-devel <r-devel at r-project.org> wrote:
>> Currently S3 objects nested in generic vectors cause the tag buffer to be
>> reset.? This feels sub-optimal for those objects that don't have a print
>> method:
>>
>>> list(a=list(b='hello'))
>> $a
>> $a$b???????????????? ### <<<< notice "$a$b"
>> [1] "hello"
>>
>>
>>> list(a=structure(list(b='hello'), class='world'))
>> $a
>> $b?????????????????? ### <<<< notice "$b", not "$a$b"
>> [1] "hello"
>>
>> attr(,"class")
>> [1] "world"



[Rd] Minor Infelicity in Printing of Objects Nested in Lists
brodie gaslam