emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [New exporter] Wrong export to LaTeX
Date: Thu, 11 Oct 2012 18:52:32 +0200	[thread overview]
Message-ID: <20121011165232.GB15182@kuru.dyndns-at-home.com> (raw)
In-Reply-To: <87bog9401p.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

Hi Nicolas,

On Thu, Oct 11, 2012 at 03:21:06PM +0200, Nicolas Goaziou wrote:
> 
> 
> Hello,
> 
> "Sebastien Vauban"
> <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
> 
> > When I try to export the following ECM:
> >
> > #+LaTeX_CLASS: beamer
> > #+LaTeX_CLASS_OPTIONS: [presentation]
> 
> [...]
> 
> > Notable differences:
> >
> > - No frames are created!?
> > - (detail) PDFCreator is not set to Org-mode blah-blah (wished like that?)
> >
> > Am I missing something?
> 
> That's because Beamer is now a back-end on its own, not a patch over the
> LaTeX one. In the old exporter, Beamer translation was triggered with
> #+latex_class: beamer. This is not necessary anymore.
> 
> All you have to do is to (require 'org-e-beamer) and use the appropriate
> entry in the dispatcher menu. You can have a Beamer translation on any
> class, including article and so on.
> 
> That's why (add-to-list 'org-e-latex-classes "beamer" ...) doesn't make
> much sense anyway (as suggested in another post).
> 

