Open mnsanghvi opened 3 years ago
Same problem.
If I try org-pandoc-export-to-latex-pdf
I get the message: org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export
.
The debug trace I get is
Debugger entered--Lisp error: (error "Unknown \"nil\" back-end: Aborting export")
error("Unknown \"%s\" back-end: Aborting export" nil)
org-export-barf-if-invalid-backend(nil)
org-export-as(pandoc nil nil nil (:output-file "20221010141137-domain_specific_type_theory_for_fin..."))
org-export-to-file(pandoc "20221010141137-domain_specific_type_theory_for_fin..." nil nil nil nil nil #f(compiled-function (f) #<bytecode -0x1420d39f899a4f56>))
org-pandoc-export(latex-pdf nil nil nil nil nil)
org-pandoc-export-to-latex-pdf()
(debug (org-pandoc-export-to-latex-pdf))
eval-expression((debug (org-pandoc-export-to-latex-pdf)) nil nil 127)
funcall-interactively(eval-expression (debug (org-pandoc-export-to-latex-pdf)) nil nil 127)
command-execute(eval-expression)
My ox-pandoc config is:
(use-package ox-pandoc
:ensure t
:after org
:config
(with-eval-after-load 'ox
(require 'ox-pandoc)))
A workaround is to add
(org-export-define-derived-backend 'pandoc 'org
:translate-alist '((entity . org-pandoc-entity)
(export-block . org-pandoc-export-block)
(export-snippet . org-pandoc-export-snippet)
(latex-environment . org-pandoc-latex-environ)
(link . org-pandoc-link)
(paragraph . org-pandoc-paragraph)
(src-block . org-pandoc-src-block)
(table . org-pandoc-table)
(template . org-pandoc-template))
;; :export-block "PANDOC"
:menu-entry
`(?p "export via pandoc"
,org-pandoc-menu-entry)
:options-alist
'((:pandoc-options "PANDOC_OPTIONS" nil nil space)
(:pandoc-extensions "PANDOC_EXTENSIONS" nil nil space)
(:pandoc-metadata "PANDOC_METADATA" nil nil space)
(:pandoc-variables "PANDOC_VARIABLES" nil nil space)
(:epub-chapter-level "EPUB_CHAPTER_LEVEL" nil nil t)
(:epub-cover-image "EPUB_COVER" nil nil t)
(:epub-stylesheet "EPUB_STYLESHEET" nil nil t)
(:epub-embed-font "EPUB_EMBED_FONT" nil nil newline)
(:epub-meta "EPUB_META" nil nil newline)
(:epub-css "EPUB_CSS" nil nil newline)
(:epub-rights "EPUB_RIGHTS" nil nil newline)
(:bibliography "BIBLIOGRAPHY")))
after you set org-pandoc-menu-entry in your :config section.
The issue is that
`(?p "export via pandoc"
,org-pandoc-menu-entry)
is effectively "inlining" the value of the defcustom, so changing its value has no effect. An easy fix in the code is to use a function that access that value instead of inlining the variable.
When I use the Export Dispatcher using
C-c C-e
I do not see the menu entries for what I have enabled. I only see the default value in the dispatcher menu list. Even when I do(setq org-pandoc-menu-entry nil)
, I still see the defaul menu entries for ox-pandoc. Am I doing something incorrectly ?I have the following setup for
ox-pandoc
I have tried using
:init
as well as using:config
for theuse-package
stanza above. In neither case does it work. I have commented out code that I have tried using but did not yield expected results.Output of
C-h v org-pandoc-menu-entry