emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: Where to define functions for use with org


From: Paul R
Subject: [Orgmode] Re: Where to define functions for use with org
Date: Thu, 30 Oct 2008 16:47:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

On Thu, 30 Oct 2008 15:47:57 +0100, Daniel Clemente <address@hidden> said:

Daniel> Maybe there are other methods: ideally something similar to
Daniel> Emacs' „local variables“ in headers but for functions.

The only difference between a function and a variable in emacs lisp, and
in any other Lisp-2, is the register where the name is bound. So if you
can store a value in a variable, you can also store some code through
the use of (lambda ...). Because of this Lisp-2 design, you will have to
call it later with (funcall name arg1 arg2 ...). Try the code below if
you want, in emacs :

    (setq myorgfunction (lambda (a b) (+ a b)))

    (funcall myorgfunction 5 6)

It might help you.

-- 
  Paul




reply via email to

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