From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wes Hardaker Subject: Re: Orgmodeorg-export-generic gives an error Date: Mon, 20 Jul 2009 15:39:06 -0700 Message-ID: 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 1MT1Vu-00025i-4P for emacs-orgmode@gnu.org; Mon, 20 Jul 2009 18:39:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MT1Vp-0001u1-4v for emacs-orgmode@gnu.org; Mon, 20 Jul 2009 18:39:17 -0400 Received: from [199.232.76.173] (port=51725 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MT1Vo-0001ts-VZ for emacs-orgmode@gnu.org; Mon, 20 Jul 2009 18:39:12 -0400 Received: from mail.hardakers.net ([168.150.236.43]:46713) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MT1Vo-0001qj-GE for emacs-orgmode@gnu.org; Mon, 20 Jul 2009 18:39:12 -0400 In-Reply-To: (srinivas's message of "Fri, 17 Jul 2009 20:19:19 +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: srinivas Cc: emacs-orgmode@gnu.org >>>>> 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) -- \ Wes Hardaker http://pontifications.hardakers.net / \_____ "In the bathtub of history the truth is harder to hold than ________/ \_______ the soap, and much more difficult to find." _______/ \_________ -- Terry Pratchett ______________/ \__________________/