Subject: bug#28806: syntax highlighting in ox-odt and emacs26+ broken

From: [email-masked] (Pierre Téchoueyres)
Date: Fri, 09 Feb 2018 00:03:31 +0100

Eli Zaretskii <[email-masked]> writes:

>> From: Jay Kamat <[email-masked]>
>> Date: Fri, 13 Oct 2017 02:29:23 -0400
>> 
>> 1. Compile Emacs *26* from source (emacs-26 branch)
>> 2. Load an org file with the following (built-in org):
>> 
>> #+BEGIN_SRC c
>> int main() {
>>     return 0;
>> }
>> #+END_SRC
>> 
>> 3. Export to odt via C-c C-e o o 
>> 4. Open file in libreoffice
>> 
>> Expected Results
>> 
>> Syntax highlighting for the code block as in emacs25
>> 
>> Actual Results
>> 
>> Code seems to be colored in a single color, interestingly, this is *not*
>> black.
>> 
>> (I can provide screenshots if that would be helpful)
>> 
>> After poking around, I found a bit more information on how to reproduce
>> it:
>> 
>> Environments with working syntax export:
>> 1. Emacs25, always (unless unrelated errors are present)
>> 2. Emacs26, when running org compiled with emacs 25 (from elpa/repo)
>> 3. Emacs26, when running org 'interpreted' (not compiled to bytecode)
>>
...
>
> Thanks.
>
> Having read all of the references and discussions you've provided, I
> see no evidence that this is an Emacs issue, as opposed to an Org
> issue.  I think the Org developers should take a look at this first,
> and only if they provide clear evidence that the problem is due to
> Emacs, should the problem come here.
>

Hi Eli,
I don't know if you noticed it but the fact that the uncompiled version
is working as expected or that an compiled one with an older emacs
(version 25 for example) tend to indicate a problem on the emacs side.

I can also add that forcing reevaluation of
`org-odt-do-format-code' solve the problem.

Can this be considered as an evidence that the problem is on the emacs
side ?

regards,

Pierre