emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Batch processing part of a file
@ 2012-08-21  8:11 Loris Bennett
  2012-08-21 12:36 ` Nick Dokos
  0 siblings, 1 reply; 8+ messages in thread
From: Loris Bennett @ 2012-08-21  8:11 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Batch processing part of a file
  2012-08-21  8:11 Batch processing part of a file Loris Bennett
@ 2012-08-21 12:36 ` Nick Dokos
  2012-08-22 22:11   ` Myles English
  2012-08-24 11:04   ` Loris Bennett
  0 siblings, 2 replies; 8+ messages in thread
From: Nick Dokos @ 2012-08-21 12:36 UTC (permalink / raw)
  To: Loris Bennett; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Batch processing part of a file
  2012-08-21 12:36 ` Nick Dokos
@ 2012-08-22 22:11   ` Myles English
  2012-08-24 11:04   ` Loris Bennett
  1 sibling, 0 replies; 8+ messages in thread
From: Myles English @ 2012-08-22 22:11 UTC (permalink / raw)
  To: Loris Bennett; +Cc: emacs-orgmode


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Batch processing part of a file
  2012-08-21 12:36 ` Nick Dokos
  2012-08-22 22:11   ` Myles English
@ 2012-08-24 11:04   ` Loris Bennett
  2012-08-29  9:57     ` Loris Bennett
  1 sibling, 1 reply; 8+ messages in thread
From: Loris Bennett @ 2012-08-24 11:04 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Batch processing part of a file
  2012-08-24 11:04   ` Loris Bennett
@ 2012-08-29  9:57     ` Loris Bennett
  2012-08-29 15:27       ` Nicolas Girard
  0 siblings, 1 reply; 8+ messages in thread
From: Loris Bennett @ 2012-08-29  9:57 UTC (permalink / raw)
  To: emacs-orgmode

"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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Batch processing part of a file
  2012-08-29  9:57     ` Loris Bennett
@ 2012-08-29 15:27       ` Nicolas Girard
  2012-08-30  7:03         ` Bastien
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Girard @ 2012-08-29 15:27 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Batch processing part of a file
  2012-08-29 15:27       ` Nicolas Girard
@ 2012-08-30  7:03         ` Bastien
  2012-08-30 16:49           ` Nicolas Girard
  0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2012-08-30  7:03 UTC (permalink / raw)
  To: Nicolas Girard; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Batch processing part of a file
  2012-08-30  7:03         ` Bastien
@ 2012-08-30 16:49           ` Nicolas Girard
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Girard @ 2012-08-30 16:49 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-08-30 16:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-21  8:11 Batch processing part of a file Loris Bennett
2012-08-21 12:36 ` Nick Dokos
2012-08-22 22:11   ` Myles English
2012-08-24 11:04   ` Loris Bennett
2012-08-29  9:57     ` Loris Bennett
2012-08-29 15:27       ` Nicolas Girard
2012-08-30  7:03         ` Bastien
2012-08-30 16:49           ` Nicolas Girard

Code repositories for project(s) associated with this 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).