From mboxrd@z Thu Jan 1 00:00:00 1970
From: Nick Dokos [X]
") ((string-match " " checkbox) "[-]
")) 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 "[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 "%sl>\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 "") (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") (insert "\n
" 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") (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") (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\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")) (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") (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 "\n")) (save-excursion (goto-char (point-min)) (while (re-search-forward "%s \n" org-export-html-toplevel-hlevel (nth 3 lang-words) org-export-html-toplevel-hlevel) thetoc) (push "\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
\n" thetoc)) (push "- " 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")) (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") (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\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 "[^"
" 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 ]*
" 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 " " (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\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") (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 "
[^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 "
\\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 ]*
" 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 " " (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)