From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: [bug] void-variable org-special-blocks-line when exporting to HTML Date: Fri, 06 Apr 2012 10:28:49 +0200 Message-ID: <807gxt8dry.fsf@somewhere.org> References: <801uo2ld57.fsf@somewhere.org> <87r4w2eagm.fsf@gnu.org> <20120406010927.GD1023@smoon> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello Vladimir and Bastien, Vladimir Lomov wrote: >> "Sebastien Vauban" 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-l= ine) (progn (message "%s" (match-string 1)) (when (equal (match-string 2 or= g-special-blocks-line) "START") (org-close-par-maybe) (insert "\n
") (org-open-par)) (whe= n (equal (match-string 2 org-special-blocks-line) "END") (org-close-par-may= be) (insert "\n
") (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-spe= cial-blocks-line) "START") (org-close-par-maybe) (insert "\n
") (org-open-par)) (when (eq= ual (match-string 2 org-special-blocks-line) "END") (org-close-par-maybe) (= insert "\n
") (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-rege= xp-bol line)) (insert "\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 "
\n")) (insert (org-html-protect (=
match-string 3 line)) "\n") (when (or (not lines) (not (string-match "^[ 	]=
*:\\(\\([ 	]\\|$\\)\\(.*\\)\\)" (car lines)))) (setq infixed nil) (insert "=
\n") (org-open-par)) (throw (quote nextline) nil)) (when (and (get-te= xt-property 0 (quote org-protected) line) (not (< (or (next-single-property= -change 0 (quote org-protected) line) 10000) (length line)))) (let (par (in= d (get-text-property 0 (quote original-indentation) line))) (when (re-searc= h-backward "\\(

\\)\\([ .\n]*\\)\\=3D" (- (point) 100) t) (setq par (mat= ch-string 1)) (replace-match "\\2\n")) (insert line "\n") (while (and lines= (or (=3D (length ...) 0) (not ind) (equal ind (get-text-property 0 ... ...= ))) (or (=3D (length ...) 0) (get-text-property 0 (quote org-protected) (ca= r lines)))) (insert (pop lines) "\n")) (and par (insert "

\n"))) (throw (= quote nextline) nil)) (when (equal "ORG-BLOCKQUOTE-START" line) (org-close-= par-maybe) (insert "

\n") (org-open-par) (throw (quote nextline)= nil)) (when (equal "ORG-BLOCKQUOTE-END" line) (org-close-par-maybe) (inser= t "\n
\n") (org-open-par) (throw (quote nextline) nil)) (when (= equal "ORG-VERSE-START" line) (org-close-par-maybe) (insert "\n

\n") (setq org-par-open t) (setq inverse t) (throw (quote nextline= ) nil)) (when (equal "ORG-VERSE-END" line) (insert "

\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
") (org-open-par) (throw (quote nextline) ni= l)) (when (equal "ORG-CENTER-END" line) (org-close-par-maybe) (insert "\n") (org-open-par) (throw (quote nextline) nil)) (run-hooks (quote org-e= xport-html-after-blockquotes-hook)) (when inverse (let ((i (org-get-string-= indentation line))) (if (> i 0) (setq line (concat (mapconcat (quote identi= ty) (make-list ... "\\nbsp") "") " " (org-trim line)))) (unless (string-mat= ch "\\\\\\\\[ ]*$" line) (setq line (concat line "\\\\"))))) (setq start 0= ) (while (string-match "<<]*\\)>>>?\\((INVISIBLE)\\)?[ ]*\n?" lin= e start) (cond ((get-text-property (match-beginning 1) (quote org-protected= ) line) (setq start (match-end 1))) ((match-end 2) (setq line (replace-matc= h (format "@@" (org-solidify-link-text ...= ) (org-solidify-link-text ...)) t t line))) ((and org-export-with-toc (equa= l (string-to-char line) 42)) (setq line (replace-match (concat "@" (match-string 1 line) "@ ") t t line))) (t (setq li= ne (replace-match (concat "@" (match-string 1 line) "@ ") t t line))))) (setq li= ne (org-html-handle-time-stamps line)) (or (string-match org-table-hline-re= gexp line) (string-match "^[ ]*\\([+]-\\||[ ]\\)[-+ |]*[+|][ ]*$" line) (= setq line (org-html-expand line))) (setq line (org-html-handle-links line o= pt-plist)) (if (and org-todo-line-regexp (string-match org-todo-line-regexp= line) (match-beginning 2)) (setq line (concat (substring line 0 (match-beg= inning 2)) "" (match-string 2 line) "" (substring line (matc= h-end 2))))) (when org-export-with-footnotes (setq start 0) (while (string-= match "\\([^* ].*?\\)\\[\\([0-9]+\\)\\]" line start) (if (or (get-text-pro= perty (match-beginning 2) (quote org-protected) line) (not (get-text-proper= ty (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-s= een)) (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 (<=3D 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 (<=3D level u= max)) head-count opt-plist) (when (string-match quote-re line) (org-close-p= ar-maybe) (insert "
") (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-b=
uffer (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-bu=
ffer) 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-l=
ist-line line (get-text-property 0 (quote list-item) line) (get-text-proper=
ty 0 (quote list-struct) line) (get-text-property 0 (quote list-prevs) line=
)))) (when (string-match "^[ 	]*-\\{5,\\}[ 	]*$" line) (if org-par-open (in=
sert "\n

\n
\n

\n") (insert "\n


\n")) (throw (quote nextline) = nil)) (if (string-match "^ [-+*]-\\|^[ ]*$" line) (org-open-par)) (when or= g-export-with-footnotes (when (and (boundp (quote footnote-section-tag-rege= xp)) (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-mat= ch ... t t line))))) (cond ((string-match "\\\\\\\\[ ]*$" line) (setq line= (replace-match "
" t t line))) (org-export-preserve-breaks (setq line = (concat line "
")))) (let ((start 0)) (while (and org-par-open (string-= match "\\\\par\\>" line start)) (if (not (get-text-property ... ... line)) = (setq line (replace-match "

" 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? =C2=A0;-) 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 =3D 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 --=20 Sebastien Vauban