emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer M Krug <Rainer@krugs.de>
To: Andreas Leha <andreas.leha@med.uni-goettingen.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] [babel] [R] :colnames yes conflicts with :results file
Date: Tue, 06 Jan 2015 14:49:48 +0100	[thread overview]
Message-ID: <m2oaqc3toj.fsf@krugs.de> (raw)
In-Reply-To: <olumw5wf5f9.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Tue, 06 Jan 2015 12:40:42 +0000")

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

Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:

> Hi all,

Hi

>
> There seems to be a bug in babel (at least for R) when it comes to
> source blocks producing file links but taking tables with headers.  In
> that case, ':colnames yes' disables the ':results file' directive.

I don't think this is a bug as it is not clear what should happen.
In the org manual it states concerning the :results file

,----
|    * `file' The results will be interpreted as the path to a file, and
|      will be inserted into the Org mode buffer as a file link.  E.g.,
|      `:results value file'. 
`----

But the :colnames only works on tables (i.e. :results table) - but the
result is represented as a link to a file. So what should happen?

If you would like to have a table with links to files, the easiest is to
put the file names into [[]] in R and then return them in a table - or
use :results output and "draw" the table.

But as it stands, these two header arguments do not go together.

It would be nice to have a warning (or even error) in org, or at least a
table of header argument precedence.

By the way - never used the :results file - but now I will! Thanks.

Hope this helps,

Rainer


>
> Here is the Cm:
> * test
>
> #+BEGIN_SRC R :results file replace
>   "some_file.csv"
> #+END_SRC
>
> #+RESULTS:
> [[file:some_file.csv]]
>
> #+BEGIN_SRC R :colnames yes :results file replace
>   "some_file.csv"
> #+END_SRC
>
> #+RESULTS:
> | x             |
> |---------------|
> | some_file.csv |
>
>
>
> * My Setup
> #+begin_src emacs-lisp
>   (concat
>    (replace-regexp-in-string " on .*" "" (emacs-version))
>    "\n"
>    (replace-regexp-in-string " @.*" ")" (org-version nil t))
>    "\n"
>    (replace-regexp-in-string "].*" "]" (ess-version)))
> #+end_src
>
> #+RESULTS:
> : GNU Emacs 24.4.50.1 (x86_64-apple-darwin13.3.0, NS appkit-1265.21 Version 10.9.4 (Build 13E28))
> :  of 2014-09-02
> : Org-mode version 8.3beta (release_8.3beta-717-ga8096c)
> : ess-version: 14.05 [git: 4283f1304a54502c42707b6a4ba347703f0992dd]
>
> Regards,
> Andreas
>
>
>

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

  reply	other threads:[~2015-01-06 13:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-06 12:40 [BUG] [babel] [R] :colnames yes conflicts with :results file Andreas Leha
2015-01-06 13:49 ` Rainer M Krug [this message]
2015-01-06 15:39   ` Andreas Leha
2015-01-06 17:50     ` Aaron Ecay
2015-01-07  9:11     ` Rainer M Krug
2015-01-06 16:01   ` Thomas S. Dye
2015-01-07  9:19     ` Rainer M Krug
2015-01-07 17:14       ` Thomas S. Dye
2015-01-07  9:33     ` Sebastien Vauban
2015-01-07 13:45       ` Rainer M Krug

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=m2oaqc3toj.fsf@krugs.de \
    --to=rainer@krugs.de \
    --cc=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \
    /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).