emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] void-variable org-special-blocks-line when exporting to HTML
@ 2012-04-05  9:51 Sebastien Vauban
  2012-04-05 10:31 ` Bastien
  0 siblings, 1 reply; 8+ messages in thread
From: Sebastien Vauban @ 2012-04-05  9:51 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

On Org-mode version 7.8.08 (release_7.8.07.217.gcf3b.dirty),
I just experienced this when exporting to HTML:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (void-variable org-special-blocks-line)
  (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-special-blocks-line)
  (if (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-special-blocks-line) (progn (message "%s" (match-string 1)) (when (equal (match-string 2 org-special-blocks-line) "START") (org-close-par-maybe) (insert "\n<div class=\"" (match-string 1 org-special-blocks-line) "\">") (org-open-par)) (when (equal (match-string 2 org-special-blocks-line) "END") (org-close-par-maybe) (insert "\n</div>") (org-open-par)) (throw (quote nextline) nil)))
  (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-special-blocks-line) (message "%s" (match-string 1)) (when (equal (match-string 2 org-special-blocks-line) "START") (org-close-par-maybe) (insert "\n<div class=\"" (match-string 1 org-special-blocks-line) "\">") (org-open-par)) (when (equal (match-string 2 org-special-blocks-line) "END") (org-close-par-maybe) (insert "\n</div>") (org-open-par)) (throw (quote nextline) nil))
  org-special-blocks-convert-html-special-cookies()
  run-hooks(org-export-html-after-blockquotes-hook)
  [...]
  org-export-as-html(nil hidden)
  org-export-as-html-and-open(nil)
  call-interactively(org-export-as-html-and-open)
--8<---------------cut here---------------end--------------->8---

I must report that I don't have "special blocks" in the Org document,
though...

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [bug] void-variable org-special-blocks-line when exporting to HTML
  2012-04-05  9:51 [bug] void-variable org-special-blocks-line when exporting to HTML Sebastien Vauban
@ 2012-04-05 10:31 ` Bastien
  2012-04-06  1:09   ` Vladimir Lomov
  0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2012-04-05 10:31 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

Hi Sébastien,

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

> On Org-mode version 7.8.08 (release_7.8.07.217.gcf3b.dirty),
> I just experienced this when exporting to HTML:

I cannot reproduce this.  Please provide the minimal setup for
reproducing this bug -- thanks!

-- 
 Bastien

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

* Re: [bug] void-variable org-special-blocks-line when exporting to HTML
  2012-04-05 10:31 ` Bastien
@ 2012-04-06  1:09   ` Vladimir Lomov
  2012-04-06  8:28     ` Sebastien Vauban
  0 siblings, 1 reply; 8+ messages in thread
From: Vladimir Lomov @ 2012-04-06  1:09 UTC (permalink / raw)
  To: emacs-orgmode

Hello,
** Bastien [2012-04-05 12:31:37 +0200]:

> Hi Sébastien,

> "Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

>> On Org-mode version 7.8.08 (release_7.8.07.217.gcf3b.dirty),
>> I just experienced this when exporting to HTML:

> I cannot reproduce this.  Please provide the minimal setup for
> reproducing this bug -- thanks!

This sounds similar to
http://article.gmane.org/gmane.emacs.orgmode/54278

