emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bastienguerry@googlemail.com>
To: Shelagh Manton <shelagh.manton@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Orgmodeorg-export-generic gives an error
Date: Wed, 22 Jul 2009 01:59:12 +0200	[thread overview]
Message-ID: <877hy137vz.fsf@bzg.ath.cx> (raw)
In-Reply-To: <h45j64$lr7$1@ger.gmane.org> (Shelagh Manton's message of "Tue, 21 Jul 2009 23:32:21 +0000 (UTC)")

Shelagh Manton <shelagh.manton@gmail.com> 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

  reply	other threads:[~2009-07-21 23:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15 18:05 org-export-generic " srinivas
2009-07-16 22:50 ` Bastien
2009-07-17 19:23   ` Nathan Neff
2009-07-17 20:19     ` srinivas
2009-07-20 14:48       ` Nathan Neff
2009-07-20 22:39       ` Orgmodeorg-export-generic " Wes Hardaker
2009-07-21  5:53         ` Bastien
2009-07-21 23:32         ` Shelagh Manton
2009-07-21 23:59           ` Bastien [this message]
2009-07-22 15:13             ` Wes Hardaker
2009-07-22 23:33               ` Shelagh Manton
2009-07-23  7:33                 ` Bastien
2009-07-23  7:11               ` Bastien
2009-07-23 14:31                 ` James TD Smith
2009-08-10 15:42                   ` Wes Hardaker

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hy137vz.fsf@bzg.ath.cx \
    --to=bastienguerry@googlemail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=shelagh.manton@gmail.com \
    --subject='Re: Re: Orgmodeorg-export-generic gives an error' \
    /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

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).