Dear List, I have an orgmode file for collecting data and producing a plot. The file contains a Perl script which runs on a remote machine and generates Graphviz input. This is then used to create a PDF file. I have had a look at http://orgmode.org/manual/Batch-execution.html but it is not clear to me how I would navigate to the right part of the file so that I could then call org-babel-execute-src-block. Can anyone help? Thanks Loris
Loris Bennett <loris.bennett@fu-berlin.de> wrote:
> Dear List,
>
> I have an orgmode file for collecting data and producing a plot. The
> file contains a Perl script which runs on a remote machine and generates
> Graphviz input. This is then used to create a PDF file.
>
> I have had a look at
>
> http://orgmode.org/manual/Batch-execution.html
>
> but it is not clear to me how I would navigate to the right part of the
> file so that I could then call org-babel-execute-src-block.
>
> Can anyone help?
>
Haven't tested it but this should work: make sure that the code block is
named and then use org-babel-goto-named-src-block.
Nick
Nick Dokos writes: > Loris Bennett <loris.bennett@fu-berlin.de> wrote: > >> Dear List, >> >> I have an orgmode file for collecting data and producing a plot. The >> file contains a Perl script which runs on a remote machine and generates >> Graphviz input. This is then used to create a PDF file. >> >> I have had a look at >> >> http://orgmode.org/manual/Batch-execution.html >> >> but it is not clear to me how I would navigate to the right part of the >> file so that I could then call org-babel-execute-src-block. >> >> Can anyone help? >> > > Haven't tested it but this should work: make sure that the code block is > named and then use org-babel-goto-named-src-block. > > Nick Or if you want to goto a heading first see this thread: http://lists.gnu.org/archive/html/emacs-orgmode/2012-05/msg00421.html Myles
Nick Dokos <nicholas.dokos@hp.com> writes:
> Loris Bennett <loris.bennett@fu-berlin.de> wrote:
>
>> Dear List,
>>
>> I have an orgmode file for collecting data and producing a plot. The
>> file contains a Perl script which runs on a remote machine and generates
>> Graphviz input. This is then used to create a PDF file.
>>
>> I have had a look at
>>
>> http://orgmode.org/manual/Batch-execution.html
>>
>> but it is not clear to me how I would navigate to the right part of the
>> file so that I could then call org-babel-execute-src-block.
>>
>> Can anyone help?
>>
>
> Haven't tested it but this should work: make sure that the code block is
> named and then use org-babel-goto-named-src-block.
>
> Nick
When I run org-babel-goto-named-src-block interactively, tab-completion
offers me the name of the block I'm interested in, but when I select it,
I get
,------------------------------------------------------------
| source-code block 'mem-usage-hist' not found in this buffer
`------------------------------------------------------------
Is this a bug? I'm on emacs23 with Org 7.8.11.
Cheers
Loris
--
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.bennett@fu-berlin.de
"Loris Bennett" <loris.bennett@fu-berlin.de> writes: > Nick Dokos <nicholas.dokos@hp.com> writes: > >> Loris Bennett <loris.bennett@fu-berlin.de> wrote: >> >>> Dear List, >>> >>> I have an orgmode file for collecting data and producing a plot. The >>> file contains a Perl script which runs on a remote machine and generates >>> Graphviz input. This is then used to create a PDF file. >>> >>> I have had a look at >>> >>> http://orgmode.org/manual/Batch-execution.html >>> >>> but it is not clear to me how I would navigate to the right part of the >>> file so that I could then call org-babel-execute-src-block. >>> >>> Can anyone help? >>> >> >> Haven't tested it but this should work: make sure that the code block is >> named and then use org-babel-goto-named-src-block. >> >> Nick > > When I run org-babel-goto-named-src-block interactively, tab-completion > offers me the name of the block I'm interested in, but when I select it, > I get > > ,------------------------------------------------------------ > | source-code block 'mem-usage-hist' not found in this buffer > `------------------------------------------------------------ > > Is this a bug? I'm on emacs23 with Org 7.8.11. This problem seems to be caused by the use of '#+header', so with ,------------------------ | #+name: test | #+header: :file out.txt | #+begin_src sh | echo blah | #+end_src `------------------------ I get the above error, but with ,----------------------------- | #+name: test | #+begin_src sh :file out.txt | echo blah | #+end_src `----------------------------- I don't. > Cheers > > Loris -- Dr. Loris Bennett (Mr.) ZEDAT, Freie Universität Berlin Email loris.bennett@fu-berlin.de
2012/8/29 Loris Bennett <loris.bennett@fu-berlin.de>:
> "Loris Bennett" <loris.bennett@fu-berlin.de> writes:
>
> This problem seems to be caused by the use of '#+header', so with
>
> ,------------------------
> | #+name: test
> | #+header: :file out.txt
> | #+begin_src sh
> | echo blah
> | #+end_src
> `------------------------
>
> I get the above error, but with
>
I've also noticed that, using the latest Org version from git, src
blocks with "#+header" lines *below* the "#+name" are handled
incorrectly, contrary to blocks whose "#+header" lines lie *above* the
"#+name".
--
Nicolas
Nicolas Girard <girard.nicolas@gmail.com> writes:
> I've also noticed that, using the latest Org version from git, src
> blocks with "#+header" lines *below* the "#+name" are handled
> incorrectly, contrary to blocks whose "#+header" lines lie *above* the
> "#+name".
It should work correctly now, thanks!
--
Bastien
2012/8/30 Bastien <bzg@altern.org>:
> Nicolas Girard <girard.nicolas@gmail.com> writes:
>
>> I've also noticed that, using the latest Org version from git, src
>> blocks with "#+header" lines *below* the "#+name" are handled
>> incorrectly, contrary to blocks whose "#+header" lines lie *above* the
>> "#+name".
>
> It should work correctly now, thanks!
>
Thanks to you, Bastien, for considering the quickest & dirtiest bug
report I've ever written !
--
Nicolas