(sorry I don't know other way to refer to message in mailing list).

---
WBR, Vladimir Lomov

-- 
Extraordinary claims demand extraordinary proof.  There are many examples
of outsiders who eventually overthrew entrenched scientific orthodoxies,
but they prevailed with irrefutable data.  More often, egregious findings
that contradict well-established research turn out to be artifacts.  I have
argued that accepting psychic powers, reincarnation, "cosmic conciousness,"
and the like, would entail fundamental revisions of the foundations of
neuroscience.  Before abandoning materialist theories of mind that have paid
handsome dividends, we should insist on better evidence for psi phenomena
than presently exists, especially when neurology and psychology themselves
offer more plausible alternatives.
		-- Barry L. Beyerstein, "The Brain and Conciousness:
		   Implications for Psi Phenomena".

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

* Re: [bug] void-variable org-special-blocks-line when exporting to HTML
  2012-04-06  1:09   ` Vladimir Lomov
@ 2012-04-06  8:28     ` Sebastien Vauban
  2012-04-06  9:04       ` Bastien
  0 siblings, 1 reply; 8+ messages in thread
From: Sebastien Vauban @ 2012-04-06  8:28 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello Vladimir and Bastien,

Vladimir Lomov wrote:
>> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>
>>> On Org-mode version 7.8.08 (release_7.8.07.217.gcf3b.dirty),
>>> I just experienced this when exporting to HTML:
>
>> I cannot reproduce this.  Please provide the minimal setup for
>> reproducing this bug -- thanks!

--8<---------------cut here---------------start------------->8---
#+TITLE:     Worked hours
#+AUTHOR:    Seb Vauban

* Test C-c C-e h

Does this work?  No...
--8<---------------cut here---------------end--------------->8---

results in the following backtrace:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (void-variable org-special-blocks-line)
  (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-special-blocks-line)
  (if (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-special-blocks-line) (progn (message "%s" (match-string 1)) (when (equal (match-string 2 org-special-blocks-line) "START") (org-close-par-maybe) (insert "\n<div class=\"" (match-string 1 org-special-blocks-line) "\">") (org-open-par)) (when (equal (match-string 2 org-special-blocks-line) "END") (org-close-par-maybe) (insert "\n</div>") (org-open-par)) (throw (quote nextline) nil)))
  (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-special-blocks-line) (message "%s" (match-string 1)) (when (equal (match-string 2 org-special-blocks-line) "START") (org-close-par-maybe) (insert "\n<div class=\"" (match-string 1 org-special-blocks-line) "\">") (org-open-par)) (when (equal (match-string 2 org-special-blocks-line) "END") (org-close-par-maybe) (insert "\n</div>") (org-open-par)) (throw (quote nextline) nil))
  org-special-blocks-convert-html-special-cookies()
  run-hooks(org-export-html-after-blockquotes-hook)
  (catch (quote nextline) (when (and inquote (string-match org-outline-regexp-bol line)) (insert "</pre>\n") (org-open-par) (setq inquote nil)) (when inquote (insert (org-html-protect line) "\n") (throw (quote nextline) nil)) (when (and org-export-with-fixed-width (string-match "^[ 	]*:\\(\\([ 	]\\|$\\)\\(.*\\)\\)" line)) (when (not infixed) (setq infixed t) (org-close-par-maybe) (insert "<pre class=\"example\">\n")) (insert (org-html-protect (match-string 3 line)) "\n") (when (or (not lines) (not (string-match "^[ 	]*:\\(\\([ 	]\\|$\\)\\(.*\\)\\)" (car lines)))) (setq infixed nil) (insert "</pre>\n") (org-open-par)) (throw (quote nextline) nil)) (when (and (get-text-property 0 (quote org-protected) line) (not (< (or (next-single-property-change 0 (quote org-protected) line) 10000) (length line)))) (let (par (ind (get-text-property 0 (quote original-indentation) line))) (when (re-search-backward "\\(<p>\\)\\([ 	.\n]*\\)\\=" (- (point) 100) t) (setq par (match-string 1)) (replace-match "\\2\n")) (insert line "\n") (while (and lines (or (= (length ...) 0) (not ind) (equal ind (get-text-property 0 ... ...))) (or (= (length ...) 0) (get-text-property 0 (quote org-protected) (car lines)))) (insert (pop lines) "\n")) (and par (insert "<p>\n"))) (throw (quote nextline) nil)) (when (equal "ORG-BLOCKQUOTE-START" line) (org-close-par-maybe) (insert "<blockquote>\n") (org-open-par) (throw (quote nextline) nil)) (when (equal "ORG-BLOCKQUOTE-END" line) (org-close-par-maybe) (insert "\n</blockquote>\n") (org-open-par) (throw (quote nextline) nil)) (when (equal "ORG-VERSE-START" line) (org-close-par-maybe) (insert "\n<p class=\"verse\">\n") (setq org-par-open t) (setq inverse t) (throw (quote nextline) nil)) (when (equal "ORG-VERSE-END" line) (insert "</p>\n") (setq org-par-open nil) (org-open-par) (setq inverse nil) (throw (quote nextline) nil)) (when (equal "ORG-CENTER-START" line) (org-close-par-maybe) (insert "\n<div style=\"text-align: center\">") (org-open-par) (throw (quote nextline) nil)) (when (equal "ORG-CENTER-END" line) (org-close-par-maybe) (insert "\n</div>") (org-open-par) (throw (quote nextline) nil)) (run-hooks (quote org-export-html-after-blockquotes-hook)) (when inverse (let ((i (org-get-string-indentation line))) (if (> i 0) (setq line (concat (mapconcat (quote identity) (make-list ... "\\nbsp") "") " " (org-trim line)))) (unless (string-match "\\\\\\\\[ 	]*$" line) (setq line (concat line "\\\\"))))) (setq start 0) (while (string-match "<<<?\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[ 	]*\n?" line start) (cond ((get-text-property (match-beginning 1) (quote org-protected) line) (setq start (match-end 1))) ((match-end 2) (setq line (replace-match (format "@<a name=\"%s\" id=\"%s\">@</a>" (org-solidify-link-text ...) (org-solidify-link-text ...)) t t line))) ((and org-export-with-toc (equal (string-to-char line) 42)) (setq line (replace-match (concat "@<span class=\"target\">" (match-string 1 line) "@</span> ") t t line))) (t (setq line (replace-match (concat "@<a name=\"" (org-solidify-link-text ...) "\" class=\"target\">" (match-string 1 line) "@</a> ") t t line))))) (setq line (org-html-handle-time-stamps line)) (or (string-match org-table-hline-regexp line) (string-match "^[ 	]*\\([+]-\\||[ ]\\)[-+ |]*[+|][ 	]*$" line) (setq line (org-html-expand line))) (setq line (org-html-handle-links line opt-plist)) (if (and org-todo-line-regexp (string-match org-todo-line-regexp line) (match-beginning 2)) (setq line (concat (substring line 0 (match-beginning 2)) "<span class=\"" (if (member (match-string 2 line) org-done-keywords) "done" "todo") " " (org-export-html-get-todo-kwd-class-name (match-string 2 line)) "\">" (match-string 2 line) "</span>" (substring line (match-end 2))))) (when org-export-with-footnotes (setq start 0) (while (string-match "\\([^* 	].*?\\)\\[\\([0-9]+\\)\\]" line start) (if (or (get-text-property (match-beginning 2) (quote org-protected) line) (not (get-text-property (match-beginning 2) (quote org-footnote) line))) (setq start (match-end 2)) (let ((n (match-string 2 line)) extra a) (if (setq a (assoc n footref-seen)) (progn (setcdr a ...) (setq extra ...)) (setq extra "") (push (cons n 1) footref-seen)) (setq line (replace-match (concat ... ...) t t line)))))) (cond ((string-match "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ 	]*$" line) (setq level (org-tr-level (- (match-end 1) (match-beginning 1) level-offset)) txt (match-string 2 line)) (if (string-match quote-re0 txt) (setq txt (replace-match "" t t txt))) (if (<= level (max umax umax-toc)) (setq head-count (+ head-count 1))) (setq first-heading-pos (or first-heading-pos (point))) (org-html-level-start level txt umax (and org-export-with-toc (<= level umax)) head-count opt-plist) (when (string-match quote-re line) (org-close-par-maybe) (insert "<pre>") (setq inquote t))) ((and org-export-with-tables (string-match "^\\([ 	]*\\)\\(|\\|\\+-+\\+\\)" line)) (when (not table-open) (setq table-open t table-buffer nil table-orig-buffer nil)) (setq table-buffer (cons line table-buffer) table-orig-buffer (cons origline table-orig-buffer)) (when (or (not lines) (not (string-match "^\\([ 	]*\\)\\(|\\|\\+-+\\+\\)" (car lines)))) (setq table-open nil table-buffer (nreverse table-buffer) table-orig-buffer (nreverse table-orig-buffer)) (org-close-par-maybe) (insert (org-format-table-html table-buffer table-orig-buffer)))) (t (when (get-text-property 0 (quote list-item) line) (setq line (org-html-export-list-line line (get-text-property 0 (quote list-item) line) (get-text-property 0 (quote list-struct) line) (get-text-property 0 (quote list-prevs) line)))) (when (string-match "^[ 	]*-\\{5,\\}[ 	]*$" line) (if org-par-open (insert "\n</p>\n<hr/>\n<p>\n") (insert "\n<hr/>\n")) (throw (quote nextline) nil)) (if (string-match "^ [-+*]-\\|^[ 	]*$" line) (org-open-par)) (when org-export-with-footnotes (when (and (boundp (quote footnote-section-tag-regexp)) (string-match (concat "^" footnote-section-tag-regexp) line)) (throw (quote nextline) nil)) (when (string-match "^[ 	]*\\[\\([0-9]+\\)\\]" line) (org-close-par-maybe) (let ((n ...)) (setq org-par-open t line (replace-match ... t t line))))) (cond ((string-match "\\\\\\\\[ 	]*$" line) (setq line (replace-match "<br/>" t t line))) (org-export-preserve-breaks (setq line (concat line "<br/>")))) (let ((start 0)) (while (and org-par-open (string-match "\\\\par\\>" line start)) (if (not (get-text-property ... ... line)) (setq line (replace-match "</p ><p >" t t line))) (setq start (match-end 0)))) (insert line "\n"))))
  ...
  org-export-as-html(nil)
  call-interactively(org-export-as-html)
  ...
  org-export(nil)
  call-interactively(org-export nil nil)
--8<---------------cut here---------------end--------------->8---

In other words, my HTML export is completely broken for any file.

I'm totally in the blue -- maybe a sign that I need holidays?  ;-)

Version info:

- GNU Emacs 24.0.94.1 (i386-mingw-nt5.1.2600) of 2012-03-19 on MARVIN

- release_7.8.07-214-g19e14 = from now!
  Org-mode version 7.8.08 (release_7.8.07.214.g19e14)

  BTW, is this "normal" to see 7.8.08 and have 07 in the tag?

> This sounds similar to
> http://article.gmane.org/gmane.emacs.orgmode/54278

Adding the following in my config file:

    (add-to-list 'org-modules 'org-special-blocks))

Restarting Emacs, and re-exporting the above ECM did not succeed either.
Thanks anyway for the potential tip...

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [bug] void-variable org-special-blocks-line when exporting to HTML
  2012-04-06  8:28     ` Sebastien Vauban
@ 2012-04-06  9:04       ` Bastien
  2012-04-06 10:04         ` Sebastien Vauban
  0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2012-04-06  9:04 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

Hi Sébastien,

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

> In other words, my HTML export is completely broken for any file.

It should be fixed now. 

I hope this was the last problem in this 
yeahhh-let's-fix-new-Emacs-warning-and-replace-them-with-plain-bugs-instead
saga...

> I'm totally in the blue -- maybe a sign that I need holidays?  ;-)

A sign that *I* need holidays!

:)

