From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shelagh Manton Subject: Re: Orgmodeorg-export-generic gives an error Date: Tue, 21 Jul 2009 23:32:21 +0000 (UTC) Message-ID: References: <87eisgjl8s.fsf@bzg.ath.cx> <211769420907171223r6ffe0086mccfbed65aa0fe3f5@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTOpB-00027N-PY for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 19:32:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTOp6-00026u-8g for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 19:32:44 -0400 Received: from [199.232.76.173] (port=40044 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTOp6-00026r-29 for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 19:32:40 -0400 Received: from main.gmane.org ([80.91.229.2]:41334 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MTOp5-0004wL-FK for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 19:32:39 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MTOox-00012T-KI for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 23:32:31 +0000 Received: from 203-219-222-168-cbr-pow-ts2-2600.tpgi.com.au ([203.219.222.168]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Jul 2009 23:32:31 +0000 Received: from shelagh.manton by 203-219-222-168-cbr-pow-ts2-2600.tpgi.com.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Jul 2009 23:32:31 +0000 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 On Mon, 20 Jul 2009 15:39:06 -0700, Wes Hardaker wrote: >>>>>> On Fri, 17 Jul 2009 20:19:19 +0000 (UTC), srinivas >>>>>> said: > > s> Nick Dokos suggested the following fix to .emacs: > > s> (if (< emacs-major-version 23) > s> (defun characterp (obj) > s> (and (char-or-string-p obj) (not (stringp obj))))) > > s> Inserting this check makes org-export-generic work for me. My Emacs > s> version on Windows is 22.3.1. > > (I was on vacation for a week and didn't see this problem). > > I wrote export-generic under xemacs and didn't notice that there was a > function compatibility issue. > > This patch to it should fix things: > > diff --git a/lisp/org-export-generic.el b/lisp/org-export-generic.el > index 64dcb1f..c9fc161 100644 > --- a/lisp/org-export-generic.el > +++ b/lisp/org-export-generic.el > @@ -1029,7 +1029,7 @@ REVERSE means to reverse the list if the plist > match is a list > subtype) > (cond > ((null prefixtype) "") > - ((and len (characterp prefixtype)) + ((and len > (char-or-string-p prefixtype) (not (stringp prefixtype ))) > ;; sequence of chars > (concat (make-string len prefixtype) "\n")) > ((stringp prefixtype) 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? Shelagh