emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: [bug] void-variable org-special-blocks-line when exporting to HTML
Date: Fri, 06 Apr 2012 10:28:49 +0200	[thread overview]
Message-ID: <807gxt8dry.fsf@somewhere.org> (raw)
In-Reply-To: 20120406010927.GD1023@smoon

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

  reply	other threads:[~2012-04-06  8:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=807gxt8dry.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).