* Exporting after executing code
@ 2009-09-11 12:41 andrea Crotti
2009-09-11 13:48 ` Detlef Steuer
0 siblings, 1 reply; 10+ messages in thread
From: andrea Crotti @ 2009-09-11 12:41 UTC (permalink / raw
To: emacs-orgmode
Maybe it's a simple answer, but I haven't seen it in the manual.
Is there a possibility to insert code like
#+BEGIN_SRC python
print hello
#+END_SRC
which when exported gets substituted to what returned by the result
of the code execution??
I think that I maybe need to customize the function in publishing
variables, is that right?
And another thing, is there an easy way to include a file like
\include or \input in latex??
THanks all
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Exporting after executing code
2009-09-11 12:41 Exporting after executing code andrea Crotti
@ 2009-09-11 13:48 ` Detlef Steuer
2009-09-11 15:04 ` andrea Crotti
0 siblings, 1 reply; 10+ messages in thread
From: Detlef Steuer @ 2009-09-11 13:48 UTC (permalink / raw
To: emacs-orgmode
On Fri, 11 Sep 2009 12:41:24 +0000 (UTC)
andrea Crotti <andrea.crotti.0@gmail.com> wrote:
> And another thing, is there an easy way to include a file like
> \include or \input in latex??
Yes, you can
#+INCLUDE:
http://orgmode.org/manual/Include-files.html#Include-files
detlef
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Exporting after executing code
2009-09-11 13:48 ` Detlef Steuer
@ 2009-09-11 15:04 ` andrea Crotti
2009-09-11 15:53 ` Nick Dokos
0 siblings, 1 reply; 10+ messages in thread
From: andrea Crotti @ 2009-09-11 15:04 UTC (permalink / raw
To: emacs-orgmode
Detlef Steuer <steuer <at> unibwh.de> writes:
>
> On Fri, 11 Sep 2009 12:41:24 +0000 (UTC)
> andrea Crotti <andrea.crotti.0 <at> gmail.com> wrote:
>
> > And another thing, is there an easy way to include a file like
> > \include or \input in latex??
>
> Yes, you can
> #+INCLUDE:
>
> http://orgmode.org/manual/Include-files.html#Include-files
>
Mmm why it's not in my info manual?
I also upgraded to latest 6.30e but it's not there, strange..
Thanks anyway
So no ways to execute arbitrary code only at certain conditions and
include it?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Exporting after executing code
2009-09-11 15:04 ` andrea Crotti
@ 2009-09-11 15:53 ` Nick Dokos
2009-09-11 16:54 ` andrea Crotti
0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2009-09-11 15:53 UTC (permalink / raw
To: andrea Crotti; +Cc: emacs-orgmode
andrea Crotti <andrea.crotti.0@gmail.com> wrote:
> Detlef Steuer <steuer <at> unibwh.de> writes:
>
> >
> > On Fri, 11 Sep 2009 12:41:24 +0000 (UTC)
> > andrea Crotti <andrea.crotti.0 <at> gmail.com> wrote:
> >
> > > And another thing, is there an easy way to include a file like
> > > \include or \input in latex??
> >
> > Yes, you can
> > #+INCLUDE:
> >
> > http://orgmode.org/manual/Include-files.html#Include-files
> >
> Mmm why it's not in my info manual?
> I also upgraded to latest 6.30e but it's not there, strange..
> Thanks anyway
>
My info manual says 6.29c and #+INCLUDE is present and accounted for.
HTH,
Nick
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Exporting after executing code
2009-09-11 15:53 ` Nick Dokos
@ 2009-09-11 16:54 ` andrea Crotti
2009-09-11 17:57 ` Sebastian Rose
0 siblings, 1 reply; 10+ messages in thread
From: andrea Crotti @ 2009-09-11 16:54 UTC (permalink / raw
To: emacs-orgmode
Nick Dokos <nicholas.dokos <at> hp.com> writes:
>
> My info manual says 6.29c and #+INCLUDE is present and accounted for.
>
My fault I didn't add the path to the info list, I was
looking in the old info manual..
Thinking about code execution I think it should be possible,
the spreadsheet does that in some ways..
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Exporting after executing code
2009-09-11 16:54 ` andrea Crotti
@ 2009-09-11 17:57 ` Sebastian Rose
2009-09-11 20:34 ` Carsten Dominik
0 siblings, 1 reply; 10+ messages in thread
From: Sebastian Rose @ 2009-09-11 17:57 UTC (permalink / raw
To: andrea Crotti; +Cc: emacs-orgmode
andrea Crotti <andrea.crotti.0@gmail.com> writes:
> Nick Dokos <nicholas.dokos <at> hp.com> writes:
>
>>
>> My info manual says 6.29c and #+INCLUDE is present and accounted for.
>>
> My fault I didn't add the path to the info list, I was
> looking in the old info manual..
>
> Thinking about code execution I think it should be possible,
> the spreadsheet does that in some ways..
See:
http://eschulte.github.com/org-babel/
Sebastian
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Exporting after executing code
2009-09-11 17:57 ` Sebastian Rose
@ 2009-09-11 20:34 ` Carsten Dominik
2009-09-12 17:38 ` andrea Crotti
0 siblings, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2009-09-11 20:34 UTC (permalink / raw
To: Sebastian Rose; +Cc: emacs-orgmode, andrea Crotti
On Sep 11, 2009, at 7:57 PM, Sebastian Rose wrote:
> andrea Crotti <andrea.crotti.0@gmail.com> writes:
>> Nick Dokos <nicholas.dokos <at> hp.com> writes:
>>
>>>
>>> My info manual says 6.29c and #+INCLUDE is present and accounted
>>> for.
>>>
>> My fault I didn't add the path to the info list, I was
>> looking in the old info manual..
>>
>> Thinking about code execution I think it should be possible,
>> the spreadsheet does that in some ways..
>
>
> See:
> http://eschulte.github.com/org-babel/
>
or, for a lighter solution
http://repo.or.cz/w/org-mode.git?a=blob_plain;f=contrib/lisp/org-eval.el;hb=HEAD
or
http://orgmode.org/worg/org-contrib/org-eval-light.php
But org-babel may really be the way to go.
- Carsten
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Exporting after executing code
2009-09-11 20:34 ` Carsten Dominik
@ 2009-09-12 17:38 ` andrea Crotti
2009-09-12 18:20 ` Eric Schulte
0 siblings, 1 reply; 10+ messages in thread
From: andrea Crotti @ 2009-09-12 17:38 UTC (permalink / raw
To: emacs-orgmode
Carsten Dominik <carsten.dominik <at> gmail.com> writes:
>
> or, for a lighter solution
>
> http://repo.or.cz/w/org-mode.git?a=blob_plain;f=contrib/lisp/org-eval.el;hb=HEAD
>
> or
>
> http://orgmode.org/worg/org-contrib/org-eval-light.php
>
> But org-babel may really be the way to go.
>
> - Carsten
>
org-babel is really nice I think, there's only one thing I don't understand yet.
If I want in the same file to have the source code and the output of the
source code how should I do??
Once I enable org-babel it executes everything before exporting??
No finer settings possible?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Exporting after executing code
2009-09-12 17:38 ` andrea Crotti
@ 2009-09-12 18:20 ` Eric Schulte
2009-09-14 13:27 ` andrea Crotti
0 siblings, 1 reply; 10+ messages in thread
From: Eric Schulte @ 2009-09-12 18:20 UTC (permalink / raw
To: andrea Crotti; +Cc: emacs-orgmode
andrea Crotti <andrea.crotti.0@gmail.com> writes:
> Carsten Dominik <carsten.dominik <at> gmail.com> writes:
>
>>
>> or, for a lighter solution
>>
>> http://repo.or.cz/w/org-mode.git?a=blob_plain;f=contrib/lisp/org-eval.el;hb=HEAD
>>
>> or
>>
>> http://orgmode.org/worg/org-contrib/org-eval-light.php
>>
>> But org-babel may really be the way to go.
>>
>> - Carsten
>>
>
> org-babel is really nice I think, there's only one thing I don't understand yet.
> If I want in the same file to have the source code and the output of the
> source code how should I do??
>
> Once I enable org-babel it executes everything before exporting??
> No finer settings possible?
>
Hi,
There are four export setting using Org-babel.
- none :: neither the code or the results are exported and the block is
not run
- code :: the fortified code is exported and the block is not run
- results :: the block is run, and the results are exported
- both :: the block is run and both the code and results are exported
These setting are controlled via the :exports header argument, so for
example in the following code block only the code would be included on
export.
#+begin_src ditaa :file test.png :exports code
+----------------------+
| |
| |
| +-----------+
| | |
| | |
| | |
| +-----------+
| |
+----------------------+
#+end_src
If you grab the latest Org-babel code from
http://github.com/eschulte/org-babel/tree/master then you can set the
exports header argument for an entire subtree by setting the subtree's
"exports" property, for example
** show all
:PROPERTIES:
:exports: both
:END:
Best -- Eric
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Exporting after executing code
2009-09-12 18:20 ` Eric Schulte
@ 2009-09-14 13:27 ` andrea Crotti
0 siblings, 0 replies; 10+ messages in thread
From: andrea Crotti @ 2009-09-14 13:27 UTC (permalink / raw
To: emacs-orgmode
Fantastic, Now I finally found how I will write my servers
documentation, but still I have to decide how to proceed.
I have a git repository in /etc, so every important file is under
revision control.
I have two options I think:
- move everything on the server and link the config files with absolute path
(/etc/conf.conf)
- keep everything local and create a git server which I pull every time I make
a change.
The documentation should stay there always on the server
automatically published in html format, so maybe the first
solution is better. But the second solution is more flexible and
I would have less problems with emacs and remote processes.
What would you suggest?
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-09-14 13:27 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-11 12:41 Exporting after executing code andrea Crotti
2009-09-11 13:48 ` Detlef Steuer
2009-09-11 15:04 ` andrea Crotti
2009-09-11 15:53 ` Nick Dokos
2009-09-11 16:54 ` andrea Crotti
2009-09-11 17:57 ` Sebastian Rose
2009-09-11 20:34 ` Carsten Dominik
2009-09-12 17:38 ` andrea Crotti
2009-09-12 18:20 ` Eric Schulte
2009-09-14 13:27 ` andrea Crotti
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.