joostkremers / pandoc-mode

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

Setting options via buffer local variables do not update the visible settings #81

Open EmmanuelCharpentier opened 6 years ago

EmmanuelCharpentier commented 6 years ago

Thanks to this solved issue, I have been able to add some settings to a .md file :

<!-- Local Variables: -->
<!-- mode: markdown -->
<!-- markdown-command: "pandoc" -->
<!-- pandoc/read: "markdown" -->
<!-- pandoc/write: "latex" -->
<!-- pandoc/output: t -->
<!-- pandoc/standalone: t -->
<!-- eval: (pandoc-mode) -->
<!-- eval: (flyspell-mode) -->
<!-- End: -->

This works (i. e. I get a standalone .tex file, I can use pandoc-specific extensions, etc...). However, when I use the menu option 'Pandoc/View Current Settings`, I get this :

((read . "markdown")
 (write . "latex"))

The settings for output, standalone and so on, which are verifiably non-default, aren't updated in this display.

This discrepancy between what is done and what is shown is a boo-boo, but this inconsistency is ugly... Worth fixing ?

joostkremers commented 6 years ago

Commit f1fa01d3fd079a82c0561e6227b5e984910ec458 displays the file-local settings of options whose names start with pandoc/ when you view the current settings. This display should be improved a bit, because it's currently not clear what settings are actually in effect if an option is set through the menu (or from a settings file) and also as a file-local variable. (The latter takes precedence, but both values are shown.) But at least the file-local settings aren't ignored anymore.

If you run into any trouble, please let me know.