Hello, Achim Gratz <strom...@nexgo.de> writes:
> I'm exporting an Org file in UTF-8 to LaTeX. Unless I switch the coding > system > in Emacs from "default" to "UTF-8" (which has the side effect that any new > buffer will have UTF-8 coding, which is usually not what I want), the LaTeX > buffer gets created with ISO8859-1/latin-1 encoding (which is dead wrong, > because several characters in the document are in fact not representable in > that > encoding). Changing the option "Org Export Latex Coding System" to utf-8 > doesn't change how the LaTeX buffer gets created, but it will then helpfully > ask > when its time to save the buffer if I want to save it as UTF-8 (no, I want it > created with UTF-8, not changed to a different encoding on save). That > salvages > a few characters, but the larger damage of \usepackage[latin1]{inputenc} > doesn't > get changed of course. > > The coding system of any export buffers should by default follow the Org > buffer > they are created from and any changes to the coding system stipulated by > export > configuration must be applied before the buffer coding system gets used to > make > any decisions on how to export things. IIUC, there is no such thing as a coding system associated to a buffer. A coding system only kicks in when doing some I/O operation. Anyway, with the same context described above, what's the return value for: (detect-coding-string (org-export-as 'latex) t) in the buffer you want to export? Regards, -- Nicolas Goaziou