-- 
 Bastien

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

* Re: [bug] void-variable org-special-blocks-line when exporting to HTML
  2012-04-06  9:04       ` Bastien
@ 2012-04-06 10:04         ` Sebastien Vauban
  2012-04-09 11:07           ` Bastien
  0 siblings, 1 reply; 8+ messages in thread
From: Sebastien Vauban @ 2012-04-06 10:04 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bastien,

Bastien wrote:
> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>
>> In other words, my HTML export is completely broken for any file.
>
> It should be fixed now.

It is!  Thanks a lot.

> I hope this was the last problem in this
> yeahhh-let's-fix-new-Emacs-warning-and-replace-them-with-plain-bugs-instead
> saga...
>
>> I'm totally in the blue -- maybe a sign that I need holidays?  ;-)
>
> A sign that *I* need holidays!

I'm not out of the blue yet... I still can't understand why:

- you were unable to reproduce it?
  What's the difference between you and me? ;-)
  I mean why does Org behave differently between us?

- nobody else seemed hit by this?
  I'm surprised by the absence of reactions while HTML export was completely
  failing for a couple of days. Once again, why only me?

- this wasn't trapped by the ERT test suite?
  There are a lot of HTML exports done in the tests. Why did they succeed?

Have you hints on this?

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [bug] void-variable org-special-blocks-line when exporting to HTML
  2012-04-06 10:04         ` Sebastien Vauban
