emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Paul Stansell <paulstansell@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] With R using ":var d=data" breaks ":colnames yes" [9.7-pre (release_9.6.10-881-g595a32]
Date: Thu, 7 Mar 2024 18:38:50 +0000	[thread overview]
Message-ID: <CAMJKaZx=VMhrXdcSHNzRy2OFpStWNn8u=e1776HFm-jV+Cu=Qw@mail.gmail.com> (raw)
In-Reply-To: <87wmqexjoj.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 1691 bytes --]

Hi Ihor,

Thanks for your advice, it helps a lot.  Sorry for submitting
something that wasn't a bug.

Paul

On Thu, 7 Mar 2024 at 13:16, Ihor Radchenko <yantar92@posteo.net> wrote:

> Paul Stansell <paulstansell@gmail.com> writes:
>
> > It seems that using ":var d=data" breaks ":colnames yes" in the header of
> > an R code block.
> > ...
> > #+name: data
> > |--------+--------|
> > |      x |      y |
> > |--------+--------|
> > | 111.89 |  88.37 |
> > | 392.12 | 297.33 |
> > |--------+--------|
>
> It is expected.
> :colnames yes implies:
>
>      The ‘colnames’ header argument accepts ‘yes’, ‘no’, or ‘nil’
>      values.  The default value is ‘nil’: if an input table has column
>      names--because the second row is a horizontal rule--then Org
>      removes the column names, processes the table, puts back the column
>      names, and then writes the table to the results block.  Using
>      ‘yes’, Org does the same to the first row, even if the initial
>      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>      table does not contain any horizontal rule.  When set to ‘no’, Org
>      does not pre-process column names at all.
>
> In your table, the first row is a horizontal line, so Org tries to parse
> the first line as column names. And fails, of course.
>
> I guess that we can make `org-babel-get-colnames' smarter and make it
> skip the leading hlines.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>

[-- Attachment #2: Type: text/html, Size: 2494 bytes --]

  reply	other threads:[~2024-03-07 18:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 23:09 [BUG] With R using ":var d=data" breaks ":colnames yes" [9.7-pre (release_9.6.10-881-g595a32] Paul Stansell
2024-03-07 13:20 ` Ihor Radchenko
2024-03-07 18:38   ` Paul Stansell [this message]
2024-03-07 19:05     ` Ihor Radchenko

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMJKaZx=VMhrXdcSHNzRy2OFpStWNn8u=e1776HFm-jV+Cu=Qw@mail.gmail.com' \
    --to=paulstansell@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).