emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Future Worg publishing failure :)


From: Nick Dokos
Subject: [O] Future Worg publishing failure :)
Date: Fri, 18 Mar 2011 03:35:01 -0400

org-glossary.org contains the following text at one point:

... The number of days is
14.

Current org code takes the 14. as an item in a numbered list.  When
exporting to HTML, this causes an error in org-html-export-list-line -
hence the subject line. It's not a problem right now but it will be when
orgmode.org gets the updated version. I reformatted the line to avoid
the awkward newline, so the future publishing failure will not
happen. I'll let Nicolas worry about what should be done about the
error.

Nick

Org-mode version 7.5 (release_7.5.77.g74268.dirty)

Here's the backtrace of the error:

Debugger entered--Lisp error: (args-out-of-range #("14." 0 3 (fontified t 
list-item 11895 list-struct ((11895 0 "14." nil nil nil 11899)) list-prevs 
((11895)) list-context nil)) 9 10)
  match-string(3 #("14." 0 3 (fontified t list-item 11895 list-struct ((11895 0 
"14." nil nil nil 11899)) list-prevs ((11895)) list-context nil)))
  (let* ((checkbox (match-string 3 line)) (desc-tag (or (match-string 4 line) 
"???")) (body (or (match-string 5 line) "")) (list-beg (org-list-get-list-begin 
pos struct prevs)) (firstp (= list-beg pos)) (type (funcall get-type list-beg 
struct prevs)) (counter (let ((count-tmp (org-list-get-counter pos struct))) 
(cond ((not count-tmp) nil) ((string-match "[A-Za-z]" count-tmp) (- 
(string-to-char ...) 64)) ((string-match "[0-9]+" count-tmp) count-tmp))))) 
(when firstp (org-close-par-maybe) (insert (format "<%sl>\n" type))) (insert 
(cond ((equal type "d") (format "<dt>%s</dt><dd>" desc-tag)) ((and (equal type 
"o") counter) (format "<li value=\"%s\">" counter)) (t "<li>"))) (when checkbox 
(setq body (concat (cond ((string-match "X" checkbox) "<code>[X]</code> ") 
((string-match " " checkbox) "<code>[&nbsp;]</code> ") (t "<code>[-]</code> ")) 
body))) body)
  (cond ((assq pos struct) (string-match (concat "[     ]*\\(\\S-+[     ]+\\)" 
"\\(?:address@hidden(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\]\\)?" "\\(?:\\(\\[[ 
X-]\\]\\)[        ]+\\)?" "\\(?:\\(.*\\)[         ]+::[   ]+\\)?" "\\(.*\\)") 
line) (let* ((checkbox (match-string 3 line)) (desc-tag (or (match-string 4 
line) "???")) (body (or (match-string 5 line) "")) (list-beg 
(org-list-get-list-begin pos struct prevs)) (firstp (= list-beg pos)) (type 
(funcall get-type list-beg struct prevs)) (counter (let ((count-tmp ...)) (cond 
(... nil) (... ...) (... count-tmp))))) (when firstp (org-close-par-maybe) 
(insert (format "<%sl>\n" type))) (insert (cond ((equal type "d") (format 
"<dt>%s</dt><dd>" desc-tag)) ((and (equal type "o") counter) (format "<li 
value=\"%s\">" counter)) (t "<li>"))) (when checkbox (setq body (concat (cond 
(... "<code>[X]</code> ") (... "<code>[&nbsp;]</code> ") (t "<code>[-]</code> 
")) body))) body)) ((equal "ORG-LIST-END-MARKER" line) (throw (quote nextline) 
nil)) (t line))
  (let* ((get-type (function (lambda (pos struct prevs) (let ((type ...)) (cond 
(... "o") (... "d") (t "u")))))) (get-closings (function (lambda (pos) (let 
(out) (catch (quote exit) (mapc ... struct)) out))))) (mapc (lambda (e) (let* 
((lastp (= (org-list-get-last-item e struct prevs) e)) (first-item 
(org-list-get-list-begin e struct prevs)) (type (funcall get-type first-item 
struct prevs))) (org-close-par-maybe) (org-close-li type) (when lastp (insert 
(format "</%sl>\n" type)) (org-open-par)))) (funcall get-closings pos)) (cond 
((assq pos struct) (string-match (concat "[       ]*\\(\\S-+[     ]+\\)" 
"\\(?:address@hidden(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\]\\)?" "\\(?:\\(\\[[ 
X-]\\]\\)[        ]+\\)?" "\\(?:\\(.*\\)[         ]+::[   ]+\\)?" "\\(.*\\)") 
line) (let* ((checkbox (match-string 3 line)) (desc-tag (or (match-string 4 
line) "???")) (body (or (match-string 5 line) "")) (list-beg 
(org-list-get-list-begin pos struct prevs)) (firstp (= list-beg pos)) (type 
(funcall get-type list-beg struct prevs)) (
 counter (let (...) (cond ... ... ...)))) (when firstp (org-close-par-maybe) 
(insert (format "<%sl>\n" type))) (insert (cond ((equal type "d") (format 
"<dt>%s</dt><dd>" desc-tag)) ((and ... counter) (format "<li value=\"%s\">" 
counter)) (t "<li>"))) (when checkbox (setq body (concat (cond ... ... ...) 
body))) body)) ((equal "ORG-LIST-END-MARKER" line) (throw (quote nextline) 
nil)) (t line)))
  org-html-export-list-line(#("14." 0 3 (fontified t list-item 11895 
list-struct ((11895 0 "14." nil nil nil 11899)) list-prevs ((11895)) 
list-context nil)) 11895 ((11895 0 "14." nil nil nil 11899)) ((11895)))
  (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)))
  (progn (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))))
  (if (get-text-property 0 (quote list-item) line) (progn (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 (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))))
  (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) (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-or
 ig-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 
(match-string 1 line))) (setq org-par-open t line (replace-match (format ... n 
n n) 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 (match-beginning 0) (quote org-protected) 
line)) (setq line (replace-match "</p ><p >" t t line))) (setq start (match-end 
0)))) (insert line "\n")))
  (catch (quote nextline) (when (and inquote (string-match "^\\*+ " 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 li
 ne (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) (setq line (org-html-expand line))) (setq line (org-html-handle-links 
line opt-plist)) (if (and (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") " " (match-string 2 line) "\"> " 
(org-export-html-get-todo-kwd-class-name (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 
(get-text-property (match-beginning 2) (quote org-protected) line) (setq start 
(match-end 2)) (let ((n (match-string 2 line)) extra a) (if (setq a (assoc n 
footref-seen)) (progn (setcdr a ...) (s
 etq extra ...)) (setq extra "") (push (cons n 1) footref-seen)) (setq line 
(replace-match (format ... ... n extra n n) 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) (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-m
 atch ... 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"))))
  (while (setq line (pop lines) origline line) (catch (quote nextline) (when 
(and inquote (string-match "^\\*+ " 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 ... 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-str
 ing 1)) (replace-match "\\2\n")) (insert line "\n") (while (and lines (or (= 
... 0) (not ind) (equal ind ...)) (or (= ... 0) (get-text-property 0 ... ...))) 
(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-C
 ENTER-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 
... ... "") " " (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>" ... ...) t t line))) ((and org-export-with-toc 
(equal (string-to-char line) 42)) (setq line (replace-match (concat "@<span 
class=\"target\">" ... "@</span> ") t t line))) (t (setq line (replace-match 
(concat "@<a name=\"" ... "\" class=\"target\">" ... "@</a> ") t t line))))) 
(setq line (org-html-handle-time-stamps line)) (or
  (string-match org-table-hline-regexp line) (setq line (org-html-expand 
line))) (setq line (org-html-handle-links line opt-plist)) (if (and 
(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") " " (match-string 2 
line) "\"> " (org-export-html-get-todo-kwd-class-name (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 (get-text-property (match-beginning 2) (quote org-protected) 
line) (setq start (match-end 2)) (let ((n ...) extra a) (if (setq a ...) (progn 
... ...) (setq extra "") (push ... footref-seen)) (setq line (replace-match ... 
t t line)))))) (cond ((string-match "^\\(\\*+\\)[       ]+\\(.*\\)" line) (setq 
level (org-tr-level (- (match-end 1) (match-beginning 1) level-offset)) txt 
(match-stri
 ng 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) (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 "^\\([     ]*\\)\\(|\\|\\+-+\\+\\)" ...))) (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) (s
 etq line (org-html-export-list-line line (get-text-property 0 ... line) 
(get-text-property 0 ... line) (get-text-property 0 ... 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 ...) (string-match ... line)) 
(throw (quote nextline) nil)) (when (string-match "^[       
]*\\[\\([0-9]+\\)\\]" line) (org-close-par-maybe) (let (...) (setq org-par-open 
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 ...) (setq line ...)) (setq 
start (match-end 0)))) (insert line "\n")))))
  (let ((case-fold-search nil) (org-odd-levels-only odd)) (mapc (lambda (x) 
(set (make-local-variable (nth 2 x)) (plist-get opt-plist (car x)))) 
org-export-plist-vars) (setq umax (if arg (prefix-numeric-value arg) 
org-export-headline-levels)) (setq umax-toc (if (integerp org-export-with-toc) 
(min org-export-with-toc umax) umax)) (unless body-only (insert (format 
"%s\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n               
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>\n<html 
xmlns=\"http://www.w3.org/1999/xhtml\"\nlang=\"%s\"; 
xml:lang=\"%s\">\n<head>\n<title>%s</title>\n<meta http-equiv=\"Content-Type\" 
content=\"text/html;charset=%s\"/>\n<meta name=\"generator\" 
content=\"Org-mode\"/>\n<meta name=\"generated\" content=\"%s\"/>\n<meta 
name=\"author\" content=\"%s\"/>\n<meta name=\"description\" 
content=\"%s\"/>\n<meta name=\"keywords\" 
content=\"%s\"/>\n%s\n%s\n</head>\n<body>\n<div id=\"content\">\n%s\n" (format 
(or (and (stringp org-export-html-xm
 l-declaration) org-export-html-xml-declaration) (cdr (assoc html-extension 
org-export-html-xml-declaration)) (cdr (assoc "html" 
org-export-html-xml-declaration)) "") (or charset "iso-8859-1")) language 
language title (or charset "iso-8859-1") date author description keywords style 
mathjax (if (or link-up link-home) (concat (format 
org-export-html-home/up-format (or link-up link-home) (or link-home link-up)) 
"\n") ""))) (when (plist-get opt-plist :html-preamble) (let ((html-pre 
(plist-get opt-plist :html-preamble))) (cond ((stringp html-pre) (insert 
(format-spec html-pre ...))) ((functionp html-pre) (funcall html-pre 
opt-plist)) (t (insert (format-spec ... ...))))))) (if (and org-export-with-toc 
(not body-only)) (progn (push (format "<h%d>%s</h%d>\n" 
org-export-html-toplevel-hlevel (nth 3 lang-words) 
org-export-html-toplevel-hlevel) thetoc) (push "<div 
id=\"text-table-of-contents\">\n" thetoc) (push "<ul>\n<li>" thetoc) (setq 
lines (mapcar (quote (lambda (line) (if ... ...) l
 ine)) lines)) (while (> org-last-level (1- org-min-level)) (setq 
org-last-level (1- org-last-level)) (push "</li>\n</ul>\n" thetoc)) (push 
"</div>\n" thetoc) (setq thetoc (if have-headings (nreverse thetoc) nil)))) 
(setq head-count 0) (org-init-section-numbers) (org-open-par) (while (setq line 
(pop lines) origline line) (catch (quote nextline) (when (and inquote 
(string-match "^\\*+ " 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 "^[        ]*:\\(\\([      ]\\|$\\)\\(.*\\)\\)" ...))) (setq 
infixed nil) (insert "</pre>\n") (org-open-par)) (throw (quote nextline) nil)) 
(when (and (get-text-property 0 (quo
 te org-protected) line) (not (< (or ... 10000) (length line)))) (let (par (ind 
(get-text-property 0 ... line))) (when (re-search-backward "\\(<p>\\)\\([       
\n]*\\)\\=" (- ... 100) t) (setq par (match-string 1)) (replace-match "\\2\n")) 
(insert line "\n") (while (and lines (or ... ... ...) (or ... ...)) (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-S
 TART" 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 ... " " 
...))) (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 ... t t line))) ((and 
org-export-with-toc (equal ... 42)) (setq line (replace-match ... t t line))) 
(t (setq line (replace-match ... t t line))))) (setq line 
(org-html-handle-time-stamps line)) (or (string-match org-table-hline-regexp 
line) (setq line (o
 rg-html-expand line))) (setq line (org-html-handle-links line opt-plist)) (if 
(and (string-match org-todo-line-regexp line) (match-beginning 2)) (setq line 
(concat (substring line 0 (match-beginning 2)) "<span class=\"" (if (member ... 
org-done-keywords) "done" "todo") " " (match-string 2 line) "\"> " 
(org-export-html-get-todo-kwd-class-name (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 (get-text-property (match-beginning 2) (quote org-protected) line) (setq 
start (match-end 2)) (let (... extra a) (if ... ... ... ...) (setq line 
...))))) (cond ((string-match "^\\(\\*+\\)[         ]+\\(.*\\)" line) (setq 
level (org-tr-level (- ... ... 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) (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 ...)) (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 ... ... ...))) 
(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 ... ...) (throw ... nil)) (when (string-match "^[         
]*\\[\\([0-9]+\\)\\]" line) (org-close-par-maybe) (let ... ...))) (cond 
((string-match "\\\\\\\\[       ]*$" line) (setq line ...)) 
(org-export-preserve-breaks (setq line ...))) (let ((start 0)) (while (and 
org-par-open ...) (if ... ...) (setq start ...))) (insert line "\n"))))) (when 
inquote (insert "</pre>\n") (org-open-par)) (org-html-level-start 1 nil umax 
(and org-export-with-toc (<= level umax)) head-count) (when (and (> umax 0) 
first-heading-pos) (insert "</div>\n")) (save-excursion (goto-char (point-min)) 
(while (re-search-forward "<p class=\"footnote\">[^"<p class=\"email\">" email 
"</p>\n")) (when (plist-get opt-plist :creator-info) (insert "<p 
class=\"creator\">" ...)) (insert html-validation-link "\n</div>")) (t (insert 
"<div id=\"postamble\">\n") (insert (format-spec ... ...)) (insert 
"</div>")))))) (if org-export-html-with-timestamp (ins
 ert org-export-html-html-helper-timestamp)) (unless body-only (insert 
"\n</div>\n</body>\n</html>\n")) (unless (plist-get opt-plist 
:buffer-will-be-killed) (normal-mode) (if (eq major-mode (default-value (quote 
major-mode))) (html-mode))) (goto-char (point-min)) (when thetoc (if (or 
(re-search-forward "<p>\\s-*\\[TABLE-OF-CONTENTS\\]\\s-*</p>" nil t) 
(re-search-forward "\\[TABLE-OF-CONTENTS\\]" nil t)) (progn (goto-char 
(match-beginning 0)) (replace-match "")) (goto-char first-heading-pos) (when 
(looking-at "\\s-*</p>") (goto-char (match-end 0)) (insert "\n"))) (insert 
"<div id=\"table-of-contents\">\n") (let ((beg (point))) (mapc (quote insert) 
thetoc) (insert "</div>\n") (while (re-search-backward "<li>[ 
\n      ]*</li>\n?" beg t) (replace-match "")))) (goto-char (point-min)) (while 
(re-search-forward "<p>[ 
\n      ]*</p>" nil t) (replace-match "")) (goto-char (point-min)) (goto-char 
(point-min)) (let (beg end n) (while (setq beg (next-single-property-change 
(point) (quote org-whi
 tespace))) (setq n (get-text-property beg (quote org-whitespace)) end 
(next-single-property-change beg (quote org-whitespace))) (goto-char beg) 
(delete-region beg end) (insert (format "<span 
style=\"visibility:hidden;\">%s</span>" (make-string n 120))))) (goto-char 
(point-min)) (when (looking-at "\\s-+\n") (replace-match "")) 
(remove-text-properties (point-min) (point-max) (quote (display t))) (run-hooks 
(quote org-export-html-final-hook)) (or to-buffer (save-buffer)) (goto-char 
(point-min)) (or (org-export-push-to-kill-ring "HTML") (message "Exporting... 
done")) (if (eq to-buffer (quote string)) (prog1 (buffer-substring (point-min) 
(point-max)) (kill-buffer (current-buffer))) (current-buffer)))
  (let* ((opt-plist (org-export-process-option-filters (org-combine-plists 
(org-default-export-plist) ext-plist (org-infile-export-plist)))) (body-only 
(or body-only (plist-get opt-plist :body-only))) (style (concat (if (plist-get 
opt-plist :style-include-default) org-export-html-style-default) (plist-get 
opt-plist :style) (plist-get opt-plist :style-extra) "\n" (if (plist-get 
opt-plist :style-include-scripts) org-export-html-scripts))) (html-extension 
(plist-get opt-plist :html-extension)) valid thetoc have-headings 
first-heading-pos (odd org-odd-levels-only) (region-p (org-region-active-p)) 
(rbeg (and region-p (region-beginning))) (rend (and region-p (region-end))) 
(subtree-p (if (plist-get opt-plist :ignore-subtree-p) nil (when region-p 
(save-excursion (goto-char rbeg) (and (org-at-heading-p) (>= ... rend)))))) 
(level-offset (if subtree-p (save-excursion (goto-char rbeg) (+ (funcall 
outline-level) (if org-odd-levels-only 1 0))) 0)) (opt-plist (setq 
org-export-opt-plist (if
  subtree-p (org-export-add-subtree-options opt-plist rbeg) opt-plist))) 
(org-current-export-dir (or pub-dir (org-export-directory :html opt-plist))) 
(org-current-export-file buffer-file-name) (level 0) (line "") (origline "") 
txt todo (umax nil) (umax-toc nil) (filename (if to-buffer nil 
(expand-file-name (concat (file-name-sans-extension (or ... ...)) "." 
html-extension) (file-name-as-directory (or pub-dir (org-export-directory :html 
opt-plist)))))) (current-dir (if buffer-file-name (file-name-directory 
buffer-file-name) default-directory)) (buffer (if to-buffer (cond ((eq 
to-buffer (quote string)) (get-buffer-create "*Org HTML Export*")) (t 
(get-buffer-create to-buffer))) (find-file-noselect filename))) 
(org-levels-open (make-vector org-level-max nil)) (date (plist-get opt-plist 
:date)) (author (plist-get opt-plist :author)) (html-validation-link (or 
org-export-html-validation-link "")) (title (org-html-expand (or (and subtree-p 
(org-export-get-title-from-subtree)) (plist-
 get opt-plist :title) (and (not body-only) (not (plist-get opt-plist 
:skip-before-1st-heading)) (org-export-grab-title-from-buffer)) (and 
buffer-file-name (file-name-sans-extension (file-name-nondirectory 
buffer-file-name))) "UNTITLED"))) (link-up (and (plist-get opt-plist :link-up) 
(string-match "\\S-" (plist-get opt-plist :link-up)) (plist-get opt-plist 
:link-up))) (link-home (and (plist-get opt-plist :link-home) (string-match 
"\\S-" (plist-get opt-plist :link-home)) (plist-get opt-plist :link-home))) 
(dummy (setq opt-plist (plist-put opt-plist :title title))) (html-table-tag 
(plist-get opt-plist :html-table-tag)) (quote-re0 (concat "^[         ]*" 
org-quote-string "\\>")) (quote-re (concat "^\\(\\*+\\)\\([         ]+" 
org-quote-string "\\>\\)")) (inquote nil) (infixed nil) (inverse nil) (email 
(plist-get opt-plist :email)) (language (plist-get opt-plist :language)) 
(keywords (plist-get opt-plist :keywords)) (description (plist-get opt-plist 
:description)) (lang-words nil) (head-count 0
 ) cnt (start 0) (coding-system (and (boundp (quote buffer-file-coding-system)) 
buffer-file-coding-system)) ...) (let ((inhibit-read-only t)) (org-unmodified 
(remove-text-properties (point-min) (point-max) (quote (:org-license-to-kill 
t))))) (message "Exporting...") (setq org-min-level (org-get-min-level lines 
level-offset)) (setq org-last-level org-min-level) (org-init-section-numbers) 
(cond ((and date (string-match "%" date)) (setq date (format-time-string 
date))) (date) (t (setq date (format-time-string "%Y-%m-%d %T %Z")))) (setq 
lang-words (or (assoc language org-export-language-setup) (assoc "en" 
org-export-language-setup))) (set-buffer buffer) (let ((inhibit-read-only t)) 
(erase-buffer)) (fundamental-mode) (org-install-letbind) (and (fboundp (quote 
set-buffer-file-coding-system)) (set-buffer-file-coding-system 
coding-system-for-write)) (let ((case-fold-search nil) (org-odd-levels-only 
odd)) (mapc (lambda (x) (set (make-local-variable (nth 2 x)) (plist-get 
opt-plist (car
  x)))) org-export-plist-vars) (setq umax (if arg (prefix-numeric-value arg) 
org-export-headline-levels)) (setq umax-toc (if (integerp org-export-with-toc) 
(min org-export-with-toc umax) umax)) (unless body-only (insert (format 
"%s\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n               
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>\n<html 
xmlns=\"http://www.w3.org/1999/xhtml\"\nlang=\"%s\"; 
xml:lang=\"%s\">\n<head>\n<title>%s</title>\n<meta http-equiv=\"Content-Type\" 
content=\"text/html;charset=%s\"/>\n<meta name=\"generator\" 
content=\"Org-mode\"/>\n<meta name=\"generated\" content=\"%s\"/>\n<meta 
name=\"author\" content=\"%s\"/>\n<meta name=\"description\" 
content=\"%s\"/>\n<meta name=\"keywords\" 
content=\"%s\"/>\n%s\n%s\n</head>\n<body>\n<div id=\"content\">\n%s\n" (format 
(or (and ... org-export-html-xml-declaration) (cdr ...) (cdr ...) "") (or 
charset "iso-8859-1")) language language title (or charset "iso-8859-1") date 
author description ke
 ywords style mathjax (if (or link-up link-home) (concat (format 
org-export-html-home/up-format ... ...) "\n") ""))) (when (plist-get opt-plist 
:html-preamble) (let ((html-pre (plist-get opt-plist :html-preamble))) (cond 
((stringp html-pre) (insert ...)) ((functionp html-pre) (funcall html-pre 
opt-plist)) (t (insert ...)))))) (if (and org-export-with-toc (not body-only)) 
(progn (push (format "<h%d>%s</h%d>\n" org-export-html-toplevel-hlevel (nth 3 
lang-words) org-export-html-toplevel-hlevel) thetoc) (push "<div 
id=\"text-table-of-contents\">\n" thetoc) (push "<ul>\n<li>" thetoc) (setq 
lines (mapcar (quote (lambda ... ... line)) lines)) (while (> org-last-level 
(1- org-min-level)) (setq org-last-level (1- org-last-level)) (push 
"</li>\n</ul>\n" thetoc)) (push "</div>\n" thetoc) (setq thetoc (if 
have-headings (nreverse thetoc) nil)))) (setq head-count 0) 
(org-init-section-numbers) (org-open-par) (while (setq line (pop lines) 
origline line) (catch (quote nextline) (when (and inq
 uote (string-match "^\\*+ " 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 ...)) 
(setq infixed nil) (insert "</pre>\n") (org-open-par)) (throw (quote nextline) 
nil)) (when (and (get-text-property 0 (quote org-protected) line) (not (< ... 
...))) (let (par (ind ...)) (when (re-search-backward "\\(<p>\\)\\([  
\n]*\\)\\=" ... t) (setq par ...) (replace-match "\\2\n")) (insert line "\n") 
(while (and lines ... ...) (insert ... "\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 
nextl
 ine) 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 ...)) (if (> i 
0) (setq line ...)) (unless (string-match "\\\\\\\\[   ]*$" line) (setq line 
...)))) (setq start 0) (while (string-match 
"<<<?\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[      ]*\
 n?" line start) (cond ((get-text-property ... ... line) (setq start ...)) 
((match-end 2) (setq line ...)) ((and org-export-with-toc ...) (setq line ...)) 
(t (setq line ...)))) (setq line (org-html-handle-time-stamps line)) (or 
(string-match org-table-hline-regexp line) (setq line (org-html-expand line))) 
(setq line (org-html-handle-links line opt-plist)) (if (and (string-match 
org-todo-line-regexp line) (match-beginning 2)) (setq line (concat (substring 
line 0 ...) "<span class=\"" (if ... "done" "todo") " " (match-string 2 line) 
"\"> " (org-export-html-get-todo-kwd-class-name ...) "</span>" (substring line 
...)))) (when org-export-with-footnotes (setq start 0) (while (string-match 
"\\([^*     ].*?\\)\\[\\([0-9]+\\)\\]" line start) (if (get-text-property ... 
... line) (setq start ...) (let ... ... ...)))) (cond ((string-match 
"^\\(\\*+\\)[    ]+\\(.*\\)" line) (setq level (org-tr-level ...) txt 
(match-string 2 line)) (if (string-match quote-re0 txt) (setq txt ...)) (if (<= 
level 
 ...) (setq head-count ...)) (setq first-heading-pos (or first-heading-pos 
...)) (org-html-level-start level txt umax (and org-export-with-toc ...) 
head-count) (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 
... ...) (setq table-open nil table-buffer ... table-orig-buffer ...) 
(org-close-par-maybe) (insert ...))) (t (when (get-text-property 0 ... line) 
(setq line ...)) (when (string-match "^[       ]*-\\{5,\\}[    ]*$" line) (if 
org-par-open ... ...) (throw ... nil)) (if (string-match "^ [-+*]-\\|^[  ]*$" 
line) (org-open-par)) (when org-export-with-footnotes (when ... ...) (when ... 
... ...)) (cond (... ...) (org-export-preserve-breaks ...)) (let (...) (while 
... ... ...
 )) (insert line "\n"))))) (when inquote (insert "</pre>\n") (org-open-par)) 
