Re: Protect Org export from auto-formatting hooks

2022-02-28 Thread David Lukeš
Great, will do :) I realized at the last minute that some `save-buffer' calls in `ox-odt.el' also need to be amended separately (I was mostly testing these tweaks with HTML export, as it's faster / simpler). If it's problematic, we can have that discussion over the patch once I've submitted it.

Re: Protect Org export from auto-formatting hooks

2022-02-28 Thread Nicolas Goaziou
Hello, David Lukeš writes: > Thanks, that's indeed a much better way of doing it :) One can even > avoid the temp buffer altogether and write the `output' string > directly with `(write-region output nil file)`. Yup, even better. > Shall I prepare a patch? Or would you rather do it yourself,

Re: Protect Org export from auto-formatting hooks

2022-02-28 Thread David Lukeš
> What about using `write-region' instead of `write-file' and not touching > `set-auto-mode' function? Thanks, that's indeed a much better way of doing it :) One can even avoid the temp buffer altogether and write the `output' string directly with `(write-region output nil file)`. Shall I

Re: Protect Org export from auto-formatting hooks

2022-02-26 Thread Nicolas Goaziou
Hello, David Lukeš writes: > So I think Org should try to protect the export buffer from these > shenanigans as much as possible. The best way I can think of to achieve > that is to keep the export buffer in fundamental mode. This should > prevent all the mode-related code from running,

Protect Org export from auto-formatting hooks

2022-02-25 Thread David Lukeš
Hi all, I recently started using non-Pandoc Org exports to HTML and ODT and noticed some problems on my macOS 12.2.1 box. Non-ASCII characters were coming out garbled, the whitespace around footnotes was getting rewritten in weird ways. On my Linux boxes, the same export commands went fine, so I