From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: [PATCH][ANN] org-html/org-odt Date: Sun, 01 May 2011 08:52:24 -0400 Message-ID: <87iptuwpkn.fsf@fastmail.fm> References: <811v21sjy9.fsf@gmail.com> <81mxj88e8u.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:46414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGW8b-0007rN-CV for emacs-orgmode@gnu.org; Sun, 01 May 2011 08:52:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QGW8X-0006Oo-VE for emacs-orgmode@gnu.org; Sun, 01 May 2011 08:52:37 -0400 In-Reply-To: <81mxj88e8u.fsf@gmail.com> (Jambunathan K.'s message of "Sat, 30 Apr 2011 11:36:25 +0530") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jambunathan K Cc: Carsten Dominik , emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi Jambunathan, Jambunathan K writes: [...] > > I am not sure if (and when) my changes would get formally integrated. > > I can commit non-trivial effort cycles for bug fixing & integration for > maybe next 3 weeks. Further down the road, as a maintainer of > org-odt.el, I am willing to entertain bug and feature requests. However > it is quite possible that I might turn quirky and less-responsive. Thanks again for all the work you've done on this exporter! Both the odt and html output look very good. I plan to throw some more complex documents at the backends soon. I've been doing a bit of testing and have found that html export fails on the following headline: --8<---------------cut here---------------start------------->8--- * STARTED Alembert, Preliminary Discourse to the Encyclopedia of Diderot :read:BIB:NEXT: :LOGBOOK: CLOCK: [2011-04-24 Sun 17:28]--[2011-04-24 Sun 17:54] => 0:26 CLOCK: [2011-04-23 Sat 15:33]--[2011-04-23 Sat 16:00] => 0:27 CLOCK: [2011-04-21 Thu 21:01]--[2011-04-21 Thu 21:37] => 0:36 :END: [2011-04-21 Thu 21:01] --8<---------------cut here---------------end--------------->8--- I've attached the backtrace. Another comment. The warning about MathJax seemed a bit dire: "MathJax not supported. Falling back to dvipng" I assume this means that the odt exporter does not support MathJax. The way it is currently worded might make the user think that his/her system is lacking something. Best, Matt --=-=-= Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Debugger entered--Lisp error: (args-out-of-range #("Alembert, Preliminary D= iscourse to the Encyclopedia of Diderot" 0 62 (target "sec-1" fontified t o= rg-category "test")) 64 77) match-string(1 #("Alembert, Preliminary Discourse to the Encyclopedia of = Diderot" 0 62 (target "sec-1" fontified t org-category "test"))) (setq txt (replace-match "" t nil txt) tags (match-string 1 txt)) (progn (setq txt (replace-match "" t nil txt) tags (match-string 1 txt))) (if (string-match (org-re "[ ]+:\\([[:alnum:]_@:]+\\):[ ]*$") txt) (pro= gn (setq txt (replace-match "" t nil txt) tags (match-string 1 txt)))) (when (string-match (org-re "[ ]+:\\([[:alnum:]_@:]+\\):[ ]*$") txt) (s= etq txt (replace-match "" t nil txt) tags (match-string 1 txt))) (let ((txt (save-match-data (org-html-expand (org-export-cleanup-toc-line= (match-string 3 line))))) (todo (and org-export-mark-todo-in-toc (or (and = (match-beginning 2) (not (member ... org-done-keywords))) (and (=3D level u= max-toc) (org-search-todo-below line lines level))))) tags) (while (string-= match org-any-target-regexp line) (setq line (replace-match (let ((org-html= -protect t)) (org-parse-format (quote FONTIFY) (match-string 1 line) "targe= t")) t t line))) (when (string-match (org-re "[ ]+:\\([[:alnum:]_@:]+\\):[= ]*$") txt) (setq txt (replace-match "" t nil txt) tags (match-string 1 tx= t))) (when (string-match quote-re0 txt) (setq txt (replace-match "" t t txt= ))) (while (string-match "<\\(<\\)+\\|>\\(>\\)+" txt) (setq txt= (replace-match "" t t txt))) (org-parse-format (quote TOC-ITEM) (let* ((sn= umber (org-section-number level)) (href (replace-regexp-in-string "\\." "_"= (format "sec-%s" snumber))) (href (or (cdr (assoc href org-export-preferre= d-target-alist)) href)) (href (org-solidify-link-text href))) (org-parse-fo= rmat (quote TOC-ENTRY) snumber todo txt tags href)) level org-last-level) (= setq org-last-level level)) (progn (let ((txt (save-match-data (org-html-expand (org-export-cleanup-t= oc-line (match-string 3 line))))) (todo (and org-export-mark-todo-in-toc (o= r (and (match-beginning 2) (not ...)) (and (=3D level umax-toc) (org-search= -todo-below line lines level))))) tags) (while (string-match org-any-target= -regexp line) (setq line (replace-match (let ((org-html-protect t)) (org-pa= rse-format (quote FONTIFY) (match-string 1 line) "target")) t t line))) (wh= en (string-match (org-re "[ ]+:\\([[:alnum:]_@:]+\\):[ ]*$") txt) (setq t= xt (replace-match "" t nil txt) tags (match-string 1 txt))) (when (string-m= atch quote-re0 txt) (setq txt (replace-match "" t t txt))) (while (string-m= atch "<\\(<\\)+\\|>\\(>\\)+" txt) (setq txt (replace-match "" t= t txt))) (org-parse-format (quote TOC-ITEM) (let* ((snumber (org-section-n= umber level)) (href (replace-regexp-in-string "\\." "_" (format "sec-%s" sn= umber))) (href (or (cdr ...) href)) (href (org-solidify-link-text href))) (= org-parse-format (quote TOC-ENTRY) snumber todo txt tags href)) level org-l= ast-level) (setq org-last-level level))) (if (and (string-match org-todo-line-regexp line) (not (get-text-property= 0 (quote org-protected) line)) (<=3D (setq level (org-tr-level (- (match-e= nd 1) (match-beginning 1) level-offset))) umax-toc)) (progn (let ((txt (sav= e-match-data (org-html-expand (org-export-cleanup-toc-line ...)))) (todo (a= nd org-export-mark-todo-in-toc (or (and ... ...) (and ... ...)))) tags) (wh= ile (string-match org-any-target-regexp line) (setq line (replace-match (le= t (...) (org-parse-format ... ... "target")) t t line))) (when (string-matc= h (org-re "[ ]+:\\([[:alnum:]_@:]+\\):[ ]*$") txt) (setq txt (replace-mat= ch "" t nil txt) tags (match-string 1 txt))) (when (string-match quote-re0 = txt) (setq txt (replace-match "" t t txt))) (while (string-match "<\\(&l= t;\\)+\\|>\\(>\\)+" txt) (setq txt (replace-match "" t t txt))) (org-= parse-format (quote TOC-ITEM) (let* ((snumber (org-section-number level)) (= href (replace-regexp-in-string "\\." "_" ...)) (href (or ... href)) (href (= org-solidify-link-text href))) (org-parse-format (quote TOC-ENTRY) snumber = todo txt tags href)) level org-last-level) (setq org-last-level level)))) (when (and (string-match org-todo-line-regexp line) (not (get-text-proper= ty 0 (quote org-protected) line)) (<=3D (setq level (org-tr-level (- (match= -end 1) (match-beginning 1) level-offset))) umax-toc)) (let ((txt (save-mat= ch-data (org-html-expand (org-export-cleanup-toc-line (match-string 3 line)= )))) (todo (and org-export-mark-todo-in-toc (or (and (match-beginning 2) (n= ot ...)) (and (=3D level umax-toc) (org-search-todo-below line lines level)= )))) tags) (while (string-match org-any-target-regexp line) (setq line (rep= lace-match (let ((org-html-protect t)) (org-parse-format (quote FONTIFY) (m= atch-string 1 line) "target")) t t line))) (when (string-match (org-re "[ = ]+:\\([[:alnum:]_@:]+\\):[ ]*$") txt) (setq txt (replace-match "" t nil tx= t) tags (match-string 1 txt))) (when (string-match quote-re0 txt) (setq txt= (replace-match "" t t txt))) (while (string-match "<\\(<\\)+\\|>\= \(>\\)+" txt) (setq txt (replace-match "" t t txt))) (org-parse-format (= quote TOC-ITEM) (let* ((snumber (org-section-number level)) (href (replace-= regexp-in-string "\\." "_" (format "sec-%s" snumber))) (href (or (cdr ...) = href)) (href (org-solidify-link-text href))) (org-parse-format (quote TOC-E= NTRY) snumber todo txt tags href)) level org-last-level) (setq org-last-lev= el level))) (lambda (line) (when (and (string-match org-todo-line-regexp line) (not (= get-text-property 0 (quote org-protected) line)) (<=3D (setq level (org-tr-= level (- (match-end 1) (match-beginning 1) level-offset))) umax-toc)) (let = ((txt (save-match-data (org-html-expand (org-export-cleanup-toc-line ...)))= ) (todo (and org-export-mark-todo-in-toc (or (and ... ...) (and ... ...))))= tags) (while (string-match org-any-target-regexp line) (setq line (replace= -match (let (...) (org-parse-format ... ... "target")) t t line))) (when (s= tring-match (org-re "[ ]+:\\([[:alnum:]_@:]+\\):[ ]*$") txt) (setq txt (r= eplace-match "" t nil txt) tags (match-string 1 txt))) (when (string-match = quote-re0 txt) (setq txt (replace-match "" t t txt))) (while (string-match = "<\\(<\\)+\\|>\\(>\\)+" txt) (setq txt (replace-match "" t t tx= t))) (org-parse-format (quote TOC-ITEM) (let* ((snumber (org-section-number= level)) (href (replace-regexp-in-string "\\." "_" ...)) (href (or ... href= )) (href (org-solidify-link-text href))) (org-parse-format (quote TOC-ENTRY= ) snumber todo txt tags href)) level org-last-level) (setq org-last-level l= evel))) line)(#("* STARTED Alembert, Preliminary Discourse to the Encyclope= dia of Diderot :read:[[BIB:NEXT][BIB:NEXT]]:" 0 1 (org-category "test" font= ified t target "sec-1") 2 9 (org-category "test" fontified t target "sec-1"= ) 10 72 (org-category "test" fontified t target "sec-1") 73 78 (org-categor= y "test" fontified t target "sec-1") 78 79 (face org-link target "sec-1" fo= ntified t org-category "test") 79 81 (face org-link) 81 84 (face org-link t= arget "sec-1" fontified t org-category "test" org-protected t org-no-descri= ption nil) 84 85 (face org-link org-protected t org-no-description nil) 85 = 89 (face org-link target "sec-1" fontified t org-category "test" font-lock-= fontified t org-protected t org-no-description nil) 89 90 (face org-link) 9= 0 91 (face org-link) 91 94 (org-category "test" fontified t target "sec-1" = face org-link) 94 95 (face org-link) 95 97 (font-lock-fontified t org-categ= ory "test" fontified t target "sec-1" face org-link) 97 99 (font-lock-fonti= fied t org-category "test" fontified t target "sec-1" face org-link) 99 100= (face org-link) 100 101 (face org-link) 101 102 (rear-nonsticky (mouse-fac= e highlight keymap invisible intangible help-echo org-linked-text) org-cate= gory "test" fontified t target "sec-1"))) mapcar((lambda (line) (when (and (string-match org-todo-line-regexp line)= (not (get-text-property 0 (quote org-protected) line)) (<=3D (setq level (= org-tr-level (- (match-end 1) (match-beginning 1) level-offset))) umax-toc)= ) (let ((txt (save-match-data (org-html-expand (org-export-cleanup-toc-line= ...)))) (todo (and org-export-mark-todo-in-toc (or (and ... ...) (and ... = ...)))) tags) (while (string-match org-any-target-regexp line) (setq line (= replace-match (let (...) (org-parse-format ... ... "target")) t t line))) (= when (string-match (org-re "[ ]+:\\([[:alnum:]_@:]+\\):[ ]*$") txt) (setq= txt (replace-match "" t nil txt) tags (match-string 1 txt))) (when (string= -match quote-re0 txt) (setq txt (replace-match "" t t txt))) (while (string= -match "<\\(<\\)+\\|>\\(>\\)+" txt) (setq txt (replace-match ""= t t txt))) (org-parse-format (quote TOC-ITEM) (let* ((snumber (org-section= -number level)) (href (replace-regexp-in-string "\\." "_" ...)) (href (or .= .. href)) (href (org-solidify-link-text href))) (org-parse-format (quote TO= C-ENTRY) snumber todo txt tags href)) level org-last-level) (setq org-last-= level level))) line) (#("* STARTED Alembert, Preliminary Discourse to the E= ncyclopedia of Diderot :read:[[BIB:NEXT][BIB:NEXT]]:" 0 1 (org-category "te= st" fontified t target "sec-1") 2 9 (org-category "test" fontified t target= "sec-1") 10 72 (org-category "test" fontified t target "sec-1") 73 78 (org= -category "test" fontified t target "sec-1") 78 79 (face org-link target "s= ec-1" fontified t org-category "test") 79 81 (face org-link) 81 84 (face or= g-link target "sec-1" fontified t org-category "test" org-protected t org-n= o-description nil) 84 85 (face org-link org-protected t org-no-description = nil) 85 89 (face org-link target "sec-1" fontified t org-category "test" fo= nt-lock-fontified t org-protected t org-no-description nil) 89 90 (face org= -link) 90 91 (face org-link) 91 94 (org-category "test" fontified t target = "sec-1" face org-link) 94 95 (face org-link) 95 97 (font-lock-fontified t o= rg-category "test" fontified t target "sec-1" face org-link) 97 99 (font-lo= ck-fontified t org-category "test" fontified t target "sec-1" face org-link= ) 99 100 (face org-link) 100 101 (face org-link) 101 102 (rear-nonsticky (m= ouse-face highlight keymap invisible intangible help-echo org-linked-text) = org-category "test" fontified t target "sec-1")) #(" [2011-04-21 Thu 21:01]= " 0 1 (fontified t org-category "test") 1 22 (fontified t org-category "tes= t") 22 23 (fontified t org-category "test" rear-nonsticky (mouse-face highl= ight keymap invisible intangible help-echo org-linked-text))) "" "")) (setq lines (mapcar (quote (lambda (line) (when (and (string-match org-to= do-line-regexp line) (not (get-text-property 0 ... line)) (<=3D (setq level= ...) umax-toc)) (let ((txt ...) (todo ...) tags) (while (string-match org-= any-target-regexp line) (setq line ...)) (when (string-match ... txt) (setq= txt ... tags ...)) (when (string-match quote-re0 txt) (setq txt ...)) (whi= le (string-match "<\\(<\\)+\\|>\\(>\\)+" txt) (setq txt ...)) (= org-parse-format (quote TOC-ITEM) (let* ... ...) level org-last-level) (set= q org-last-level level))) line)) lines)) (progn (org-html-bind-local-variables opt-plist) (erase-buffer) (org-pars= e-begin (quote TOC) (nth 3 (plist-get opt-plist :lang-words))) (setq lines = (mapcar (quote (lambda (line) (when (and (string-match org-todo-line-regexp= line) (not ...) (<=3D ... umax-toc)) (let (... ... tags) (while ... ...) (= when ... ...) (when ... ...) (while ... ...) (org-parse-format ... ... leve= l org-last-level) (setq org-last-level level))) line)) lines)) (org-parse-e= nd (quote TOC)) (setq org-parse-table-of-contents (buffer-string))) (unwind-protect (progn (org-html-bind-local-variables opt-plist) (erase-b= uffer) (org-parse-begin (quote TOC) (nth 3 (plist-get opt-plist :lang-words= ))) (setq lines (mapcar (quote (lambda (line) (when (and ... ... ...) (let = ... ... ... ... ... ... ...)) line)) lines)) (org-parse-end (quote TOC)) (s= etq org-parse-table-of-contents (buffer-string))) (and (buffer-name temp-bu= ffer) (kill-buffer temp-buffer))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org= -html-bind-local-variables opt-plist) (erase-buffer) (org-parse-begin (quot= e TOC) (nth 3 (plist-get opt-plist :lang-words))) (setq lines (mapcar (quot= e (lambda (line) (when ... ...) line)) lines)) (org-parse-end (quote TOC)) = (setq org-parse-table-of-contents (buffer-string))) (and (buffer-name temp-= buffer) (kill-buffer temp-buffer)))) (with-current-buffer temp-buffer (unwind-protect (progn (org-html-bind-lo= cal-variables opt-plist) (erase-buffer) (org-parse-begin (quote TOC) (nth 3= (plist-get opt-plist :lang-words))) (setq lines (mapcar (quote (lambda (li= ne) (when ... ...) line)) lines)) (org-parse-end (quote TOC)) (setq org-par= se-table-of-contents (buffer-string))) (and (buffer-name temp-buffer) (kill= -buffer temp-buffer)))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-buffer= temp-buffer (unwind-protect (progn (org-html-bind-local-variables opt-plis= t) (erase-buffer) (org-parse-begin (quote TOC) (nth 3 (plist-get opt-plist = :lang-words))) (setq lines (mapcar (quote (lambda ... ... line)) lines)) (o= rg-parse-end (quote TOC)) (setq org-parse-table-of-contents (buffer-string)= )) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (with-temp-buffer (org-html-bind-local-variables opt-plist) (erase-buffer= ) (org-parse-begin (quote TOC) (nth 3 (plist-get opt-plist :lang-words))) (= setq lines (mapcar (quote (lambda (line) (when (and (string-match org-todo-= line-regexp line) (not ...) (<=3D ... umax-toc)) (let (... ... tags) (while= ... ...) (when ... ...) (when ... ...) (while ... ...) (org-parse-format .= .. ... level org-last-level) (setq org-last-level level))) line)) lines)) (= org-parse-end (quote TOC)) (setq org-parse-table-of-contents (buffer-string= ))) (let* ((quote-re0 (concat "^[ ]*" org-quote-string "\\>")) (org-min-leve= l (org-get-min-level lines level-offset)) (org-last-level org-min-level) le= vel) (with-temp-buffer (org-html-bind-local-variables opt-plist) (erase-buf= fer) (org-parse-begin (quote TOC) (nth 3 (plist-get opt-plist :lang-words))= ) (setq lines (mapcar (quote (lambda (line) (when (and ... ... ...) (let ..= . ... ... ... ... ... ...)) line)) lines)) (org-parse-end (quote TOC)) (set= q org-parse-table-of-contents (buffer-string)))) org-parse-prepare-toc((#("* STARTED Alembert, Preliminary Discourse to th= e Encyclopedia of Diderot :read:[[BIB:NEXT][BIB:NEXT]]:" 0 1 (org-category = "test" fontified t target "sec-1") 2 9 (org-category "test" fontified t tar= get "sec-1") 10 72 (org-category "test" fontified t target "sec-1") 73 78 (= org-category "test" fontified t target "sec-1") 78 79 (face org-link target= "sec-1" fontified t org-category "test") 79 81 (face org-link) 81 84 (face= org-link target "sec-1" fontified t org-category "test" org-protected t or= g-no-description nil) 84 85 (face org-link org-protected t org-no-descripti= on nil) 85 89 (face org-link target "sec-1" fontified t org-category "test"= font-lock-fontified t org-protected t org-no-description nil) 89 90 (face = org-link) 90 91 (face org-link) 91 94 (org-category "test" fontified t targ= et "sec-1" face org-link) 94 95 (face org-link) 95 97 (font-lock-fontified = t org-category "test" fontified t target "sec-1" face org-link) 97 99 (font= -lock-fontified t org-category "test" fontified t target "sec-1" face org-l= ink) 99 100 (face org-link) 100 101 (face org-link) 101 102 (rear-nonsticky= (mouse-face highlight keymap invisible intangible help-echo org-linked-tex= t) org-category "test" fontified t target "sec-1")) #(" [2011-04-21 Thu 21:= 01]" 0 1 (fontified t org-category "test") 1 22 (fontified t org-category "= test") 22 23 (fontified t org-category "test" rear-nonsticky (mouse-face hi= ghlight keymap invisible intangible help-echo org-linked-text))) "" "") 0 (= :latex-image-options nil :exclude-tags ("noexport") :select-tags ("export")= :publishing-directory nil :timestamp nil :expand-quoted-html t :html-table= -tag "" :xml-declaration (("html" . "") ("php" . "\"; ?>")) :html-postamble auto :html-pre= amble t :html-extension "html" :inline-images maybe :convert-org-links t :a= genda-style "" :style-extra "" :style "" :style-include-scripts t :style-in= clude-default t :table-auto-headline t :tables t :time-stamp-file t :creato= r-info t :email-info nil :author-info t :email "lundin@fastmail.fm" ...) 3) (setq lines (org-parse-prepare-toc lines level-offset opt-plist umax-toc)) (progn (setq lines (org-parse-prepare-toc lines level-offset opt-plist um= ax-toc))) (if (and org-export-with-toc (not body-only)) (progn (setq lines (org-par= se-prepare-toc lines level-offset opt-plist umax-toc)))) (when (and org-export-with-toc (not body-only)) (setq lines (org-parse-pr= epare-toc lines level-offset opt-plist umax-toc))) (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-e= xport-plist-vars) (setq umax (if arg (prefix-numeric-value arg) org-export-= headline-levels)) (setq umax-toc (if (integerp org-export-with-toc) (min or= g-export-with-toc umax) umax)) (when (and org-export-with-toc (not body-onl= y)) (setq lines (org-parse-prepare-toc lines level-offset opt-plist umax-to= c))) (unless body-only (org-parse-begin (quote DOCUMENT-CONTENT) opt-plist)= (org-parse-begin (quote DOCUMENT-BODY) opt-plist)) (setq head-count 0) (or= g-init-section-numbers) (org-parse-begin-paragraph) (while (setq line (pop = lines) origline line) (catch (quote nextline) (when (and (org-parse-current= -environment-p (quote quote)) (string-match "^\\*+ " line)) (org-parse-end-= environment (quote quote))) (when (org-parse-current-environment-p (quote q= uote)) (insert (org-parse-format (quote PLAIN) line)) (throw (quote nextlin= e) nil)) (when (and org-export-with-fixed-width (string-match "^[ ]*:\\(\\= ([ ]\\|$\\)\\(.*\\)\\)" line)) (when (not (org-parse-current-environment-p= (quote fixedwidth))) (org-parse-begin-environment (quote fixedwidth))) (in= sert (org-parse-format (quote PLAIN) (match-string 3 line))) (when (or (not= lines) (not (string-match "^[ ]*:\\(\\([ ]\\|$\\)\\(.*\\)\\)" ...))) (or= g-parse-end-environment (quote fixedwidth))) (throw (quote nextline) nil)) = (when (and (get-text-property 0 (quote org-native-text) line) (not (< (or .= .. 10000) (length line)))) (let ((ind (get-text-property 0 ... line))) (org= -parse-begin-environment (quote native)) (insert (org-parse-format (quote P= LAIN) line)) (while (and lines (or ... ... ...) (or ... ...)) (insert (org-= parse-format ... ...))) (org-parse-end-environment (quote native))) (throw = (quote nextline) nil)) (when (and (get-text-property 0 (quote org-protected= ) line) (not (< (or ... 10000) (length line)))) (let ((ind (get-text-proper= ty 0 ... line))) (insert (org-parse-format (quote PLAIN) line)) (while (and= lines (or ... ... ...) (or ... ...)) (insert (org-parse-format ... ...))))= (throw (quote nextline) nil)) (when (string-match "^ORG-\\(.+\\)-\\(START\= \|END\\)$" line) (let* ((style (intern ...)) (f (cdr ...))) (when (memq sty= le (quote ...)) (funcall f style) (throw (quote nextline) nil)))) (run-hook= s (quote org-export-html-after-blockquotes-hook)) (when (org-parse-current-= environment-p (quote verse)) (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 (s= tring-match "<<]*\\)>>>?\\((INVISIBLE)\\)?[ ]*\n?" line start) (c= ond ((get-text-property (match-beginning 1) (quote org-protected) line) (se= tq start (match-end 1))) ((match-end 2) (setq line (replace-match ... t t l= ine))) ((and org-export-with-toc (equal ... 42)) (setq line (replace-match = ... t t line))) (t (setq line (replace-match ... t t line))))) (let ((org-h= tml-protect t)) (setq line (org-html-handle-time-stamps line))) (or (string= -match org-table-hline-regexp line) (string-match "^[ ]*\\([+]-\\||[ ]\\)[= -+ |]*[+|][ ]*$" line) (setq line (org-html-expand line))) (setq line (org= -parse-format-org-link line opt-plist)) (if (and (string-match org-todo-lin= e-regexp line) (match-beginning 2)) (setq line (concat (substring line 0 (m= atch-beginning 2)) (org-parse-format (quote TODO) (match-string 2 line)) (s= ubstring line (match-end 2))))) (when org-export-with-footnotes (setq start= 0) (while (string-match "\\([^* ].*?\\)[ ]*\\[\\([0-9]+\\)\\]" line star= t) (if (get-text-property (match-beginning 2) (quote org-protected) line) (= setq start (match-end 2)) (let (... refcnt a) (if ... ... ... ...) (setq li= ne ...))))) (cond ((string-match "^\\(\\*+\\)[ ]+\\(.*\\)" line) (setq lev= el (org-tr-level (- ... ... level-offset)) txt (match-string 2 line)) (if (= string-match quote-re0 txt) (setq txt (replace-match "" t t txt))) (if (<= =3D level (max umax umax-toc)) (setq head-count (+ head-count 1))) (unless = org-html-dyn-first-heading-pos (setq org-html-dyn-first-heading-pos (point)= )) (org-parse-begin (quote LEVEL) level txt umax head-count) (when (string-= match quote-re line) (org-parse-begin-environment (quote quote)))) ((and or= g-export-with-tables (string-match "^\\([ ]*\\)\\(|\\|\\+-+\\+\\)" line)) = (when (not table-open) (setq table-open t table-buffer nil table-orig-buffe= r 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 t= able-orig-buffer)) (org-parse-end-paragraph) (insert (org-parse-format ... = table-buffer table-orig-buffer)))) (t (when (get-text-property 0 (quote lis= t-item) line) (setq line (org-html-export-list-line line ... ... ...))) (wh= en (string-match "^[ ]*-\\{5,\\}[ ]*$" line) (with-org-parse-preserve-par= agraph-state (insert ...)) (throw (quote nextline) nil)) (when (string-matc= h "^ [-+*]-\\|^[ ]*$" line) (when org-html-footnote-number (org-parse-end-= footnote-definition org-html-footnote-number) (setq org-html-footnote-numbe= r nil)) (org-parse-begin-paragraph)) (when org-export-with-footnotes (when = (and ... ...) (throw ... nil)) (when (string-match "^[ ]*\\[\\([0-9]+\\)\\= ]" line) (org-parse-end-paragraph) (setq org-html-footnote-number ...) (set= q line ...) (org-parse-begin-footnote-definition org-html-footnote-number))= ) (cond ((string-match "\\\\\\\\[ ]*$" line) (setq line ...)) (org-export-= preserve-breaks (setq line ...))) (let ((start 0)) (while (and org-par-open= ...) (error "FIXME") (if ... ...) (setq start ...))) (insert (org-parse-fo= rmat (quote PLAIN) line)))))) (when (org-parse-current-environment-p (quote= quote)) (org-parse-end-environment (quote quote))) (org-parse-end (quote L= EVEL) 1 umax) (when (and (> umax 0) org-html-dyn-first-heading-pos) (org-pa= rse-end (quote SECTION))) (org-parse-end (quote DOCUMENT-BODY) opt-plist) (= unless body-only (org-parse-end (quote DOCUMENT-CONTENT))) (unless (plist-g= et opt-plist :buffer-will-be-killed) (set-auto-mode t)) (org-parse-end (quo= te EXPORT)) (goto-char (point-min)) (or (org-export-push-to-kill-ring (upca= se (symbol-name org-parse-backend))) (message "Exporting... done")) (cond (= (not to-buffer) (let ((f (org-parse-get (quote SAVE-METHOD)))) (or (and f (= functionp f) (funcall f filename opt-plist)) (save-buffer))) (current-buffe= r)) ((eq to-buffer (quote string)) (prog1 (buffer-substring (point-min) (po= int-max)) (kill-buffer (current-buffer)))) (t (current-buffer)))) (let* (org-html-protect org-par-open (org-html-insert-tag-with-newlines (= quote both)) (org-parse-to-buffer to-buffer) (org-parse-body-only body-only= ) (org-export-html-special-string-regexps (org-parse-get (quote SPECIAL-STR= ING-REGEXPS))) (org-parse-entity-control-callbacks-alist (org-parse-get (qu= ote ENTITY-CONTROL))) (org-parse-entity-format-callbacks-alist (org-parse-g= et (quote ENTITY-FORMAT))) (opt-plist (org-export-process-option-filters (o= rg-combine-plists (org-default-export-plist) ext-plist (org-infile-export-p= list)))) (body-only (or body-only (plist-get opt-plist :body-only))) valid = org-html-dyn-first-heading-pos (odd org-odd-levels-only) (region-p (org-reg= ion-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) (>= =3D ... rend)))))) (level-offset (if subtree-p (save-excursion (goto-char r= beg) (+ (funcall outline-level) (if org-odd-levels-only 1 0))) 0)) (opt-pli= st (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-pars= e-get (quote EXPORT-DIR) 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-exten= sion (or ... ...)) "." (org-parse-get (quote FILE-NAME-EXTENSION) opt-plist= )) (file-name-as-directory (or pub-dir (org-parse-get ... opt-plist)))))) (= current-dir (if buffer-file-name (file-name-directory buffer-file-name) def= ault-directory)) (buffer (if to-buffer (cond ((eq to-buffer (quote string))= (get-buffer-create (org-parse-get ...))) (t (get-buffer-create to-buffer))= ) (find-file-noselect (or (let (...) (and f ... ...)) filename)))) (org-lev= els-open (make-vector org-level-max nil)) (date (plist-get opt-plist :date)= ) (date (cond ((and date (string-match "%" date)) (format-time-string date)= ) (date date) (t (format-time-string "%Y-%m-%d %T %Z")))) (dummy (setq opt-= plist (plist-put opt-plist :effective-date date))) (title (org-html-expand = (or (and subtree-p (org-export-get-title-from-subtree)) (plist-get opt-plis= t :title) (and (not body-only) (not (plist-get opt-plist :skip-before-1st-h= eading)) (org-export-grab-title-from-buffer)) (and buffer-file-name (file-n= ame-sans-extension (file-name-nondirectory buffer-file-name))) "UNTITLED"))= ) (dummy (setq opt-plist (plist-put opt-plist :title title))) (html-table-t= ag (plist-get opt-plist :html-table-tag)) (quote-re0 (concat "^[ ]*" org-q= uote-string "\\>")) (quote-re (concat "^\\(\\*+\\)\\([ ]+" org-quote-strin= g "\\>\\)")) (org-parse-dyn-current-environment nil) (lang-words (or (assoc= (plist-get opt-plist :language) org-export-language-setup) (assoc "en" org= -export-language-setup))) (dummy (setq opt-plist (plist-put opt-plist :lang= -words lang-words))) (head-count 0) cnt (start 0) (coding-system-for-write = (org-html-get-coding-system-for-write)) (save-buffer-coding-system (org-htm= l-get-coding-system-for-save)) (region (buffer-substring (if region-p (regi= on-beginning) (point-min)) (if region-p (region-end) (point-max)))) (org-ex= port-have-math nil) ...) (let ((inhibit-read-only t)) (org-unmodified (remo= ve-text-properties (point-min) (point-max) (quote (:org-license-to-kill t))= ))) (message "Exporting...") (org-init-section-numbers) (setq org-html-outp= ut-buffer buffer) (set-buffer org-html-output-buffer) (let ((inhibit-read-o= nly t)) (erase-buffer)) (fundamental-mode) (org-install-letbind) (and (fbou= ndp (quote set-buffer-file-coding-system)) (set-buffer-file-coding-system c= oding-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-e= xport-with-toc) (min org-export-with-toc umax) umax)) (when (and org-export= -with-toc (not body-only)) (setq lines (org-parse-prepare-toc lines level-o= ffset opt-plist umax-toc))) (unless body-only (org-parse-begin (quote DOCUM= ENT-CONTENT) opt-plist) (org-parse-begin (quote DOCUMENT-BODY) opt-plist)) = (setq head-count 0) (org-init-section-numbers) (org-parse-begin-paragraph) = (while (setq line (pop lines) origline line) (catch (quote nextline) (when = (and (org-parse-current-environment-p (quote quote)) (string-match "^\\*+ "= line)) (org-parse-end-environment (quote quote))) (when (org-parse-current= -environment-p (quote quote)) (insert (org-parse-format (quote PLAIN) line)= ) (throw (quote nextline) nil)) (when (and org-export-with-fixed-width (str= ing-match "^[ ]*:\\(\\([ ]\\|$\\)\\(.*\\)\\)" line)) (when (not (org-pars= e-current-environment-p ...)) (org-parse-begin-environment (quote fixedwidt= h))) (insert (org-parse-format (quote PLAIN) (match-string 3 line))) (when = (or (not lines) (not ...)) (org-parse-end-environment (quote fixedwidth))) = (throw (quote nextline) nil)) (when (and (get-text-property 0 (quote org-na= tive-text) line) (not (< ... ...))) (let ((ind ...)) (org-parse-begin-envir= onment (quote native)) (insert (org-parse-format ... line)) (while (and lin= es ... ...) (insert ...)) (org-parse-end-environment (quote native))) (thro= w (quote nextline) nil)) (when (and (get-text-property 0 (quote org-protect= ed) line) (not (< ... ...))) (let ((ind ...)) (insert (org-parse-format ...= line)) (while (and lines ... ...) (insert ...))) (throw (quote nextline) n= il)) (when (string-match "^ORG-\\(.+\\)-\\(START\\|END\\)$" line) (let* ((s= tyle ...) (f ...)) (when (memq style ...) (funcall f style) (throw ... nil)= ))) (run-hooks (quote org-export-html-after-blockquotes-hook)) (when (org-p= arse-current-environment-p (quote verse)) (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 l= ine ...)) (t (setq line ...)))) (let ((org-html-protect t)) (setq line (org= -html-handle-time-stamps line))) (or (string-match org-table-hline-regexp l= ine) (string-match "^[ ]*\\([+]-\\||[ ]\\)[-+ |]*[+|][ ]*$" line) (setq l= ine (org-html-expand line))) (setq line (org-parse-format-org-link line opt= -plist)) (if (and (string-match org-todo-line-regexp line) (match-beginning= 2)) (setq line (concat (substring line 0 ...) (org-parse-format ... ...) (= substring line ...)))) (when org-export-with-footnotes (setq start 0) (whil= e (string-match "\\([^* ].*?\\)[ ]*\\[\\([0-9]+\\)\\]" line start) (if (g= et-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 (<=3D level ...) (setq head-count ...)) (unless org-html-dyn-first= -heading-pos (setq org-html-dyn-first-heading-pos ...)) (org-parse-begin (q= uote LEVEL) level txt umax head-count) (when (string-match quote-re line) (= org-parse-begin-environment ...))) ((and org-export-with-tables (string-mat= ch "^\\([ ]*\\)\\(|\\|\\+-+\\+\\)" line)) (when (not table-open) (setq tab= le-open t table-buffer nil table-orig-buffer nil)) (setq table-buffer (cons= line table-buffer) table-orig-buffer (cons origline table-orig-buffer)) (w= hen (or ... ...) (setq table-open nil table-buffer ... table-orig-buffer ..= .) (org-parse-end-paragraph) (insert ...))) (t (when (get-text-property 0 .= .. line) (setq line ...)) (when (string-match "^[ ]*-\\{5,\\}[ ]*$" line)= (with-org-parse-preserve-paragraph-state ...) (throw ... nil)) (when (stri= ng-match "^ [-+*]-\\|^[ ]*$" line) (when org-html-footnote-number ... ...)= (org-parse-begin-paragraph)) (when org-export-with-footnotes (when ... ...= ) (when ... ... ... ... ...)) (cond (... ...) (org-export-preserve-breaks .= ..)) (let (...) (while ... ... ... ...)) (insert (org-parse-format ... line= )))))) (when (org-parse-current-environment-p (quote quote)) (org-parse-end= -environment (quote quote))) (org-parse-end (quote LEVEL) 1 umax) (when (an= d (> umax 0) org-html-dyn-first-heading-pos) (org-parse-end (quote SECTION)= )) (org-parse-end (quote DOCUMENT-BODY) opt-plist) (unless body-only (org-p= arse-end (quote DOCUMENT-CONTENT))) (unless (plist-get opt-plist :buffer-wi= ll-be-killed) (set-auto-mode t)) (org-parse-end (quote EXPORT)) (goto-char = (point-min)) (or (org-export-push-to-kill-ring (upcase (symbol-name org-par= se-backend))) (message "Exporting... done")) (cond ((not to-buffer) (let ((= f (org-parse-get ...))) (or (and f (functionp f) (funcall f filename opt-pl= ist)) (save-buffer))) (current-buffer)) ((eq to-buffer (quote string)) (pro= g1 (buffer-substring (point-min) (point-max)) (kill-buffer (current-buffer)= ))) (t (current-buffer))))) org-do-export(nil nil nil "*Org HTML Export*" nil nil) (let* ((org-parse-get-callback backend-get)) (org-do-export arg hidden ex= t-plist to-buffer body-only pub-dir)) (let* ((backend-desc (assoc-string backend org-export-backends-alist t)) = (backend-get (cdr backend-desc)) (backend-get (and (functionp backend-get) = backend-get))) (unless backend-get (error "Don't know how to export to back= end %s" backend)) (run-hooks (quote org-export-first-hook)) (let* ((org-par= se-get-callback backend-get)) (org-do-export arg hidden ext-plist to-buffer= body-only pub-dir))) org-export-as("html" nil nil nil "*Org HTML Export*") (let ((tempbuf (format "*Org %s Export*" (upcase backend)))) (org-export-= as backend arg nil nil tempbuf) (when org-export-show-temporary-export-buff= er (switch-to-buffer-other-window tempbuf))) org-export-as-to-buffer("html" nil) org-export-as-html-to-buffer(nil) call-interactively(org-export-as-html-to-buffer) (if (and bg (nth 2 ass) (not (buffer-base-buffer)) (not (org-region-activ= e-p))) (let ((p (start-process (concat "Exporting " (file-name-nondirectory= (buffer-file-name))) "*Org Processes*" (expand-file-name invocation-name i= nvocation-directory) "-batch" "-l" user-init-file "--eval" "(require 'org-e= xp)" "--eval" "(setq org-wait .2)" (buffer-file-name) "-f" (symbol-name (nt= h 1 ass))))) (set-process-sentinel p (quote org-export-process-sentinel)) (= message "Background process \"%s\": started" p)) (if subtree-p (progn (org-= mark-subtree) (activate-mark))) (call-interactively (nth 1 ass)) (when (and= bpos (get-buffer-window cbuf)) (let ((cw (selected-window))) (select-windo= w (get-buffer-window cbuf)) (goto-char cpos) (deactivate-mark) (select-wind= ow cw)))) (let* ((bg (org-xor (equal arg (quote (16))) org-export-run-in-background= )) (subtree-p (or (org-region-active-p) (eq org-export-initial-scope (quote= subtree)))) (help "[t] insert the export option template\n[v] limit ex= port to visible part of outline tree\n[1] switch buffer/subtree export\n[= SPC] publish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop)\= n\n[a/n/u] export as ASCII/Latin-1/UTF-8 [A/N/U] to temporary buffe= r\n\n[h] export as HTML [H] to temporary buffer [R] export region\n[= b] export as HTML and open in browser\n\n[l] export as LaTeX [L] to tem= porary buffer\n[p] export as LaTeX and process to PDF [d] ... an= d open PDF file\n\n[D] export as DocBook [V] export as DocBook, process t= o PDF, and open\n\n[o] export as ODT [O] export as ODT and open\n\n[j] ex= port as TaskJuggler [J] ... and open\n\n[m] export = as Freemind mind map\n[x] export as XOXO\n[g] export using Wes Hardaker's g= eneric exporter\n\n[i] export current file as iCalendar file\n[I] export al= l agenda files as iCalendar files [c] ...as one combined file\n\n[F] publ= ish current file [P] publish current project\n[X] publish a projec= t... [E] publish every projects") (cmds (quote ((116 org-insert-ex= port-options-template nil) (118 org-export-visible nil) (97 org-export-as-a= scii t) (65 org-export-as-ascii-to-buffer t) (110 org-export-as-latin1 t) (= 78 org-export-as-latin1-to-buffer t) (117 org-export-as-utf8 t) (85 org-exp= ort-as-utf8-to-buffer t) (104 org-export-as-html t) (98 org-export-as-html-= and-open t) (72 org-export-as-html-to-buffer nil) (82 org-export-region-as-= html nil) (120 org-export-as-xoxo t) (103 org-export-generic t) (68 org-exp= ort-as-docbook t) (86 org-export-as-docbook-pdf-and-open t) (111 org-export= -as-odt t) (79 org-export-as-odt-and-open nil) (106 org-export-as-taskjuggl= er t) (74 org-export-as-taskjuggler-and-open t) (109 org-export-as-freemind= t) (108 org-export-as-latex t) (112 org-export-as-pdf t) (100 org-export-a= s-pdf-and-open t) (76 org-export-as-latex-to-buffer nil) (105 org-export-ic= alendar-this-file t) (73 org-export-icalendar-all-agenda-files t) (99 org-e= xport-icalendar-combine-agenda-files t) (70 org-publish-current-file t) (80= org-publish-current-project t) (88 org-publish t) (69 org-publish-all t)))= ) r1 r2 ass (cpos (point)) (cbuf (current-buffer)) bpos) (save-excursion (s= ave-window-excursion (if subtree-p (message "Export subtree: ") (message "E= xport buffer: ")) (delete-other-windows) (with-output-to-temp-buffer "*Org = Export/Publishing Help*" (princ help)) (org-fit-window-to-buffer (get-buffe= r-window "*Org Export/Publishing Help*")) (while (eq (setq r1 (read-char-ex= clusive)) 49) (cond (subtree-p (setq subtree-p nil) (message "Export buffer= : ")) ((not subtree-p) (setq subtree-p t) (message "Export subtree: ")))) (= when (eq r1 32) (let ((case-fold-search t)) (if (re-search-backward "^[ ]+= \\(:latex_class:\\|:export_title:\\)[ ]+\\S-" nil t) (progn (org-back-to-h= eading t) (setq subtree-p t) (setq bpos ...) (message "Select command (for = subtree): ") (setq r1 ...)) (error "No enclosing node with LaTeX_CLASS or E= XPORT_FILE_NAME")))))) (redisplay) (and bpos (goto-char bpos)) (setq r2 (if= (< r1 27) (+ r1 96) r1)) (unless (setq ass (assq r2 cmds)) (error "No comm= and associated with key %c" r1)) (if (and bg (nth 2 ass) (not (buffer-base-= buffer)) (not (org-region-active-p))) (let ((p (start-process (concat "Expo= rting " (file-name-nondirectory ...)) "*Org Processes*" (expand-file-name i= nvocation-name invocation-directory) "-batch" "-l" user-init-file "--eval" = "(require 'org-exp)" "--eval" "(setq org-wait .2)" (buffer-file-name) "-f" = (symbol-name (nth 1 ass))))) (set-process-sentinel p (quote org-export-proc= ess-sentinel)) (message "Background process \"%s\": started" p)) (if subtre= e-p (progn (org-mark-subtree) (activate-mark))) (call-interactively (nth 1 = ass)) (when (and bpos (get-buffer-window cbuf)) (let ((cw (selected-window)= )) (select-window (get-buffer-window cbuf)) (goto-char cpos) (deactivate-ma= rk) (select-window cw))))) org-export(nil) call-interactively(org-export nil nil) --=-=-=--