From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: Where to define functions for use with org Date: Thu, 30 Oct 2008 15:47:57 +0100 Message-ID: <87bpx25eci.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvYop-0002SP-PF for emacs-orgmode@gnu.org; Thu, 30 Oct 2008 10:48:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvYon-0002QQ-OX for emacs-orgmode@gnu.org; Thu, 30 Oct 2008 10:48:15 -0400 Received: from [199.232.76.173] (port=33419 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvYon-0002QE-Ch for emacs-orgmode@gnu.org; Thu, 30 Oct 2008 10:48:13 -0400 Received: from ug-out-1314.google.com ([66.249.92.172]:11671) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvYon-0001Kr-7m for emacs-orgmode@gnu.org; Thu, 30 Oct 2008 10:48:13 -0400 Received: by ug-out-1314.google.com with SMTP id 36so1080040uga.17 for ; Thu, 30 Oct 2008 07:48:03 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, I'd like some suggestions about storing (defun)s in .org-files. Sometimes Org must use ELisp functions, for instance: - a dynamic table uses a function org-dblock-write:some_name to create its= contents - a table uses a formula like $5=3D'(my-function $2) which does a calculat= ion not available in calc These scenarios require that you have already the functions you will use.= If you wrote the (defun ...) in your code, you must go there and do C-x C-= e to evaluate all of them. My question is: =C2=BFhow would you make this process automatic and still= distribute the function code together with the .org file? org provides already contrib/org-eval.el, but I don't want to enable org-= eval *globally*, and I am not interested in outputting content; just in def= ining functions. Maybe there are other methods: ideally something similar to Emacs' =E2=80= =9Elocal variables=E2=80=9C in headers but for functions. How do you do this? Thanks, Daniel