From: tsd@tsdye.com (Thomas S. Dye)
To: Alan Schmitt <alan.schmitt@polytechnique.org>
Cc: emacs-orgmode@gnu.org, Charles Berry <ccberry@ucsd.edu>
Subject: Re: How do I specify the language for a :results code block
Date: Mon, 02 Dec 2013 06:53:25 -1000 [thread overview]
Message-ID: <m1ob4z6vp6.fsf@tsdye.com> (raw)
In-Reply-To: <m2r49vfsc7.fsf@polytechnique.org> (Alan Schmitt's message of "Mon, 02 Dec 2013 11:41:12 +0100")
Aloha Alan,
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> Unfortunately, if I export this, the code is duplicated. Here is the
> generated html, for instance:
Yes, the code is partially duplicated when I run it. It looks to me as
if the problem stems from :results raw and the fact that results is
itself a source code block that includes lines like #+BEGIN_SRC and
#+END_SRC.
Perhaps the same confusion shows if you change the :results raw header
argument for the call line to :results org, evaluate, change back to
:results raw, and then evaluate again. You should find an extra
#+END_SRC in the buffer.
IIUC, your goal is to export the coq source code blocks. Does the
following, which uses :results org, do what you want? It seems to work
for me.
#+name: fetchcoq2
#+BEGIN_SRC sh :exports none :results raw :var f="demo.v"
echo "#+BEGIN_SRC coq"
echo $f
echo "#+END_SRC"
#+END_SRC
#+results: fetchcoq2
#+BEGIN_SRC coq
demo.v
#+END_SRC
#+name: fetchcoq-call
#+call: fetchcoq2("demo.v") :results org
#+results: fetchcoq-call
#+BEGIN_SRC org
,#+BEGIN_SRC coq
demo.v
,#+END_SRC
#+END_SRC
hth,
Tom
P.S. I remembered :wrap just now. This doesn't export well, though.
#+call: fetchcoq2("demo.v") :wrap src coq
#+results:
#+BEGIN_src coq
demo.v
#+END_src
Tom
--
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com
next prev parent reply other threads:[~2013-12-02 16:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 21:49 How do I specify the language for a :results code block Alan Schmitt
2013-11-29 22:10 ` Thomas S. Dye
2013-11-29 23:48 ` Charles Berry
2013-11-30 10:52 ` Alan Schmitt
2013-11-30 16:57 ` Thomas S. Dye
2013-12-02 10:41 ` Alan Schmitt
2013-12-02 11:27 ` Sebastien Vauban
2013-12-02 13:04 ` Alan Schmitt
2013-12-02 18:09 ` Sean O'Halpin
2013-12-04 13:18 ` Alan Schmitt
2013-12-04 20:06 ` Fabrice Niessen
2013-12-05 12:33 ` Alan Schmitt
2013-12-02 16:53 ` Thomas S. Dye [this message]
2013-12-04 12:35 ` Alan Schmitt
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=m1ob4z6vp6.fsf@tsdye.com \
--to=tsd@tsdye.com \
--cc=alan.schmitt@polytechnique.org \
--cc=ccberry@ucsd.edu \
--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 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.