@ 2012-04-09 11:07           ` Bastien
  2012-04-18 15:18             ` Sebastien Vauban
  0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2012-04-09 11:07 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

Hi Sébastien,

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

> I'm not out of the blue yet... I still can't understand why:
>
> - you were unable to reproduce it?
>   What's the difference between you and me? ;-)
>   I mean why does Org behave differently between us?
>
> - nobody else seemed hit by this?
>   I'm surprised by the absence of reactions while HTML export was completely
>   failing for a couple of days. Once again, why only me?
>
> - this wasn't trapped by the ERT test suite?
>   There are a lot of HTML exports done in the tests. Why did they succeed?
>
> Have you hints on this?

I guess that's because not everybody uses org-special-blocks.el as a
module.  The ERT suite doesn't make any test against this.

Best,

-- 
 Bastien

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

* Re: [bug] void-variable org-special-blocks-line when exporting to HTML
  2012-04-09 11:07           ` Bastien
@ 2012-04-18 15:18             ` Sebastien Vauban
  0 siblings, 0 replies; 8+ messages in thread
From: Sebastien Vauban @ 2012-04-18 15:18 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bastien,

Bastien wrote:
> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>
>> I'm not out of the blue yet... I still can't understand why:
>>
>> - you were unable to reproduce it?
>>   What's the difference between you and me? ;-)
>>   I mean why does Org behave differently between us?
>>
>> - nobody else seemed hit by this?
>>   I'm surprised by the absence of reactions while HTML export was completely
>>   failing for a couple of days. Once again, why only me?
>>
>> - this wasn't trapped by the ERT test suite?
>>   There are a lot of HTML exports done in the tests. Why did they succeed?
>>
>> Have you hints on this?
>
> I guess that's because not everybody uses org-special-blocks.el as a
> module.

