From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Re: Orgmodeorg-export-generic gives an error Date: Wed, 22 Jul 2009 01:59:12 +0200 Message-ID: <877hy137vz.fsf@bzg.ath.cx> References: <87eisgjl8s.fsf@bzg.ath.cx> <211769420907171223r6ffe0086mccfbed65aa0fe3f5@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTPEz-0001U6-8S for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 19:59:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTPEu-0001S9-SJ for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 19:59:24 -0400 Received: from [199.232.76.173] (port=59761 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTPEu-0001Rx-La for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 19:59:20 -0400 Received: from mail-pz0-f202.google.com ([209.85.222.202]:39431) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTPEu-0001kC-82 for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 19:59:20 -0400 Received: by pzk40 with SMTP id 40so2364438pzk.14 for ; Tue, 21 Jul 2009 16:59:19 -0700 (PDT) In-Reply-To: (Shelagh Manton's message of "Tue, 21 Jul 2009 23:32:21 +0000 (UTC)") 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: Shelagh Manton Cc: emacs-orgmode@gnu.org Shelagh Manton writes: > Someone mentioned in a previous post about a function you use to create a > new org-generic-alist called set-alist which is not known in gnu emacs. > > (defun org-set-generic-type (type definition) > "Adds a TYPE and DEFINITION to the existing list of defined generic > export definitions." > (set-alist 'org-generic-alist type definition)) > > I went searching for the function. I found the library which seems to be > part of the xemacs bundle. What could we use for people who use gnu > emacs? Is there a function in emacs that would be a good substitute? (defun set-alist (symbol key value) "Set cdr of an element (KEY . ...) in the alist bound to SYMBOL to VALUE." (or (boundp symbol) (set symbol nil)) (set symbol (put-alist key value (symbol-value symbol)))) (defun put-alist (key value alist) "Set cdr of an element (KEY . ...) in ALIST to VALUE and return ALIST. If there is no such element, create a new pair (KEY . VALUE) and return a new alist whose car is the new pair and cdr is ALIST." (let ((elm (assoc key alist))) (if elm (progn (setcdr elm value) alist) (cons (cons key value) alist)))) Those two functions come from alist.el which is included in Apel: http://pdb.finkproject.org/pdb/package.php/apel PS: On debian ~$ apt-get install apel should be okay... -- Bastien