(org-html-level-start 1 nil umax (and org-export-with-toc (<= level umax)) 
head-count) (when (and (> umax 0) first-heading-pos) (insert "</div>\n")) 
(save-excursion (goto-char (point-min)) (while (re-search-forward "<p 
class=\"footnote\">[^footnotes (insert (format 
org-export-html-footnotes-section (nth 4 lang-words) (mapconcat (quote 
identity) (nreverse footnotes) "\n")) "\n")) (let ((bib 
(org-export-html-get-bibliography))) (when bib (insert "\n" bib "\n"))) (unless 
body-only (let ((html-post (plist-get opt-plist :html-postamble)) (email 
(mapconcat (lambda ... ...) (split-string email ",+ *") ", ")) (creator-info 
(concat "Org version " org-version " with Emacs version " (number-to-string 
emacs-major-version)))) (when (plist-get opt-plist :html-postamble) (cond 
((stringp html-post) (insert "<div id=\"postamble\">\n") (insert ...) (insert 
"</div>")) ((functionp html-post) (funcall html-post opt-plist
 )) ((eq html-post ...) (insert "<div id=\"postamble\">\n") (when ... ...) 
(when ... ...) (when ... ...) (when ... ...) (insert html-validation-link 
"\n</div>")) (t (insert "<div id=\"postamble\">\n") (insert ...) (insert 
"</div>")))))) (if org-export-html-with-timestamp (insert 
org-export-html-html-helper-timestamp)) (unless body-only (insert 
"\n</div>\n</body>\n</html>\n")) (unless (plist-get opt-plist 
:buffer-will-be-killed) (normal-mode) (if (eq major-mode (default-value (quote 
major-mode))) (html-mode))) (goto-char (point-min)) (when thetoc (if (or 
(re-search-forward "<p>\\s-*\\[TABLE-OF-CONTENTS\\]\\s-*</p>" nil t) 
(re-search-forward "\\[TABLE-OF-CONTENTS\\]" nil t)) (progn (goto-char 
(match-beginning 0)) (replace-match "")) (goto-char first-heading-pos) (when 
(looking-at "\\s-*</p>") (goto-char (match-end 0)) (insert "\n"))) (insert 
"<div id=\"table-of-contents\">\n") (let ((beg (point))) (mapc (quote insert) 
thetoc) (insert "</div>\n") (while (re-search-backward "<li>
 [ 
\n      ]*</li>\n?" beg t) (replace-match "")))) (goto-char (point-min)) (while 
(re-search-forward "<p>[ 
\n      ]*</p>" nil t) (replace-match "")) (goto-char (point-min)) (goto-char 
(point-min)) (let (beg end n) (while (setq beg (next-single-property-change 
(point) (quote org-whitespace))) (setq n (get-text-property beg (quote 
org-whitespace)) end (next-single-property-change beg (quote org-whitespace))) 
(goto-char beg) (delete-region beg end) (insert (format "<span 
style=\"visibility:hidden;\">%s</span>" (make-string n 120))))) (goto-char 
(point-min)) (when (looking-at "\\s-+\n") (replace-match "")) 
(remove-text-properties (point-min) (point-max) (quote (display t))) (run-hooks 
(quote org-export-html-final-hook)) (or to-buffer (save-buffer)) (goto-char 
(point-min)) (or (org-export-push-to-kill-ring "HTML") (message "Exporting... 
done")) (if (eq to-buffer (quote string)) (prog1 (buffer-substring (point-min) 
(point-max)) (kill-buffer (current-buffer))) (current-buffer))))
  org-export-as-html(nil)
  call-interactively(org-export-as-html)
  org-export(nil)
  call-interactively(org-export nil nil)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]