From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Future Worg publishing failure :) Date: Fri, 18 Mar 2011 03:35:01 -0400 Message-ID: <15689.1300433701@alphaville.dokosmarshall.org> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=36717 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0UDF-0002UO-Kx for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 03:35:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0UDB-0006Me-Eb for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 03:35:08 -0400 Received: from vms173001pub.verizon.net ([206.46.173.1]:61073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0UDB-0006MV-4d for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 03:35:05 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173001.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LI800H0PT2D8830@vms173001.mailsrvcs.net> for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 02:35:03 -0500 (CDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: nicholas.dokos@hp.com 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 "
%s
" desc-tag)) ((and (equal type "o") counter) (format "
  • " counter)) (t "
  • "))) (when checkbox (setq body (concat (cond ((string-match "X" checkbox) "[X] ") ((string-match " " checkbox) "[ ] ") (t "[-] ")) body))) body) (cond ((assq pos struct) (string-match (concat "[ ]*\\(\\S-+[ ]+\\)" "\\(?:\\[@\\(?: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 "
    %s
    " desc-tag)) ((and (equal type "o") counter) (format "
  • " counter)) (t "
  • "))) (when checkbox (setq body (concat (con d (... "[X] ") (... "[ ] ") (t "[-] ")) 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 "\n" type)) (org-open-par)))) (funcall get-closings pos)) (cond ((assq pos struct) (string-match (concat "[ ]*\\(\\S-+[ ]+\\)" "\\(?:\\[@\\(?: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 "
    %s
    " desc-tag)) ((and ... counter) (format "
  • " counter)) (t "
  • "))) (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 "
    ") (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-bu
     ffer)) (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

    \n
    \n

    \n") (insert "\n


    \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-m aybe) (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 "
    " 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 (match-beginning 0) (quote org-protected) line)) (setq line (replace-match "

    " t t line))) (setq start (match-end 0)))) (insert line "\n"))) (catch (quote nextline) (when (and inquote (string-match "^\\*+ " 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-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 "\\(

    \\)\\([ \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 "

    \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) (insert "\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) (or g-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) nil)) (when (equal "ORG-CENTER-END" line) (org-close-par-maybe) (insert "\n
    ") (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 "@@" (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 "@" (match-string 1 line) "@ ") t t line))) (t (setq li ne (replace-match (concat "@" (match-string 1 line) "@ ") 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)) " " (org-export-html-get-todo-kwd-class-name (match-string 2 line)) "" (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 "
    ") (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

    \n
    \n

    \n") (insert "\n


    \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 "^" fo otnote-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 "
    " 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")))) (while (setq line (pop lines) origline line) (catch (quote nextline) (when (and inquote (string-match "^\\*+ " 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-text-property 0 (quote org-protected) line) (not (< (or (next-single-property-change 0 ... line) 1 0000) (length line)))) (let (par (ind (get-text-property 0 (quote original-indentation) line))) (when (re-search-backward "\\(

    \\)\\([ \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 "

    \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) (insert "\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 (quot e nextline) nil)) (when (equal "ORG-CENTER-START" line) (org-close-par-maybe) (insert "\n
    ") (org-open-par) (throw (quote nextline) nil)) (when (equal "ORG-C ENTER-END" line) (org-close-par-maybe) (insert "\n
    ") (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 "@@" ... ...) t t line))) ((and org-export-with-toc (equal (string-to-char line) 42)) (setq line (replace-match (concat "@" ... "@ ") t t line))) (t (setq line (replace-match (concat "@" ... "@ ") 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)) " " (org-export-html-get-todo-kwd-class-name (match-string 2 line)) "" (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)) (s etq 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 "
    ") (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) ta
     ble-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

    \n
    \n

    \n") (insert "\n


    \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 "
    " 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 ...) (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\n\n\n%s\n\n\n\n\n\n\n%s\n%s\n\n\n
    \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 "%s\n" org-export-html-toplevel-hlevel (nth 3 lang-words) org-export-html-toplevel-hlevel) thetoc) (push "
    \n" thetoc) (push "
      \n
    • " 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 "
    • \n
    \n" thetoc)) (push "
    \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 "
    \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 li
     nes) (not (string-match "^[ 	]*:\\(\\([ 	]\\|$\\)\\(.*\\)\\)" ...))) (setq infixed nil) (insert "
    \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 "\\(

    \\)\\([ \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 "

    \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) (insert "\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-S TART" line) (org-close-par-maybe) (insert "\n
    ") (org-open-par) (throw (quote nextline) nil)) (when (equal "ORG-CENTER-END" line) (org-close-par-maybe) (insert "\n
    ") (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)) " " (org-export-html-get-todo-kwd-class-name (match-string 2 line)) "" (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 (mat ch-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 "
    ") (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

    \n
    \n

    \n") (insert "\n


    \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 "
    \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 "\n")) (save-excursion (goto-char (point-min)) (while (re-search-forward "

    [^"

    " email "

    \n")) (when (plist-get opt-plist :creator-info) (insert "

    " ...)) (insert html-validation-link "\n")) (t (insert "

    \n") (insert (format-spec ... ...)) (insert "
    ")))))) (if org-export-html-with-timestamp (ins ert org-export-html-html-helper-timestamp)) (unless body-only (insert "\n\n\n\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 "

    \\s-*\\[TABLE-OF-CONTENTS\\]\\s-*

    " 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-*

    ") (goto-char (match-end 0)) (insert "\n"))) (insert "
    \n") (let ((beg (point))) (mapc (quote insert) thetoc) (insert "
    \n") (while (re-search-backward "
  • [ \n ]*
  • \n?" beg t) (replace-match "")))) (goto-char (point-min)) (while (re-search-forward "

    [ \n ]*

    " 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 "%s" (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-head ing-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 (plis t-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)) (se t-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\n\n\n%s\n\n\n\n\n\n\n%s\n%s\n\n\n
    \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 "%s\n" org-export-html-toplevel-hlevel (nth 3 lang-words) org-export-html-toplevel-hlevel) thetoc) (push "
    \n" thetoc) (push "
      \n
    • " 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 "
    • \n
    \n" thetoc)) (push "
    \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 "\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 ...)) (setq infixed nil) (insert "
    \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 "\\(

    \\)\\([ \n]*\\)\\=" ... t) (setq par ...) (replace-match "\\2\n")) (insert line "\n") (while (and lines ... ...) (insert ... "\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 nextl ine) nil)) (when (equal "ORG-BLOCKQUOTE-END" line) (org-close-par-maybe) (insert "\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) nil)) (when (equal "ORG-CENTER-END" line) (org-close-par-maybe) (insert "\n
    ") (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 ...) " " (org-export-html-get-todo-kwd-class-name ...) "" (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 "
    ") (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 "
    \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 "
    \n")) (save-excursion (goto-char (point-min)) (while (re-search-forward "

    [^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 "

    \n") (insert ...) (insert "
    ")) ((functionp html-post) (funcall html-post opt-plist )) ((eq html-post ...) (insert "
    \n") (when ... ...) (when ... ...) (when ... ...) (when ... ...) (insert html-validation-link "\n
    ")) (t (insert "
    \n") (insert ...) (insert "
    ")))))) (if org-export-html-with-timestamp (insert org-export-html-html-helper-timestamp)) (unless body-only (insert "\n\n\n\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 "

    \\s-*\\[TABLE-OF-CONTENTS\\]\\s-*

    " 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-*

    " ) (goto-char (match-end 0)) (insert "\n"))) (insert "
    \n") (let ((beg (point))) (mapc (quote insert) thetoc) (insert "
    \n") (while (re-search-backward "
  • [ \n ]*
  • \n?" beg t) (replace-match "")))) (goto-char (point-min)) (while (re-search-forward "

    [ \n ]*

    " 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 "%s" (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)