* Re: [latex] Problems with old exporter (for Beamer) and with new exporter
2012-06-09 20:18 ` Nicolas Goaziou
@ 2012-06-14 13:06 ` Sebastien Vauban
2012-06-14 18:06 ` Nicolas Goaziou
0 siblings, 1 reply; 6+ messages in thread
From: Sebastien Vauban @ 2012-06-14 13:06 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello Nicolas,
Nicolas Goaziou wrote:
> "Sebastien Vauban" writes:
>
>> With the new exporter, most things work. What does not work:
>> - macro does not get executed (no string in orange color),
>
> Macro are meant to produce contents, not to talk to back-ends. Every text
> they produce will be protected.
Do you mean the template must be pure text?
Do you mean that a thing such as
http://frozenlock.org/2011/11/05/on-the-fly-key-sequence-insertion/ won't work
anymore?
>> - the =\end{verbatim}= disappears from the LaTeX output
>
> This is a limitation from LaTeX: you cannot have "\end{verbatim}" string
> within a verbatim environment.
OK, I thought it would be in a listings. But I did not customize the variable
`org-e-latex-listings' (well the old exporter one).
Though, now, when trying to export to LaTeX (with the new exporter and
up-to-date Org[1]), I get an error:
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("^[ ]*\\[\\(NO-\\)?DEFAULT-PACKAGES\\][ ]*\n?" nil)
(if (string-match "^[ ]*\\[\\(NO-\\)?DEFAULT-PACKAGES\\][ ]*\n?" tpl) (setq rpl (if (or (match-end 1) (not def-pkg)) "" (org-latex-packages-to-string def-pkg snippets-p t)) tpl (replace-match rpl t t tpl)) (if def-pkg (setq end (org-latex-packages-to-string def-pkg snippets-p))))
(let (rpl (end "")) (if (string-match "^[ ]*\\[\\(NO-\\)?DEFAULT-PACKAGES\\][ ]*\n?" tpl) (setq rpl (if (or (match-end 1) (not def-pkg)) "" (org-latex-packages-to-string def-pkg snippets-p t)) tpl (replace-match rpl t t tpl)) (if def-pkg (setq end (org-latex-packages-to-string def-pkg snippets-p)))) (if (string-match "\\[\\(NO-\\)?PACKAGES\\][ ]*\n?" tpl) (setq rpl (if (or (match-end 1) (not pkg)) "" (org-latex-packages-to-string pkg snippets-p t)) tpl (replace-match rpl t t tpl)) (if pkg (setq end (concat end "\n" (org-latex-packages-to-string pkg snippets-p))))) (if (string-match "\\[\\(NO-\\)?EXTRA\\][ ]*\n?" tpl) (setq rpl (if (or (match-end 1) (not extra)) "" (concat extra "\n")) tpl (replace-match rpl t t tpl)) (if (and extra (string-match "\\S-" extra)) (setq end (concat end "\n" extra)))) (if (string-match "\\S-" end) (concat tpl "\n" end) tpl))
org-splice-latex-header(nil (("" "fixltx2e" nil) ("" "graphicx" t) ("" "longtable" nil) ("" "float" nil) ("" "wrapfig" nil) ("" "soul" t) ("" "marvosym" t) ("" "wasysym" t) ("" "latexsym" t) ("" "amssymb" t) ("" "hyperref" nil) "\\tolerance=1000" ("" "listings") ("" "xcolor")) (("AUTO" "inputenc" t) ("T1" "fontenc" t) ("" "textcomp" t)) nil "\\lstdefinelanguage{org}{%\nmorekeywords={:results, :session, :var, :noweb, :exports},\nsensitive=false,\nmorestring=[b]\",\nmorecomment=[l]{\\#},\n}\n\\lstdefinelanguage{dot}{%\nmorekeywords={graph},\nsensitive=false,\n}\n\\lstset{%\nextendedchars=false,\ninputencoding=utf8x,\n%\nmathescape=false,\nescapechar=`, % allow escaping to (La)TeX mode within `..`\ncolumns=flexible,\nkeepspaces=true,\n%\nliterate=\n{á}{{\\'a}}1\n{à}{{\\`a}}1\n{â}{{\\^a}}1\n{ä}{{\\\"a}}1\n{é}{{\\'e}}1\n{è}{{\\`e}}1\n{ê}{{\\^e}}1\n{ë}{{\\\"e}}1\n{í}{{\\'i}}1\n{ì}{{\\`i}}1\n{î}{{\\^i}}1\n{ï}{{\\\"i}}1\n{ó}{{\\'o}}1\n{ò}{{\\`o}}1\n{ô}{{\\^o}}1\n{ö}{{\\\"o}}1\n{ú}{{\\'u}}1\n{ù}{{\\`u}}1\n{û}{{\\^u}}1\n{ü}{{\\\"u}}1\n}")
(org-e-latex--guess-inputenc (org-splice-latex-header document-class-string org-export-latex-default-packages-alist org-export-latex-packages-alist nil (plist-get info :latex-header-extra)))
(let* ((header (nth 1 (assoc class org-e-latex-classes))) (document-class-string (and (stringp header) (if class-options (replace-regexp-in-string "^[ ]*\\\\documentclass\\(\\[.*?\\]\\)" class-options header t nil 1) header)))) (org-e-latex--guess-inputenc (org-splice-latex-header document-class-string org-export-latex-default-packages-alist org-export-latex-packages-alist nil (plist-get info :latex-header-extra))))
(org-element-normalize-string (let* ((header (nth 1 (assoc class org-e-latex-classes))) (document-class-string (and (stringp header) (if class-options (replace-regexp-in-string "^[ ]*\\\\documentclass\\(\\[.*?\\]\\)" class-options header t nil 1) header)))) (org-e-latex--guess-inputenc (org-splice-latex-header document-class-string org-export-latex-default-packages-alist org-export-latex-packages-alist nil (plist-get info :latex-header-extra)))))
(let ((class (plist-get info :latex-class)) (class-options (plist-get info :latex-class-options))) (org-element-normalize-string (let* ((header (nth 1 (assoc class org-e-latex-classes))) (document-class-string (and (stringp header) (if class-options (replace-regexp-in-string "^[ ]*\\\\documentclass\\(\\[.*?\\]\\)" class-options header t nil 1) header)))) (org-e-latex--guess-inputenc (org-splice-latex-header document-class-string org-export-latex-default-packages-alist org-export-latex-packages-alist nil (plist-get info :latex-header-extra))))))
(concat (and (plist-get info :time-stamp-file) (format-time-string "%% Created %Y-%m-%d %a %H:%M\n")) (let ((class (plist-get info :latex-class)) (class-options (plist-get info :latex-class-options))) (org-element-normalize-string (let* ((header (nth 1 (assoc class org-e-latex-classes))) (document-class-string (and (stringp header) (if class-options ... header)))) (org-e-latex--guess-inputenc (org-splice-latex-header document-class-string org-export-latex-default-packages-alist org-export-latex-packages-alist nil (plist-get info :latex-header-extra)))))) "\\providecommand{\\alert}[1]{\\textbf{#1}}\n" (let ((sec-num (plist-get info :section-numbers))) (when (integerp sec-num) (format "\\setcounter{secnumdepth}{%d}\n" sec-num))) (let ((author (and (plist-get info :with-author) (let ((auth ...)) (and auth (org-export-data auth info))))) (email (and (plist-get info :with-email) (org-export-data (plist-get info :email) info)))) (cond ((and author email (not (string= "" email))) (format "\\author{%s\\thanks{%s}}\n" author email)) (author (format "\\author{%s}\n" author)) (t "\\author{}\n"))) (let ((date (plist-get info :date))) (and date (format "\\date{%s}\n" date))) (format "\\title{%s}\n" title) (format "\\hypersetup{\n pdfkeywords={%s},\n pdfsubject={%s},\n pdfcreator={%s}}\n" (or (plist-get info :keywords) "") (or (plist-get info :description) "") (if (not (plist-get info :with-creator)) "" (plist-get info :creator))) "\\begin{document}\n\n" (org-element-normalize-string (cond ((string= "" title) nil) ((not (stringp org-e-latex-title-command)) nil) ((string-match "\\(?:[^%]\\|^\\)%s" org-e-latex-title-command) (format org-e-latex-title-command title)) (t org-e-latex-title-command))) (let ((depth (plist-get info :with-toc))) (when depth (concat (when (wholenump depth) (format "\\setcounter{tocdepth}{%d}\n" depth)) "\\tableofcontents\n\\vspace*{1cm}\n\n"))) contents (let ((creator-info (plist-get info :with-creator))) (cond ((not creator-info) "") ((eq creator-info (quote comment)) (format "%% %s\n" (plist-get info :creator))) (t (concat (plist-get info :creator) "\n")))) "\\end{document}")
(let ((title (org-export-data (plist-get info :title) info))) (concat (and (plist-get info :time-stamp-file) (format-time-string "%% Created %Y-%m-%d %a %H:%M\n")) (let ((class (plist-get info :latex-class)) (class-options (plist-get info :latex-class-options))) (org-element-normalize-string (let* ((header (nth 1 ...)) (document-class-string (and ... ...))) (org-e-latex--guess-inputenc (org-splice-latex-header document-class-string org-export-latex-default-packages-alist org-export-latex-packages-alist nil (plist-get info :latex-header-extra)))))) "\\providecommand{\\alert}[1]{\\textbf{#1}}\n" (let ((sec-num (plist-get info :section-numbers))) (when (integerp sec-num) (format "\\setcounter{secnumdepth}{%d}\n" sec-num))) (let ((author (and (plist-get info :with-author) (let (...) (and auth ...)))) (email (and (plist-get info :with-email) (org-export-data (plist-get info :email) info)))) (cond ((and author email (not (string= "" email))) (format "\\author{%s\\thanks{%s}}\n" author email)) (author (format "\\author{%s}\n" author)) (t "\\author{}\n"))) (let ((date (plist-get info :date))) (and date (format "\\date{%s}\n" date))) (format "\\title{%s}\n" title) (format "\\hypersetup{\n pdfkeywords={%s},\n pdfsubject={%s},\n pdfcreator={%s}}\n" (or (plist-get info :keywords) "") (or (plist-get info :description) "") (if (not (plist-get info :with-creator)) "" (plist-get info :creator))) "\\begin{document}\n\n" (org-element-normalize-string (cond ((string= "" title) nil) ((not (stringp org-e-latex-title-command)) nil) ((string-match "\\(?:[^%]\\|^\\)%s" org-e-latex-title-command) (format org-e-latex-title-command title)) (t org-e-latex-title-command))) (let ((depth (plist-get info :with-toc))) (when depth (concat (when (wholenump depth) (format "\\setcounter{tocdepth}{%d}\n" depth)) "\\tableofcontents\n\\vspace*{1cm}\n\n"))) contents (let ((creator-info (plist-get info :with-creator))) (cond ((not creator-info) "") ((eq creator-info (quote comment)) (format "%% %s\n" (plist-get info :creator))) (t (concat (plist-get info :creator) "\n")))) "\\end{document}"))
org-e-latex-template("\n\\begin{enumerate}\n\\item Contexte\n\\label{sec-1}\n\nI want to write a document where I show:\n\n\\begin{itemize}\n\\item Org code to type in a buffer\n\\item (sometimes) its \\LaTeX{} translation\n\\item its effect in the output PDF\n\\end{itemize}\n\nThough, I have big troubles outputting the Org code one is suppose to write in\nthe Org buffers. It often gets replaced or modified\\ldots{} See examples in the\nfollowing ECM.\n\nWith the old exporter (necessary for Beamer), all the below cases fail\\ldots{}\n\nWith the new exporter, most things work. What does not work:\n\\begin{itemize}\n\\item macro does not get executed (no string in orange color),\n\\item the \\texttt{\\textbackslash{}end\\{verbatim\\}} disappears from the \\LaTeX{} output\n\\end{itemize}\n\n\\item Macros\n\\label{sec-2}\n\n\\begin{itemize}\n\\item With the following macro definition\n\n\\begin{verbatim}\n #+MACRO: key \\textcolor{orange}{\\texttt{$1}}\n\\end{verbatim}\n\n\\item Every time we write\n\n\\begin{verbatim}\n {{{key(C-c C-e)}}}\n\\end{verbatim}\n\nHERE ABOVE, WE SHOULD SEE THE MACRO NAME AND PARAMETER INSIDE CURLY\nBRACKETS. INSTEAD, WE SEE THE LATEX REPLACEMENT CODE.\n\n\\item We get $\\backslash$textcolor\\{orange\\}\\{$\\backslash$texttt\\{C-c C-e\\}\\}\n\\end{itemize}\n\n\\item Listings informatiques\n\\label{sec-3}\n\n\\begin{itemize}\n\\item To input a block of code in Org, type it like this:\n\\end{itemize}\n\n\\begin{verbatim}\n#+begin_src sql\nSELECT *\nFROM inventory\nWHERE product = 'ABC123'\n#+end_src\n\\end{verbatim}\n\nHERE, WE SHOULD SEE \\texttt{\\#+begin\\_src sql}. INSTEAD, WE SEE \\texttt{\\textbackslash{}begin\\{\\}sql}.\n\n\\begin{itemize}\n\\item And see the nice listing:\n\\end{itemize}\n\n\\begin{verbatim}\nSELECT *\nFROM inventory\nWHERE product = 'ABC123'\n\\end{verbatim}\n\n\\item Verbatim\n\\label{sec-4}\n\n\\begin{itemize}\n\\item Same problem for verbatim\\ldots{} Here, the Org code\n\\end{itemize}\n\n\\begin{verbatim}\n#+begin_verbatim\nverbatim d i s p l a y s with spaces!\n#+end_verbatim\n\\end{verbatim}\n\nHERE, THE META LINE IS CONVERTED INTO ITS LATEX FORM.\n\n\\begin{itemize}\n\\item And its translation into \\LaTeX{}:\n\\end{itemize}\n\n\\begin{verbatim}\n\\begin{verbatim}\nverbatim d i s p l a y s with spaces!\n\\end{verbatim}\n\\end{verbatim}\n\n\\item Comment\n\\label{sec-5}\n\nIt is also impossible to show how to type a comment block:\n\n\\begin{verbatim}\n#+begin_comment\nQuelques paragraphes qui ne vont pas apparaître dans le PDF.\n#+end_comment\n\\end{verbatim}\n\nTHE ABOVE NEVER IS SHOWN!\n\\end{enumerate}\n" (:author "Fabrice Niessen" :creator "Generated by Org mode 7.8.11 in Emacs 24.1.1." :date "\\today" :description nil :email "fni-djc/iPCCuDYQheJpep6IeZlAfpA4pxzR@public.gmane.orgm" :exclude-tags ("noexport") :headline-levels 3 :keywords nil :language "en" :preserve-breaks nil :section-numbers t :select-tags ("export") :time-stamp-file t :title ("Org mode examples") :with-archived-trees headline :with-author t :with-clocks nil :with-creator nil :with-drawers nil :with-email nil :with-emphasize t :with-entities t :with-fixed-width t :with-footnotes t :with-plannings nil ...))
funcall(org-e-latex-template "\n\\begin{enumerate}\n\\item Contexte\n\\label{sec-1}\n\nI want to write a document where I show:\n\n\\begin{itemize}\n\\item Org code to type in a buffer\n\\item (sometimes) its \\LaTeX{} translation\n\\item its effect in the output PDF\n\\end{itemize}\n\nThough, I have big troubles outputting the Org code one is suppose to write in\nthe Org buffers. It often gets replaced or modified\\ldots{} See examples in the\nfollowing ECM.\n\nWith the old exporter (necessary for Beamer), all the below cases fail\\ldots{}\n\nWith the new exporter, most things work. What does not work:\n\\begin{itemize}\n\\item macro does not get executed (no string in orange color),\n\\item the \\texttt{\\textbackslash{}end\\{verbatim\\}} disappears from the \\LaTeX{} output\n\\end{itemize}\n\n\\item Macros\n\\label{sec-2}\n\n\\begin{itemize}\n\\item With the following macro definition\n\n\\begin{verbatim}\n #+MACRO: key \\textcolor{orange}{\\texttt{$1}}\n\\end{verbatim}\n\n\\item Every time we write\n\n\\begin{verbatim}\n {{{key(C-c C-e)}}}\n\\end{verbatim}\n\nHERE ABOVE, WE SHOULD SEE THE MACRO NAME AND PARAMETER INSIDE CURLY\nBRACKETS. INSTEAD, WE SEE THE LATEX REPLACEMENT CODE.\n\n\\item We get $\\backslash$textcolor\\{orange\\}\\{$\\backslash$texttt\\{C-c C-e\\}\\}\n\\end{itemize}\n\n\\item Listings informatiques\n\\label{sec-3}\n\n\\begin{itemize}\n\\item To input a block of code in Org, type it like this:\n\\end{itemize}\n\n\\begin{verbatim}\n#+begin_src sql\nSELECT *\nFROM inventory\nWHERE product = 'ABC123'\n#+end_src\n\\end{verbatim}\n\nHERE, WE SHOULD SEE \\texttt{\\#+begin\\_src sql}. INSTEAD, WE SEE \\texttt{\\textbackslash{}begin\\{\\}sql}.\n\n\\begin{itemize}\n\\item And see the nice listing:\n\\end{itemize}\n\n\\begin{verbatim}\nSELECT *\nFROM inventory\nWHERE product = 'ABC123'\n\\end{verbatim}\n\n\\item Verbatim\n\\label{sec-4}\n\n\\begin{itemize}\n\\item Same problem for verbatim\\ldots{} Here, the Org code\n\\end{itemize}\n\n\\begin{verbatim}\n#+begin_verbatim\nverbatim d i s p l a y s with spaces!\n#+end_verbatim\n\\end{verbatim}\n\nHERE, THE META LINE IS CONVERTED INTO ITS LATEX FORM.\n\n\\begin{itemize}\n\\item And its translation into \\LaTeX{}:\n\\end{itemize}\n\n\\begin{verbatim}\n\\begin{verbatim}\nverbatim d i s p l a y s with spaces!\n\\end{verbatim}\n\\end{verbatim}\n\n\\item Comment\n\\label{sec-5}\n\nIt is also impossible to show how to type a comment block:\n\n\\begin{verbatim}\n#+begin_comment\nQuelques paragraphes qui ne vont pas apparaître dans le PDF.\n#+end_comment\n\\end{verbatim}\n\nTHE ABOVE NEVER IS SHOWN!\n\\end{enumerate}\n" (:author "Fabrice Niessen" :creator "Generated by Org mode 7.8.11 in Emacs 24.1.1." :date "\\today" :description nil :email "fni@missioncriticalit.com" :exclude-tags ("noexport") :headline-levels 3 :keywords nil :language "en" :preserve-breaks nil :section-numbers t :select-tags ("export") :time-stamp-file t :title ("Org mode examples") :with-archived-trees headline :with-author t :with-clocks nil :with-creator nil :with-drawers nil :with-email nil :with-emphasize t :with-entities t :with-fixed-width t :with-footnotes t :with-plannings nil ...))
(if (or (not (fboundp template)) body-only) body (funcall template body info))
(org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or (not (fboundp template)) body-only) body (funcall template body info)) info)
(let* ((body (org-element-normalize-string (org-export-data tree info))) (template (cdr (assq (quote template) (plist-get info :translate-alist)))) (output (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or (not (fboundp template)) body-only) body (funcall template body info)) info))) (when org-export-copy-to-kill-ring (org-kill-new output)) output)
(let ((info (org-export-install-filters (org-export-get-environment backend subtreep ext-plist))) (tree (let ((buf (or (buffer-file-name ...) (current-buffer)))) (org-export-with-current-buffer-copy (unless noexpand (org-export-expand-include-keyword) (let (...) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only))))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (org-export-data tree info))) (template (cdr (assq (quote template) (plist-get info :translate-alist)))) (output (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or (not ...) body-only) body (funcall template body info)) info))) (when org-export-copy-to-kill-ring (org-kill-new output)) output))
(save-restriction (cond ((org-region-active-p) (narrow-to-region (region-beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max)))) (let ((info (org-export-install-filters (org-export-get-environment backend subtreep ext-plist))) (tree (let ((buf (or ... ...))) (org-export-with-current-buffer-copy (unless noexpand (org-export-expand-include-keyword) (let ... ...)) (goto-char (point-min)) (let (...) (run-hooks ...)) (org-element-parse-buffer nil visible-only))))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (org-export-data tree info))) (template (cdr (assq (quote template) (plist-get info :translate-alist)))) (output (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or ... body-only) body (funcall template body info)) info))) (when org-export-copy-to-kill-ring (org-kill-new output)) output)))
(save-excursion (save-restriction (cond ((org-region-active-p) (narrow-to-region (region-beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max)))) (let ((info (org-export-install-filters (org-export-get-environment backend subtreep ext-plist))) (tree (let ((buf ...)) (org-export-with-current-buffer-copy (unless noexpand ... ...) (goto-char ...) (let ... ...) (org-element-parse-buffer nil visible-only))))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (org-export-data tree info))) (template (cdr (assq ... ...))) (output (org-export-filter-apply-functions (plist-get info :filter-final-output) (if ... body ...) info))) (when org-export-copy-to-kill-ring (org-kill-new output)) output))))
org-export-as(e-latex nil nil nil nil nil)
(let ((out (org-export-as backend subtreep visible-only body-only ext-plist noexpand))) (with-temp-buffer (insert out) (let ((coding-system-for-write org-export-coding-system)) (write-file file))))
org-export-to-file(e-latex "c:/home/sva/Examples/Org-scraps/ecm-Org-code-blocks-doc.tex" nil nil nil nil)
(let ((outfile (org-export-output-file-name ".tex" subtreep pub-dir))) (org-export-to-file (quote e-latex) outfile subtreep visible-only body-only ext-plist))
org-e-latex-export-to-latex(nil nil nil nil nil)
(org-e-latex-compile (org-e-latex-export-to-latex subtreep visible-only body-only ext-plist pub-dir))
org-e-latex-export-to-pdf(nil nil nil)
(org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))
(cond ((eql --cl-var-- (quote 113)) nil) ((member* --cl-var-- (quote (65 78 85))) (require (quote org-e-ascii)) (let ((outbuf (org-export-to-buffer (quote e-ascii) "*Org E-ASCII Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset ...))))) (with-current-buffer outbuf (text-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((member* --cl-var-- (quote (97 110 117))) (require (quote org-e-ascii)) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key (97 ...) (110 ...) (t ...))))))) ((eql --cl-var-- (quote 76)) (require (quote org-e-latex)) (let ((outbuf (org-export-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (with-current-buffer outbuf (latex-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((eql --cl-var-- (quote 108)) (require (quote org-e-latex)) (org-e-latex-export-to-latex (require (quote org-e-latex)) (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 112)) (require (quote org-e-latex)) (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 100)) (require (quote org-e-latex)) (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 72)) (require (quote org-e-html)) (let ((outbuf (org-export-to-buffer (quote e-html) "*Org E-HTML Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (with-current-buffer outbuf (if (featurep (quote nxhtml-mode)) (nxhtml-mode) (nxml-mode))) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((eql --cl-var-- (quote 104)) (require (quote org-e-html)) (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 98)) (require (quote org-e-html)) (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 111)) (require (quote org-e-odt)) (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 79)) (require (quote org-e-odt)) (org-open-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 70)) (require (quote org-e-publish)) (org-e-publish-current-file (memq (quote force) optns))) ((eql --cl-var-- (quote 80)) (require (quote org-e-publish)) (org-e-publish-current-project (memq (quote force) optns))) ((eql --cl-var-- (quote 88)) (require (quote org-e-publish)) (let ((project (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org-e-publish project (memq (quote force) optns)))) ((eql --cl-var-- (quote 69)) (require (quote org-e-publish)) (org-e-publish-all (memq (quote force) optns))) (t (error "No command associated with key %s" (char-to-string raw-key))))
(let ((--cl-var-- (if (< raw-key 27) (+ raw-key 96) raw-key))) (cond ((eql --cl-var-- (quote 113)) nil) ((member* --cl-var-- (quote (65 78 85))) (require (quote org-e-ascii)) (let ((outbuf (org-export-to-buffer (quote e-ascii) "*Org E-ASCII Export*" (memq ... optns) (memq ... optns) (memq ... optns) (\` ...)))) (with-current-buffer outbuf (text-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((member* --cl-var-- (quote (97 110 117))) (require (quote org-e-ascii)) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key ... ... ...)))))) ((eql --cl-var-- (quote 76)) (require (quote org-e-latex)) (let ((outbuf (org-export-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq ... optns) (memq ... optns) (memq ... optns)))) (with-current-buffer outbuf (latex-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((eql --cl-var-- (quote 108)) (require (quote org-e-latex)) (org-e-latex-export-to-latex (require (quote org-e-latex)) (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 112)) (require (quote org-e-latex)) (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 100)) (require (quote org-e-latex)) (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 72)) (require (quote org-e-html)) (let ((outbuf (org-export-to-buffer (quote e-html) "*Org E-HTML Export*" (memq ... optns) (memq ... optns) (memq ... optns)))) (with-current-buffer outbuf (if (featurep (quote nxhtml-mode)) (nxhtml-mode) (nxml-mode))) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((eql --cl-var-- (quote 104)) (require (quote org-e-html)) (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 98)) (require (quote org-e-html)) (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 111)) (require (quote org-e-odt)) (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 79)) (require (quote org-e-odt)) (org-open-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 70)) (require (quote org-e-publish)) (org-e-publish-current-file (memq (quote force) optns))) ((eql --cl-var-- (quote 80)) (require (quote org-e-publish)) (org-e-publish-current-project (memq (quote force) optns))) ((eql --cl-var-- (quote 88)) (require (quote org-e-publish)) (let ((project (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org-e-publish project (memq (quote force) optns)))) ((eql --cl-var-- (quote 69)) (require (quote org-e-publish)) (org-e-publish-all (memq (quote force) optns))) (t (error "No command associated with key %s" (char-to-string raw-key)))))
(case (if (< raw-key 27) (+ raw-key 96) raw-key) (113 nil) ((65 78 85) (require (quote org-e-ascii)) (let ((outbuf (org-export-to-buffer (quote e-ascii) "*Org E-ASCII Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset ...))))) (with-current-buffer outbuf (text-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((97 110 117) (require (quote org-e-ascii)) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key (97 ...) (110 ...) (t ...))))))) (76 (require (quote org-e-latex)) (let ((outbuf (org-export-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (with-current-buffer outbuf (latex-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) (108 (require (quote org-e-latex)) (org-e-latex-export-to-latex (require (quote org-e-latex)) (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (112 (require (quote org-e-latex)) (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (100 (require (quote org-e-latex)) (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (72 (require (quote org-e-html)) (let ((outbuf (org-export-to-buffer (quote e-html) "*Org E-HTML Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (with-current-buffer outbuf (if (featurep (quote nxhtml-mode)) (nxhtml-mode) (nxml-mode))) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) (104 (require (quote org-e-html)) (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (98 (require (quote org-e-html)) (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (111 (require (quote org-e-odt)) (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (79 (require (quote org-e-odt)) (org-open-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (70 (require (quote org-e-publish)) (org-e-publish-current-file (memq (quote force) optns))) (80 (require (quote org-e-publish)) (org-e-publish-current-project (memq (quote force) optns))) (88 (require (quote org-e-publish)) (let ((project (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org-e-publish project (memq (quote force) optns)))) (69 (require (quote org-e-publish)) (org-e-publish-all (memq (quote force) optns))) (t (error "No command associated with key %s" (char-to-string raw-key))))
(let* ((input (org-export-dispatch-ui (if (listp org-export-initial-scope) org-export-initial-scope (list org-export-initial-scope)) org-export-dispatch-use-expert-ui)) (raw-key (car input)) (optns (cdr input))) (case (if (< raw-key 27) (+ raw-key 96) raw-key) (113 nil) ((65 78 85) (require (quote org-e-ascii)) (let ((outbuf (org-export-to-buffer (quote e-ascii) "*Org E-ASCII Export*" (memq ... optns) (memq ... optns) (memq ... optns) (\` ...)))) (with-current-buffer outbuf (text-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((97 110 117) (require (quote org-e-ascii)) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key ... ... ...)))))) (76 (require (quote org-e-latex)) (let ((outbuf (org-export-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq ... optns) (memq ... optns) (memq ... optns)))) (with-current-buffer outbuf (latex-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) (108 (require (quote org-e-latex)) (org-e-latex-export-to-latex (require (quote org-e-latex)) (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (112 (require (quote org-e-latex)) (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (100 (require (quote org-e-latex)) (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (72 (require (quote org-e-html)) (let ((outbuf (org-export-to-buffer (quote e-html) "*Org E-HTML Export*" (memq ... optns) (memq ... optns) (memq ... optns)))) (with-current-buffer outbuf (if (featurep (quote nxhtml-mode)) (nxhtml-mode) (nxml-mode))) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) (104 (require (quote org-e-html)) (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (98 (require (quote org-e-html)) (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (111 (require (quote org-e-odt)) (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (79 (require (quote org-e-odt)) (org-open-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (70 (require (quote org-e-publish)) (org-e-publish-current-file (memq (quote force) optns))) (80 (require (quote org-e-publish)) (org-e-publish-current-project (memq (quote force) optns))) (88 (require (quote org-e-publish)) (let ((project (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org-e-publish project (memq (quote force) optns)))) (69 (require (quote org-e-publish)) (org-e-publish-all (memq (quote force) optns))) (t (error "No command associated with key %s" (char-to-string raw-key)))))
org-export-dispatch()
call-interactively(org-export-dispatch)
--8<---------------cut here---------------end--------------->8---
FYI, before calling `M-x org-export-dispatch', I've required `org-e-latex' and
`org-export'.
Is there anything I've made wrong?
Best regards,
Seb
[1] On GNU Emacs 24.1.1 (i386-mingw-nt5.1.2600) of 2012-06-02 on MARVIN
with Org-mode version 7.8.11 (release_7.8.11-64-g168c83.dirty @ c:/home/sva/src/org-mode/lisp/)
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 6+ messages in thread