From: "Loris Bennett" <loris.bennett@fu-berlin.de>
To: emacs-orgmode@gnu.org
Subject: Re: Error "No :file header argument given" - minor bug?
Date: Wed, 02 Dec 2015 08:22:29 +0100 [thread overview]
Message-ID: <87610hl3gq.fsf_-_@hornfels.zedat.fu-berlin.de> (raw)
In-Reply-To: 87wpsyw411.fsf@hornfels.zedat.fu-berlin.de
"Loris Bennett" <loris.bennett@fu-berlin.de> writes:
> "Loris Bennett" <loris.bennett@fu-berlin.de> writes:
>
>> Hi,
>>
>> At the beginning of each month I generate a plot via a CALL to a block
>> of R code:
>>
>> #+CALL: code;plot_usage_historical_facet(type="users")
>>
>> The type is used as part of the name of the output file. Today I got
>> the error:
>>
>> user-error: No :file header argument given; cannot create graphical result.
>>
>> I have certainly updated Org since the last time I tried to create the
>> plot and am now running version 8.3.2 (8.3.2-39-gd537a3-elpaplus).
>>
>> Is this (new) behaviour expected? If, so what do I have to do to
>> generate a plot file with a name which is dependent on an argument?
>
> Looking at my code again, I think I may have been mistaken and this may
> never have worked as I describe above.
>
> Thus the question should be:
>
> Is it possible to have a variable as part of the :file specification?
To answer my own question:
Probably not, but in my case it isn't necessary.
In my R code I have:
ggsave(filename=paste0("./usage_",type,"_historical_facet.pdf"),plot=p)
and this produces, as desired, an output file where the file name
depends on the argument passed by CALL, e.g.
#+CALL: code;plot_usage_historical_facet(type="users")
What threw me was that you still need ':file' header but the name
specified there is irrelevant, e.g.
#+HEADER: :file tmp.pdf
When the block is evaluated, the file I want with the correct,
argument-dependent name is created. However I also get 'tmp.pdf', but
this file just seems to be an empty PDF shell without any pages.
So this seems to be a minor bug. Maybe ':file' should be able to take
a value which indicates that the name of the file will come from within
the block.
Cheers,
Loris
--
This signature is currently under construction.
next prev parent reply other threads:[~2015-12-02 7:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 9:07 Error "No :file header argument given" Loris Bennett
2015-12-01 16:02 ` Loris Bennett
2015-12-02 7:22 ` Loris Bennett [this message]
2015-12-03 18:31 ` Error "No :file header argument given" - minor bug? Aaron Ecay
2015-12-04 8:50 ` Loris Bennett
2015-12-17 17:25 ` Error "No :file header argument given" Grant Rettke
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=87610hl3gq.fsf_-_@hornfels.zedat.fu-berlin.de \
--to=loris.bennett@fu-berlin.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).