* org-export-generic gives an error
@ 2009-07-15 18:05 srinivas
2009-07-16 22:50 ` Bastien
0 siblings, 1 reply; 15+ messages in thread
From: srinivas @ 2009-07-15 18:05 UTC (permalink / raw
To: emacs-orgmode
Hi,
I am trying to test org-export-generic. I have an org file which exports
correctly to html but when I tried the org-export-generic, I get the following
error:
=== from *Messages* buffer
and: Symbol's function definition is void: characterp
My commands: C-c C-e g d (for demo)
I have tried C-c C-e g a (ascii) export but returns the same error.
Version Info:
GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-06 on SOFT-MJASON
Org-mode version 6.28b
Any tips on what could be causing this error.
- srinivas
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: org-export-generic gives an error
2009-07-15 18:05 org-export-generic gives an error srinivas
@ 2009-07-16 22:50 ` Bastien
2009-07-17 19:23 ` Nathan Neff
0 siblings, 1 reply; 15+ messages in thread
From: Bastien @ 2009-07-16 22:50 UTC (permalink / raw
To: srinivas; +Cc: emacs-orgmode
srinivas <sp_us@yahoo.com> writes:
> I am trying to test org-export-generic. I have an org file which exports
> correctly to html but when I tried the org-export-generic, I get the following
> error:
>
> === from *Messages* buffer
> and: Symbol's function definition is void: characterp
Please try to follow these recommendations:
http://orgmode.org/manual/Feedback.html
and send a more useful backtrace.
Thanks!
--
Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: org-export-generic gives an error
2009-07-16 22:50 ` Bastien
@ 2009-07-17 19:23 ` Nathan Neff
2009-07-17 20:19 ` srinivas
0 siblings, 1 reply; 15+ messages in thread
From: Nathan Neff @ 2009-07-17 19:23 UTC (permalink / raw
To: Bastien; +Cc: emacs-orgmode, srinivas
On Thu, Jul 16, 2009 at 5:50 PM, Bastien<bastienguerry@googlemail.com> wrote:
> srinivas <sp_us@yahoo.com> writes:
>
>> I am trying to test org-export-generic. I have an org file which exports
>> correctly to html but when I tried the org-export-generic, I get the following
>> error:
>>
>> === from *Messages* buffer
>> and: Symbol's function definition is void: characterp
>
> Please try to follow these recommendations:
>
> http://orgmode.org/manual/Feedback.html
>
> and send a more useful backtrace.
>
> Thanks!
>
> --
> Bastien
>
I'm getting this bug as well. I tried to follow the Feedback tips listed here:
http://orgmode.org/manual/Feedback.html
Here's my version information:
Aquamacs Version:
GNU Emacs 22.3.1 (i386-apple-darwin9.6.0, Carbon Version 1.6.0)
of 2009-02-17 on plume.sr.unh.edu - Aquamacs Distribution 1.7
Org Version:
Its value is "6.28trans"
I used a bare-minimum .emacs file (I'm using the git version of org-mode)
;; Add org-mode to path
(setq load-path (cons "~/src/3rdparty/elisp/org-mode/lisp" load-path))
(setq load-path (cons "~/src/3rdparty/elisp/org-mode/contrib/lisp" load-path))
Then, I created a bare-bones org file, and saved it as "foo.org"
* Do Something
I turned on debug mode, and simply ran this command while
the cursor was in "foo.org":
M-x org-export-generic
When presented with the menu, I cab choose any of the "a"scii
"w"ikipedia, "d"emo, "h"tml, etc choices.
All choices gives the following error/stacktrace:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
file-name-nondirectory(nil)
(or (and subtree-p (org-entry-get ... "EXPORT_FILE_NAME" t))
(file-name-nondirectory bfname))
(file-name-sans-extension (or (and subtree-p ...)
(file-name-nondirectory bfname)))
(concat (file-name-as-directory (org-export-directory :ascii
opt-plist)) (file-name-sans-extension (or ... ...)) filesuffix)
(let* ((opt-plist ...) (region-p ...) (rbeg ...) (rend ...)
(subtree-p ...) (level-offset ...) (opt-plist ...) helpstart (bogus
...) (help ...) (cmds ...) r1 r2 ass (export-plist ...) (custom-times
org-display-custom-times) (org-generic-current-indentation ...) (level
0) (old-level 0) line txt lastwastext (umax nil) (umax-toc nil)
(case-fold-search nil) (bfname ...) (filesuffix ...) (filename ...)
(filename ...) (buffer ...) (org-levels-open ...) (odd
org-odd-levels-only) (date ...) (author ...) (title ...) (email ...)
(language ...) (quote-re0 ...) (todo nil) (lang-words nil) (region
...) (lines ...) (withtags ...) (tagsintoc ...) (tocnotagsstr ...)
(tocdepth ...) (tocindentchar ...) (tocsecnums ...) (tocsecnumform
...) (tocformat ...) ...) (let (...) (org-unmodified ...)) (setq
org-min-level (org-get-min-level lines level-offset)) (setq
org-last-level org-min-level) (org-init-section-numbers)
(find-file-noselect filename) (setq lang-words (or ... ...))
(switch-to-buffer-other-window buffer) (erase-buffer)
(fundamental-mode) (mapc (lambda ... ...) org-export-plist-vars)
(org-set-local (quote org-odd-levels-only) odd) (setq umax (if arg ...
org-export-headline-levels)) (setq umax-toc umax) (if title (insert
...)) (if (and ... ...) (insert ...)) (cond (... ...) (date) (t ...))
(if (and date ...) (insert ...)) (if (plist-get export-plist
:toc-export) (progn ... ... ... ... ...)) (org-init-section-numbers)
(org-export-generic-check-section "top") (while (setq line ...) (when
... ... ...) (setq wrap nil) (setq line ...) (while ... ... ...) (when
custom-times ...) (cond ... ... ... ... ... ...))
(org-export-generic-check-section "bottom")
(org-export-generic-push-links (nreverse link-buffer)) (normal-mode)
(when thetoc (goto-char ...) (if ... ... ...) (mapc ... thetoc) (or
... ...)) (goto-char (point-min)) (let (beg end) (while ... ... ...
... ...)) (save-buffer) (let (beg end) (goto-char ...) (while ... ...
... ... ...) (goto-char ...) (while ... ... ... ...)) (goto-char
(point-min)))
org-export-generic(nil)
call-interactively(org-export-generic)
execute-extended-command(nil)
call-interactively(execute-extended-command)
Hope this helps,
--Nate
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: org-export-generic gives an error
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
0 siblings, 2 replies; 15+ messages in thread
From: srinivas @ 2009-07-17 20:19 UTC (permalink / raw
To: emacs-orgmode
Nathan,
Nick Dokos suggested the following fix to .emacs:
(if (< emacs-major-version 23)
(defun characterp (obj)
(and (char-or-string-p obj) (not (stringp obj)))))
Inserting this check makes org-export-generic work for me. My Emacs version on
Windows is 22.3.1.
I don't know what could be the cause of error on your machine.
- srinivas
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: org-export-generic gives an error
2009-07-17 20:19 ` srinivas
@ 2009-07-20 14:48 ` Nathan Neff
2009-07-20 22:39 ` Orgmodeorg-export-generic " Wes Hardaker
1 sibling, 0 replies; 15+ messages in thread
From: Nathan Neff @ 2009-07-20 14:48 UTC (permalink / raw
To: srinivas; +Cc: emacs-orgmode
On Fri, Jul 17, 2009 at 3:19 PM, srinivas<sp_us@yahoo.com> wrote:
> Nathan,
>
> Nick Dokos suggested the following fix to .emacs:
>
> (if (< emacs-major-version 23)
> (defun characterp (obj)
> (and (char-or-string-p obj) (not (stringp obj)))))
>
> Inserting this check makes org-export-generic work for me. My Emacs version on
> Windows is 22.3.1.
>
> I don't know what could be the cause of error on your machine.
>
> - srinivas
This also fixed Aquamacs version 1.8c, which uses Emacs 22.3.1 under the hood.
Thanks for the patch!
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Orgmodeorg-export-generic gives an error
2009-07-17 20:19 ` srinivas
2009-07-20 14:48 ` Nathan Neff
@ 2009-07-20 22:39 ` Wes Hardaker
2009-07-21 5:53 ` Bastien
2009-07-21 23:32 ` Shelagh Manton
1 sibling, 2 replies; 15+ messages in thread
From: Wes Hardaker @ 2009-07-20 22:39 UTC (permalink / raw
To: srinivas; +Cc: emacs-orgmode
>>>>> On Fri, 17 Jul 2009 20:19:19 +0000 (UTC), srinivas <sp_us@yahoo.com> 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 ______________/
\__________________/
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: Re: Orgmodeorg-export-generic gives an error
2009-07-20 22:39 ` Orgmodeorg-export-generic " Wes Hardaker
@ 2009-07-21 5:53 ` Bastien
2009-07-21 23:32 ` Shelagh Manton
1 sibling, 0 replies; 15+ messages in thread
From: Bastien @ 2009-07-21 5:53 UTC (permalink / raw
To: Wes Hardaker; +Cc: emacs-orgmode, srinivas
Applied, thanks.
Wes Hardaker <wjhns209@hardakers.net> writes:
> 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)
--
Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Orgmodeorg-export-generic gives an error
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
1 sibling, 1 reply; 15+ messages in thread
From: Shelagh Manton @ 2009-07-21 23:32 UTC (permalink / raw
To: emacs-orgmode
On Mon, 20 Jul 2009 15:39:06 -0700, Wes Hardaker wrote:
>>>>>> On Fri, 17 Jul 2009 20:19:19 +0000 (UTC), srinivas
>>>>>> <sp_us@yahoo.com> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Orgmodeorg-export-generic gives an error
2009-07-21 23:32 ` Shelagh Manton
@ 2009-07-21 23:59 ` Bastien
2009-07-22 15:13 ` Wes Hardaker
0 siblings, 1 reply; 15+ messages in thread
From: Bastien @ 2009-07-21 23:59 UTC (permalink / raw
To: Shelagh Manton; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Orgmodeorg-export-generic gives an error
2009-07-21 23:59 ` Bastien
@ 2009-07-22 15:13 ` Wes Hardaker
2009-07-22 23:33 ` Shelagh Manton
2009-07-23 7:11 ` Bastien
0 siblings, 2 replies; 15+ messages in thread
From: Wes Hardaker @ 2009-07-22 15:13 UTC (permalink / raw
To: Bastien; +Cc: emacs-orgmode, Shelagh Manton
>>>>> On Wed, 22 Jul 2009 01:59:12 +0200, Bastien <bastienguerry@googlemail.com> said:
B> Those two functions come from alist.el which is included in Apel:
So does that mean it's safe to leave the functions in use within
org-export generic, or should I replace it with a locally defined
slightly-different-named version?
--
\ 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 ______________/
\__________________/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Orgmodeorg-export-generic gives an error
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
1 sibling, 1 reply; 15+ messages in thread
From: Shelagh Manton @ 2009-07-22 23:33 UTC (permalink / raw
To: emacs-orgmode
On Wed, 22 Jul 2009 08:13:53 -0700, Wes Hardaker wrote:
>>>>>> On Wed, 22 Jul 2009 01:59:12 +0200, Bastien
>>>>>> <bastienguerry@googlemail.com> said:
>
> B> Those two functions come from alist.el which is included in Apel:
>
> So does that mean it's safe to leave the functions in use within
> org-export generic, or should I replace it with a locally defined
> slightly-different-named version?
Perhaps just putting (require 'alist) in your file will be enough. If
people do not have that library emacs will warn them. Also maybe mention
it in the documentation at the top of the file that apel package is
needed.
Shelagh
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Orgmodeorg-export-generic gives an error
2009-07-22 15:13 ` Wes Hardaker
2009-07-22 23:33 ` Shelagh Manton
@ 2009-07-23 7:11 ` Bastien
2009-07-23 14:31 ` James TD Smith
1 sibling, 1 reply; 15+ messages in thread
From: Bastien @ 2009-07-23 7:11 UTC (permalink / raw
To: Wes Hardaker; +Cc: emacs-orgmode, Shelagh Manton
Wes Hardaker <wjhns209@hardakers.net> writes:
>>>>>> On Wed, 22 Jul 2009 01:59:12 +0200, Bastien <bastienguerry@googlemail.com> said:
>
> B> Those two functions come from alist.el which is included in Apel:
>
> So does that mean it's safe to leave the functions in use within
> org-export generic,
AFAIK `set-alist' is not defined in vanilla Emacs. So no, it's not safe
to leave this function in use in org-export-generic.el.
> or should I replace it with a locally defined
> slightly-different-named version?
Either do that or advertize the need for the Apel package, or integrate
what set-alist does without even creating a function. Up to you :)
--
Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Orgmodeorg-export-generic gives an error
2009-07-22 23:33 ` Shelagh Manton
@ 2009-07-23 7:33 ` Bastien
0 siblings, 0 replies; 15+ messages in thread
From: Bastien @ 2009-07-23 7:33 UTC (permalink / raw
To: Shelagh Manton; +Cc: emacs-orgmode
Shelagh Manton <shelagh.manton@gmail.com> writes:
> On Wed, 22 Jul 2009 08:13:53 -0700, Wes Hardaker wrote:
>
>>>>>>> On Wed, 22 Jul 2009 01:59:12 +0200, Bastien
>>>>>>> <bastienguerry@googlemail.com> said:
>>
>> B> Those two functions come from alist.el which is included in Apel:
>>
>> So does that mean it's safe to leave the functions in use within
>> org-export generic, or should I replace it with a locally defined
>> slightly-different-named version?
>
> Perhaps just putting (require 'alist) in your file will be enough.
Yes. Or maybe check whether this feature is available or not with
(featurep 'alist), use it if it is, implement it if it's not.
--
Bastien
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Orgmodeorg-export-generic gives an error
2009-07-23 7:11 ` Bastien
@ 2009-07-23 14:31 ` James TD Smith
2009-08-10 15:42 ` Wes Hardaker
0 siblings, 1 reply; 15+ messages in thread
From: James TD Smith @ 2009-07-23 14:31 UTC (permalink / raw
To: Bastien; +Cc: Shelagh Manton, emacs-orgmode
On 2009-07-23 09:11:00(+0200), Bastien wrote:
> Wes Hardaker <wjhns209@hardakers.net> writes:
>
> >>>>>> On Wed, 22 Jul 2009 01:59:12 +0200, Bastien <bastienguerry@googlemail.com> said:
> >
> > B> Those two functions come from alist.el which is included in Apel:
> >
> > So does that mean it's safe to leave the functions in use within
> > org-export generic,
>
> AFAIK `set-alist' is not defined in vanilla Emacs. So no, it's not safe
> to leave this function in use in org-export-generic.el.
>
> > or should I replace it with a locally defined
> > slightly-different-named version?
>
> Either do that or advertize the need for the Apel package, or integrate
> what set-alist does without even creating a function. Up to you :)
You could use the aput function instead. which does the same thing. It's in
assoc.el which is included with both GNU Emacs and XEmacs.
,-----< C-h f aput RET >
| aput is a compiled Lisp function in `assoc.el'.
| (aput alist-symbol key &optional value)
|
| Inserts a key-value pair into an alist.
| The alist is referenced by alist-symbol. The key-value pair is made
| from key and optionally, value. Returns the altered alist or nil if
| ALIST is nil.
|
| If the key-value pair referenced by key can be found in the alist, and
| value is supplied non-nil, then the value of key will be set to value.
| If value is not supplied, or is nil, the key-value pair will not be
| modified, but will be moved to the head of the alist. If the key-value
| pair cannot be found in the alist, it will be inserted into the head
| of the alist (with value nil if value is nil or not supplied).
`----
James
--
|-<James TD Smith>-<email/ahktenzero@mohorovi.cc>-|
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Orgmodeorg-export-generic gives an error
2009-07-23 14:31 ` James TD Smith
@ 2009-08-10 15:42 ` Wes Hardaker
0 siblings, 0 replies; 15+ messages in thread
From: Wes Hardaker @ 2009-08-10 15:42 UTC (permalink / raw
To: James TD Smith; +Cc: Bastien, Shelagh Manton, emacs-orgmode
>>>>> On Thu, 23 Jul 2009 15:31:19 +0100, James TD Smith <ahktenzero@mohorovi.cc> said:
JTS> You could use the aput function instead. which does the same thing. It's in
JTS> assoc.el which is included with both GNU Emacs and XEmacs.
I think that sounds like the easiest approach. Thanks!
--
\ 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 ______________/
\__________________/
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-08-10 15:42 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15 18:05 org-export-generic gives an error 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
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.