emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] help regarding babel to set in-buffer specific keybinding


From: Eric S Fraga
Subject: Re: [O] help regarding babel to set in-buffer specific keybinding
Date: Wed, 8 Feb 2012 16:10:23 +0000
User-agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.92 (gnu/linux)

Eric Schulte <address@hidden> writes:

> Thomas Alexander Gerds <address@hidden> writes:

[...]

>> now, I would like to tell org to evaluate the lisp code at startup, when
>> the org-file is opened. can this be achieved? particularly, is there a
>> startup special line which tells org to evaluate the lisp src block?  I
>> could add a suitable function to org-mode-hook, but is this the
>> recommended way?
>> Tomy
>>
> There is not currently any support for evaluating specific code blocks
> on buffer open.  You could move your elisp code into a
> buffer-local-variable block (which can house functions) and which are
> evaluated when buffers are opened.  I believe all changes made in such
> blocks are buffer local, so that may be your best bet.

and I would be uncomfortable having code execute automatically upon
visiting an org file...

however, I would imagine it should be possible to add something to
org-mode-hook that would execute a predefined src code block, e.g. maybe
one named "startup" or probably a bit more specific?  I wouldn't know
the babel invocation required, mind you, but I'm others can help here!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.03 (release_7.8.03.325.g5847)




reply via email to

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