From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org, lom pik <lompikvoila@gmail.com>
Subject: Re: bug: orgtbl-to-tsv: premature end of table
Date: Wed, 22 Jul 2015 21:04:10 -0700 [thread overview]
Message-ID: <alpine.OSX.2.11.1507221959001.1943@charles-berrys-macbook.local> (raw)
In-Reply-To: <87h9ovzug3.fsf@nicolasgoaziou.fr>
On Wed, 22 Jul 2015, Nicolas Goaziou wrote:
> Hello,
>
> "Charles C. Berry" <ccberry@ucsd.edu> writes:
>
>> Not a bug IMO.
>
> Notwithstanding the R issue, I think trimming the output of a radio
> table is a bit aggressive. We cannot know if trailing (and leading)
> spaces are significant in the output format the user defined.
>
> I removed the trimming part in commit
> bf37cd09b128b4431e1dd1a538fbcc4be3615042.
>
> Let me know if you disagree with that change.
I don't think the change broke anything that wasn't already broken.
And my diagnosis was wrong - I was confused by a problem that remains:
`org-babel-R-assign-elisp' is broken. Ragged rows in a table are filled
with "" in each missing field; `org-table-to-lisp' returns a list of lists
of common length.
`org-babel-R-assign-elisp' inspects that list to see if any element vary
in length. But they do not, and therefore `max' and `min' in the let*
varlist are equal and later on `ob-R-transfer-variable-table-with-header'
is always used.
I think lom pik's example would not have failed had max and min differed
as `ob-R-transfer-variable-table-without-header' would have been used
instead.
R src blocks ought to render missing elements due to ragged rows in a
table as NA, but this isnt the current behavior for this table:
#+NAME: tbl-ragged
| 1 | 2 | a |
| 8 | 9 | |
It seems like the fix for this would be to prune any "" at the ends of
lists in the value arg when beginning `org-babel-R-assign-elisp'.
But I am tired, so I'll defer trying this till another time.
Best,
Chuck
next prev parent reply other threads:[~2015-07-23 4:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 21:26 bug: orgtbl-to-tsv: premature end of table lom pik
2015-07-22 21:34 ` Charles C. Berry
2015-07-22 22:41 ` Nicolas Goaziou
2015-07-22 23:17 ` lom pik
2015-07-23 4:04 ` Charles C. Berry [this message]
2015-07-23 9:13 ` Andreas Leha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.OSX.2.11.1507221959001.1943@charles-berrys-macbook.local \
--to=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=lompikvoila@gmail.com \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.