Closed pdehne closed 1 year ago
The following is working. It forces pandoc-data-dir to be evaluated to a literal string in org-pandoc-options. I am not sure why this is needed, but that is not your problem :-) Feel free to close the issue!
(use-package ox-pandoc
:ensure t
:after (:any org)
:config
(setq org-pandoc-options '((standalone . t)))
(let ((pandoc-data-dir (expand-file-name "~/.pandoc")))
(setq org-pandoc-options (append org-pandoc-options `((data-dir . ,pandoc-data-dir))))))
Patrick Dehne @.***> writes:
(org-pandoc-options '((standalone . t) (data-dir . (expand-file-name "~/.pandoc")))))
You use literal quote here. So "(expand-file-name ...)" is not evaluated, but instead used as is. You may instead use backquote for selective evaluation:
((standalone . t) (data-dir . ,(expand-file-name "~/.pandoc")))
.
-- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92
I am trying to set the data-dir option to a folder in the users home directory. When I try to determine the folder using lisp, the provided lisp code is directly copied to the executed pandoc command.
I tried a few ways to set data-dir:
I see in the Messages buffer:
This is also not working, the ~ is not substituted with the home directory when the pandoc command is run:
I see in the Messages buffer:
The following is working, but I would rather not hardcode the folder if at all possible:
I see in the Messages buffer: