From: tsd@tsdye.com (Thomas S. Dye)
To: Alan Schmitt <alan.schmitt@polytechnique.org>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: How do I specify the language for a :results code block
Date: Fri, 29 Nov 2013 12:10:52 -1000 [thread overview]
Message-ID: <m1bo12yi37.fsf@poto.westell.com> (raw)
In-Reply-To: <m27gbq3mkp.fsf@polytechnique.org> (Alan Schmitt's message of "Fri, 29 Nov 2013 22:49:42 +0100")
Aloha Alan,
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> Hello,
>
> I'm trying to write a block in some language (right now shell, but it
> will probably be something different) whose output is an org source
> block is some language (here coq). I keep looking at the documentation
> and I cannot see how to specify the language. If I try something like:
>
> #+BEGIN_SRC sh :results code
> head -n 3 demo.v
> #+END_SRC
>
> When I evaluate the block I get:
>
> #+RESULTS:
> #+BEGIN_SRC sh
> Definition toto : forall x, exists y, x = y.
>
> Lemma foo: forall x, x=x.
> #+END_SRC
>
> How can I have a block with "#+BEGIN_SRC coq" instead? I looked at
> http://orgmode.org/manual/Specific-header-arguments.html#Specific-header-arguments
> and at http://orgmode.org/manual/results.html#results and could not find
> where one would specify the language.
I think this can be accomplished by chaining:
#+name: first-link
#+begin_src sh
ECHO "XXX"
#+end_src
#+begin_src emacs-lisp :var x=first-link()
(princ x)
#+end_src
#+results:
: XXX
hth,
Tom
--
Thomas S. Dye
http://www.tsdye.com
next prev parent reply other threads:[~2013-11-29 22:11 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 [this message]
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
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=m1bo12yi37.fsf@poto.westell.com \
--to=tsd@tsdye.com \
--cc=alan.schmitt@polytechnique.org \
--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.