I believe you are refering to my minimal setup.  However when I try to
export to beamer (Seb's ECM) without the

  (add-to-list 'org-e-latex-classes '("beamer" ...))

bit, I get a backtrace (attached).  Is that a bug?

-- 
Suvayu

Open source is the future. It sets us free.

[-- Attachment #2: debug.log --]
[-- Type: text/plain, Size: 13702 bytes --]

Debugger entered--Lisp error: (void-function org-macro-initialize-templates)
  (org-macro-initialize-templates)
  org-export-expand-macro((:author ("Suvayu Ali") :creator "Generated by Org mode 7.9.2 in Emacs 24.2.50.1." :date ((latex-fragment (:value "\\today" :begin 1 :end 7 :post-blank 0 :parent nil))) :description nil :email "jallad@kuru.dyndns-at-home.com" :exclude-tags ("noexport") :headline-levels 2 :keywords nil :language "en" :preserve-breaks nil :section-numbers t :select-tags ("export") :time-stamp-file t :title "beamer-test" :with-archived-trees headline :with-author t :with-clocks nil :with-creator comment :with-drawers nil :with-email nil :with-emphasize t :with-entities t :with-fixed-width t :with-footnotes t :with-inlinetasks t ...))
  (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let ((org-current-export-file buf)) (org-export-blocks-preprocess)))
  (progn (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (org-element-parse-buffer nil visible-only))
  (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (org-element-parse-buffer nil visible-only)))
  (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (org-element-parse-buffer nil visible-only))))
  (unwind-protect (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (org-element-parse-buffer nil visible-only)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- ... --offset) (- ... --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let (...) (org-export-blocks-preprocess))) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (org-element-parse-buffer nil visible-only)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (with-current-buffer temp-buffer (unwind-protect (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- ... --offset) (- ... --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let (...) (org-export-blocks-preprocess))) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (org-element-parse-buffer nil visible-only)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-buffer temp-buffer (unwind-protect (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov ... ... ...)) --overlays) (goto-char (point-min)) (progn (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let ... ...)) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (org-element-parse-buffer nil visible-only)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (with-temp-buffer (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (org-element-parse-buffer nil visible-only))))
  (let ((--original-buffer (current-buffer)) (--offset (1- (point-min))) (--buffer-string (buffer-string)) (--overlays (mapcar (quote copy-overlay) (overlays-in (point-min) (point-max))))) (with-temp-buffer (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (org-element-parse-buffer nil visible-only)))))
  (org-export-with-current-buffer-copy (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (org-element-parse-buffer nil visible-only))
  (let ((buf (or (buffer-file-name (buffer-base-buffer)) (current-buffer)))) (org-export-with-current-buffer-copy (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (org-element-parse-buffer nil visible-only)))
  (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 (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let (...) (org-export-blocks-preprocess))) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (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))) (if org-export-copy-to-kill-ring (progn (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 (if noexpand nil (org-export-expand-include-keyword) (org-update-radio-target-regexp) (org-export-expand-macro info) (let ... ...)) (goto-char (point-min)) (run-hook-with-args (quote org-export-before-parsing-hook) backend) (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))) (if org-export-copy-to-kill-ring (progn (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 (if noexpand nil ... ... ... ...) (goto-char ...) (run-hook-with-args ... backend) (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))) (if org-export-copy-to-kill-ring (progn (org-kill-new output))) output))))
  org-export-as(e-beamer nil nil nil nil nil)
  (let ((out (org-export-as backend subtreep visible-only body-only ext-plist noexpand))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert out) (let ((coding-system-for-write org-export-coding-system)) (write-file file))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
  org-export-to-file(e-beamer "/home/jallad/tmp/org-test/beamer-test.tex" nil nil nil nil)
  (let ((outfile (org-export-output-file-name ".tex" subtreep pub-dir))) (org-export-to-file (quote e-beamer) outfile subtreep visible-only body-only ext-plist))
  org-e-beamer-export-to-latex(nil nil nil nil nil)
  (org-e-latex-compile (org-e-beamer-export-to-latex subtreep visible-only body-only ext-plist pub-dir))
  org-e-beamer-export-to-pdf(nil nil nil)
  funcall(org-e-beamer-export-to-pdf nil nil nil)
  (cond ((eql action (quote publish-current-file)) (org-e-publish-current-file (memq (quote force) optns))) ((eql action (quote publish-current-project)) (org-e-publish-current-project (memq (quote force) optns))) ((eql action (quote publish-choose-project)) (org-e-publish (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist) (memq (quote force) optns))) ((eql action (quote publish-all)) (org-e-publish-all (memq (quote force) optns))) (t (funcall action (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))))
  (let* ((input (org-export-dispatch-ui (list org-export-initial-scope) nil org-export-dispatch-use-expert-ui)) (action (car input)) (optns (cdr input))) (cond ((eql action (quote publish-current-file)) (org-e-publish-current-file (memq (quote force) optns))) ((eql action (quote publish-current-project)) (org-e-publish-current-project (memq (quote force) optns))) ((eql action (quote publish-choose-project)) (org-e-publish (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist) (memq (quote force) optns))) ((eql action (quote publish-all)) (org-e-publish-all (memq (quote force) optns))) (t (funcall action (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))))
  org-export-dispatch()
  call-interactively(org-export-dispatch record nil)
  command-execute(org-export-dispatch record)
  execute-extended-command(nil "org-export-dispatch")
  call-interactively(execute-extended-command nil nil)

  reply	other threads:[~2012-10-11 16:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11 13:04 [New exporter] Wrong export to LaTeX Sebastien Vauban
2012-10-11 13:21 ` Nicolas Goaziou
2012-10-11 16:52   ` Suvayu Ali [this message]
2012-10-11 17:54     ` Nicolas Goaziou
2012-10-12 10:24       ` Suvayu Ali
2012-10-12 11:06         ` Sebastien Vauban
2012-10-12 11:32           ` Sebastien Vauban
2012-10-12 11:51             ` Nicolas Goaziou
2012-10-12 12:15             ` Suvayu Ali
2012-10-12 12:05           ` Suvayu Ali
2012-10-15 20:23             ` Sebastien Vauban
2012-10-15 20:42               ` Nicolas Goaziou
2012-10-16  7:49                 ` Sebastien Vauban
2012-10-12 12:09         ` Nicolas Goaziou
2012-10-12 12:19           ` Suvayu Ali
2012-10-11 13:45 ` Suvayu Ali
2012-10-11 14:41   ` Sebastien Vauban
2012-10-11 15:35     ` Suvayu Ali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121011165232.GB15182@kuru.dyndns-at-home.com \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).