From: Paul R <paul.r.ml@gmail.com>
To: Daniel Clemente <n142857@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Where to define functions for use with org
Date: Thu, 30 Oct 2008 16:47:32 +0100 [thread overview]
Message-ID: <87tzauf5kb.fsf@gmail.com> (raw)
In-Reply-To: <87bpx25eci.fsf@gmail.com> (Daniel Clemente's message of "Thu, 30 Oct 2008 15:47:57 +0100")
On Thu, 30 Oct 2008 15:47:57 +0100, Daniel Clemente <n142857@gmail.com> 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
next prev parent reply other threads:[~2008-10-30 15:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-30 14:47 Where to define functions for use with org Daniel Clemente
2008-10-30 15:47 ` Paul R [this message]
2008-10-31 21:39 ` Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tzauf5kb.fsf@gmail.com \
--to=paul.r.ml@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=n142857@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.