emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bug in export due to org-list-automatic-rules
@ 2010-09-07 19:19 Daniel Clemente
  2010-09-07 22:09 ` Noorul Islam
  2010-09-08 14:36 ` [patch] " Nicolas Goaziou
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Clemente @ 2010-09-07 19:19 UTC (permalink / raw)
  To: org-mode Mailinglist; +Cc: n.goaziou


Hi.
  This change in org.el (commit fd16515b4a88d48362223b19c511c4973cdbc84c, 2010-08-07 18:31:54):

     '("^[ \t]*\\([-+*]\\|[0-9]+[.)][ \t]+\\(?:\\[@start:[0-9]+\\][ \t]*\\)?\\)\\(\\[[- X]\\]\\)"
 	      2 'org-checkbox prepend)
-		     (if org-provide-checkbox-statistics
+			    (if (cdr (assq 'checkbox org-list-automatic-rules))
 				       '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]"
						 (0 (org-get-checkbox-statistics-face) t)))


  made this command stop working:

$ emacs --batch --load=/w/org-mode/lisp/org.el --visit ~/org-httptest/io.org --funcall org-export-as-html-batch
File mode specification error: (void-variable org-list-automatic-rules)
Loading vc-git...
Exporting...
Symbol's value as variable is void: org-list-automatic-rules


-- Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug in export due to org-list-automatic-rules
  2010-09-07 19:19 bug in export due to org-list-automatic-rules Daniel Clemente
@ 2010-09-07 22:09 ` Noorul Islam
  2010-09-13  9:47   ` Daniel Clemente
  2010-09-08 14:36 ` [patch] " Nicolas Goaziou
  1 sibling, 1 reply; 4+ messages in thread
From: Noorul Islam @ 2010-09-07 22:09 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: n.goaziou, org-mode Mailinglist

On Wed, Sep 8, 2010 at 12:49 AM, Daniel Clemente <n142857@gmail.com> wrote:
>
> Hi.
>  This change in org.el (commit fd16515b4a88d48362223b19c511c4973cdbc84c, 2010-08-07 18:31:54):
>
>     '("^[ \t]*\\([-+*]\\|[0-9]+[.)][ \t]+\\(?:\\[@start:[0-9]+\\][ \t]*\\)?\\)\\(\\[[- X]\\]\\)"
>              2 'org-checkbox prepend)
> -                    (if org-provide-checkbox-statistics
> +                           (if (cdr (assq 'checkbox org-list-automatic-rules))
>                                       '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]"
>                                                 (0 (org-get-checkbox-statistics-face) t)))
>
>
>  made this command stop working:
>
> $ emacs --batch --load=/w/org-mode/lisp/org.el --visit ~/org-httptest/io.org --funcall org-export-as-html-batch
> File mode specification error: (void-variable org-list-automatic-rules)
> Loading vc-git...
> Exporting...
> Symbol's value as variable is void: org-list-automatic-rules
>

With the following setup

"Org-mode version 7.01trans (release_7.01h.475.g0bfd.dirty)"

"GNU Emacs 23.2.2 (i686-pc-linux-gnu)
 of 2010-06-08 on sajida"

The following command works. I am not sure whether we need to update the doc.

noorul@sajida:~/emacs/org-mode/lisp$ emacs --debug-init --batch
--visit=/tmp/temp.org --funcall org-export-as-html-batch
OVERVIEW
Exporting...
Exporting...
Exporting...
Saving file /tmp/temp.html...
Wrote /tmp/temp.html
HTML export done, pushed to kill ring and clipboard

But if I include load option, I get the following which is surprising for me.

noorul@sajida:~/emacs/org-mode/lisp$ emacs --batch
--load=/home/noorul/emacs/org-mode/lisp/org.el --visit=/tmp/temp.org
--funcall org-export-as-html-batch
Cannot open load file: org-entities

Thanks and Regards
Noorul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] bug in export due to org-list-automatic-rules
  2010-09-07 19:19 bug in export due to org-list-automatic-rules Daniel Clemente
  2010-09-07 22:09 ` Noorul Islam
@ 2010-09-08 14:36 ` Nicolas Goaziou
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2010-09-08 14:36 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: org-mode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]

Hello,
>>>>> Daniel Clemente writes:

> Hi. This change in org.el (commit
> fd16515b4a88d48362223b19c511c4973cdbc84c, 2010-08-07 18:31:54):

>      '("^[ \t]*\\([-+*]\\|[0-9]+[.)][ \t]+\\(?:\\[@start:[0-9]+\\][
> \t]*\\)?\\)\\(\\[[- X]\\]\\)" 2 'org-checkbox prepend) - (if
> org-provide-checkbox-statistics + (if (cdr (assq 'checkbox
> org-list-automatic-rules))
> '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]" (0
> (org-get-checkbox-statistics-face) t)))


>   made this command stop working:

> $ emacs --batch --load=/w/org-mode/lisp/org.el --visit
> ~/org-httptest/io.org --funcall org-export-as-html-batch File mode
> specification error: (void-variable org-list-automatic-rules)
> Loading vc-git... Exporting... Symbol's value as variable is void:
> org-list-automatic-rules

I'm not sure about this one. It's more a problem of require,
defcustom, and that kind of things than truly a list problem.

Just in case, I'm submitting this patch, but I'm pretty sure there's
something cleaner to do about it... but that still eludes me.

Regards,

-- Nicolas


[-- Attachment #2: 0002-Fix-void-variable-org-list-automatic-rules-error.patch --]
[-- Type: text/plain, Size: 1149 bytes --]

From a4f9d65882259348471a8b68890e7faea23d4a1d Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Wed, 8 Sep 2010 16:25:47 +0200
Subject: [PATCH 2/2] Fix void-variable org-list-automatic-rules error

* org.el (org-set-font-lock-defaults): as `org-list-automatic-rules'
  may be undefined under certain circumstances, first test if it
  exists before checking rules.
---
 lisp/org.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 10b4d3f..fb2075e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5471,7 +5471,8 @@ needs to be inserted at a specific position in the font-lock sequence.")
 	   ;; Checkboxes
 	   '("^[ \t]*\\(?:[-+*]\\|[0-9]+[.)]\\)[ \t]+\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\(\\[[- X]\\]\\)"
 	     1 'org-checkbox prepend)
-	   (if (cdr (assq 'checkbox org-list-automatic-rules))
+	   (if (and (fboundp 'org-list-automatic-rules)
+		    (cdr (assq 'checkbox org-list-automatic-rules)))
 	       '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]"
 		 (0 (org-get-checkbox-statistics-face) t)))
 	   ;; Description list items
-- 
1.7.2.3


[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: bug in export due to org-list-automatic-rules
  2010-09-07 22:09 ` Noorul Islam
@ 2010-09-13  9:47   ` Daniel Clemente
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Clemente @ 2010-09-13  9:47 UTC (permalink / raw)
  To: Noorul Islam; +Cc: n.goaziou, org-mode Mailinglist


The cause of these errors:

  If you use this:
emacs --batch --load=/w/org-mode/lisp/org.el --visit ~/some.org --funcall org-export-as-html-batch

  Then you haven't changed the load-path to your org's directory (/w/org-mode/ in my case). But there's a (require 'org-list) in org.el, thus Emacs will want to load it from the system installation of org. Which may fail.

  Solution:
emacs --batch --load=/w/org-mode/lisp/org.el --load=/w/org-mode/lisp/org-list.el --visit ~/some.org --funcall org-export-as-html-batch

  Anyway, Nicolas' patch makes it easier to export to HTML by simply loading 1 file (org.el), so I think it's useful.


-- Daniel

El Wed, 8 Sep 2010 03:39:20 +0530 Noorul Islam va escriure:
> 
> On Wed, Sep 8, 2010 at 12:49 AM, Daniel Clemente <n142857@gmail.com> wrote:
> >
> > Hi.
> >  This change in org.el (commit fd16515b4a88d48362223b19c511c4973cdbc84c, 2010-08-07 18:31:54):
> >
> >     '("^[ \t]*\\([-+*]\\|[0-9]+[.)][ \t]+\\(?:\\[@start:[0-9]+\\][ \t]*\\)?\\)\\(\\[[- X]\\]\\)"
> >              2 'org-checkbox prepend)
> > -                    (if org-provide-checkbox-statistics
> > +                           (if (cdr (assq 'checkbox org-list-automatic-rules))
> >                                       '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]"
> >                                                 (0 (org-get-checkbox-statistics-face) t)))
> >
> >
> >  made this command stop working:
> >
> > $ emacs --batch --load=/w/org-mode/lisp/org.el --visit ~/org-httptest/io.org --funcall org-export-as-html-batch
> > File mode specification error: (void-variable org-list-automatic-rules)
> > Loading vc-git...
> > Exporting...
> > Symbol's value as variable is void: org-list-automatic-rules
> >
> 
> With the following setup
> 
> "Org-mode version 7.01trans (release_7.01h.475.g0bfd.dirty)"
> 
> "GNU Emacs 23.2.2 (i686-pc-linux-gnu)
>  of 2010-06-08 on sajida"
> 
> The following command works. I am not sure whether we need to update the doc.
> 
> noorul@sajida:~/emacs/org-mode/lisp$ emacs --debug-init --batch
> --visit=/tmp/temp.org --funcall org-export-as-html-batch
> OVERVIEW
> Exporting...
> Exporting...
> Exporting...
> Saving file /tmp/temp.html...
> Wrote /tmp/temp.html
> HTML export done, pushed to kill ring and clipboard
> 
> But if I include load option, I get the following which is surprising for me.
> 
> noorul@sajida:~/emacs/org-mode/lisp$ emacs --batch
> --load=/home/noorul/emacs/org-mode/lisp/org.el --visit=/tmp/temp.org
> --funcall org-export-as-html-batch
> Cannot open load file: org-entities
> 
> Thanks and Regards
> Noorul

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-13  9:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07 19:19 bug in export due to org-list-automatic-rules Daniel Clemente
2010-09-07 22:09 ` Noorul Islam
2010-09-13  9:47   ` Daniel Clemente
2010-09-08 14:36 ` [patch] " Nicolas Goaziou

Code repositories for project(s) associated with this public 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).