emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Embedded code


From: Ido Magal
Subject: Re: [Orgmode] Embedded code
Date: Tue, 18 Jan 2011 09:12:58 -0800

Eric,

thanks.  This is great.

Couple of followups:

1. Is it possible to avoid the confirmations on every file load?
2. Is it possible to manipulate or reference the results so that they're not bound to a RESULTS block.  I'm finding all of the blocks of orgmode distracting and I'm trying to avoid and eliminate them as much as possible.  I'm not used to it and they really impedes the readability of my notes.  Ideally my notes would look something like this:

* note 1
* note 2

* Back-links to this note:
(backlinks-function)
* All notes tagged with /foo/
(tagged-with( foo ))
* All notes tagged with /bar/
(tagged-with( bar ))

Is this possible?

Thanks again.  Cheers.


On Tue, Jan 18, 2011 at 08:16, Eric Schulte <address@hidden> wrote:
Rainer M Krug <address@hidden> writes:

> On 01/18/2011 12:48 AM, Eric Schulte wrote:
>> Hi,
>>
>> This is possible using Babel, the attached org-mode file will execute
>> its code block every time it is opened.  You can replace the contents of
>> the code block with any arbitrary elisp you would like to have executed
>> in the file.
>>
>> To see this work, save the attached org-mode file to your system, open
>> the file, answer "y" to allow execution, and then check your messages
>> buffer for the "I have been run" message to see that the code block has
>> in fact been evaluated.
>
> This is indeed very useful (e.g. if I open an R script, to open an R
> session and source the file).
>
> But it seems that all code blocks are evaluated on loading. Is there a
> way of only executing a specific code block?
>

Yes, replace the

# -*- eval: (org-babel-execute-buffer) -*-

with

# -*- eval: (save-excursion (org-babel-goto-named-src-block NAME) (org-babel-execute-src-block)) -*-

where NAME is replaced with the name of the code block to execute.

Cheers -- Eric


reply via email to

[Prev in Thread] Current Thread [Next in Thread]