joostkremers / pandoc-mode

An Emacs minor mode for interacting with Pandoc.
https://joostkremers.github.io/pandoc-mode/
174 stars 14 forks source link

Defaults file setting not passed as argument to pandoc command where converting to PDF #106

Closed hugoroy closed 2 years ago

hugoroy commented 2 years ago

Steps to reproduce:

  1. Create a markdown document
  2. Create a pandoc defaults settings yaml file
  3. Set the yaml file above as defaults file in pandoc-mode
  4. Convert the markdown to PDF

The pandoc-mode log shows that the following:

==================================================
Thu Aug 19 11:02:19 2021

Calling pandoc with:

pandoc --read=markdown --write=latex --output=/home/hugo/temp//debug-pandoc-mode.pdf

debug-pandoc-mode.md: pandoc finished successfully

Expecting a --defaults=/home/hugo/temp//debug-pandoc-mode.yaml but it's missing.

Whereas the settings file saved shows that the defaults file setting is well recorded by pandoc-mode:

;; -*- mode: emacs-lisp -*-

;; pandoc-mode local settings file for debug-pandoc-mode.md
;; saved on 2021.08.19 11:05

((latexmathml)
[...]
 (defaults . "debug-pandoc-mode.yaml")
[...]
 (master-file))

I'm using

hugoroy commented 2 years ago

The markdown file:

debug-pandoc-mode.md

The yaml file (can't be uploaded to GIthub):

from: markdown

pdf-engine: xelatex
joostkremers commented 2 years ago

Thanks for reporting this issue. It turns out that the defaults option was completely ignored. This should be fixed now.

hugoroy commented 2 years ago

Great :-) I will try Thanks for fixing and for all the work on pandoc-mode!