By "using org-special-blocks.el as a module", if you mean "having a line such
as":

    (add-to-list 'org-modules 'org-special-blocks)

I did not have one either.

I just had:

    (require 'org-special-blocks)

But, IIUC, that's more or less equivalent:

- being in `org-modules' means that the package will be required[1] many times
  before trying to do different operations (such as inserting a link, etc.),

  and that there is a protection mechanism in case the package can't be loaded

- being explicitly required in my .emacs does only try to load it once.

Apart from that, I don't see differences.

> The ERT suite doesn't make any test against this.

Well against exporting HTML. But I did not realize that I was more or less the
only one in the world ;-) to load `org-special-blocks'[2] while exporting to HTML.

This must explain that. Case is closed.

Best regards,
  Seb

Footnotes:

[1] Though, really only loaded once.

[2] And I must admit I maybe have used it once or twice, not more... Though, I
still find it an interesting feature.

-- 
Sebastien Vauban

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

end of thread, other threads:[~2012-04-18 15:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05  9:51 [bug] void-variable org-special-blocks-line when exporting to HTML Sebastien Vauban
2012-04-05 10:31 ` Bastien
2012-04-06  1:09   ` Vladimir Lomov
2012-04-06  8:28     ` Sebastien Vauban
2012-04-06  9:04       ` Bastien
2012-04-06 10:04         ` Sebastien Vauban
2012-04-09 11:07           ` Bastien
2012-04-18 15:18             ` Sebastien Vauban

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).