GNU bug report logs - #28806
syntax highlighting in ox-odt and emacs26+ broken

Previous Next

Package: emacs;

Reported by: Jay Kamat <jaygkamat <at> gmail.com>

Date: Fri, 13 Oct 2017 06:30:02 UTC

Severity: normal

Tags: patch

Merged with 31718, 31734

Found in version 26.1

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28806 in the body.
You can then email your comments to 28806 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#28806; Package emacs. (Fri, 13 Oct 2017 06:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jay Kamat <jaygkamat <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 13 Oct 2017 06:30:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jay Kamat <jaygkamat <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: syntax highlighting in ox-odt and emacs26+ broken
Date: Fri, 13 Oct 2017 02:29:23 -0400
Hi!

I think 'francisv' from the #org-mode irc channel found a interesting
bug in emacs or org mode. I don't know enough about emacs internals to
figure out exactly what's going on, so I'll provide as much information
as I'm able to find out. I'm not entirely sure if this is an error in
org or in emacs, but since it's a complicated interaction between them
(and exists in the bundled version of org) I'm reporting it here.

orgmode syntax highlighting when exporting via ox-odt in emacs 26 seems
to be broken. This is not reproducible under emacs 25 at all. In
addition, this seems to be dependent on which emacs is compiling org to
bytecode.

Steps to Reproduce:
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)

Environments with broken syntax export:
1. Emacs26 when compiled from source, using builtin org
2. Emacs26 when org is compiled with Emacs 26 (from elpa/repo)

I tested all emacs versions on org 0b83168465, changing which version
org was compiled with by modifying the EMACS variable in local.mk in
org. I ran everything in ~emacs -Q~.

I attempted to bisect emacs to find which change in emacs is causing
this, bug I wasn't able to compile some older versions of emacs due to
internal bytecode errors preventing a clean compilation. I was able to
find that it was '14 revisions away from 5f3379b338' but I don't know if
that's helpful.

From what I can tell (which is probably incorrect), this seems like
either:

1. A bug in the new bytecode 
2. Some backwards-incompatible change to macros in emacs 26 that org
didn't pick up on.

In the latter case, the change should be added to the NEWS file as a
backwards incompatible change.

A stackexchange question about this is here:
https://emacs.stackexchange.com/questions/36023/how-to-export-babel-source-blocks-with-syntax-highlighting-to-odt-in-org-mode-in

I posted in the org mode mailing list about this to try to get some
initial feedback from orgmode before posting here:
http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00161.html

Please let me know if anyone has any questions or can't reproduce, and
apologies if anything is wrong about this report (I'm fairly new
here). 

I'm willing to put in time to fix this if needed, if someone can point
me in the right direction.

Thanks,
-Jay




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28806; Package emacs. (Fri, 13 Oct 2017 07:50:02 GMT) Full text and rfc822 format available.

Message #8 received at 28806 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jay Kamat <jaygkamat <at> gmail.com>
Cc: 28806 <at> debbugs.gnu.org
Subject: Re: bug#28806: syntax highlighting in ox-odt and emacs26+ broken
Date: Fri, 13 Oct 2017 10:49:13 +0300
> From: Jay Kamat <jaygkamat <at> gmail.com>
> 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)
> 
> Environments with broken syntax export:
> 1. Emacs26 when compiled from source, using builtin org
> 2. Emacs26 when org is compiled with Emacs 26 (from elpa/repo)
> 
> I tested all emacs versions on org 0b83168465, changing which version
> org was compiled with by modifying the EMACS variable in local.mk in
> org. I ran everything in ~emacs -Q~.
> 
> I attempted to bisect emacs to find which change in emacs is causing
> this, bug I wasn't able to compile some older versions of emacs due to
> internal bytecode errors preventing a clean compilation. I was able to
> find that it was '14 revisions away from 5f3379b338' but I don't know if
> that's helpful.
> 
> >From what I can tell (which is probably incorrect), this seems like
> either:
> 
> 1. A bug in the new bytecode 
> 2. Some backwards-incompatible change to macros in emacs 26 that org
> didn't pick up on.
> 
> In the latter case, the change should be added to the NEWS file as a
> backwards incompatible change.
> 
> A stackexchange question about this is here:
> https://emacs.stackexchange.com/questions/36023/how-to-export-babel-source-blocks-with-syntax-highlighting-to-odt-in-org-mode-in
> 
> I posted in the org mode mailing list about this to try to get some
> initial feedback from orgmode before posting here:
> http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00161.html

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.




Information forwarded to emacs-orgmode <at> gnu.org:
bug#28806; Package org-mode. (Thu, 08 Feb 2018 23:04:02 GMT) Full text and rfc822 format available.

Message #11 received at 28806 <at> debbugs.gnu.org (full text, mbox):

From: pierre.techoueyres <at> free.fr (Pierre Téchoueyres)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 28806 <at> debbugs.gnu.org, Jay Kamat <jaygkamat <at> gmail.com>
Subject: Re: bug#28806: syntax highlighting in ox-odt and emacs26+ broken
Date: Fri, 09 Feb 2018 00:03:31 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Jay Kamat <jaygkamat <at> gmail.com>
>> 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




Information forwarded to emacs-orgmode <at> gnu.org:
bug#28806; Package org-mode. (Fri, 09 Feb 2018 08:58:01 GMT) Full text and rfc822 format available.

Message #14 received at 28806 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: pierre.techoueyres <at> free.fr (Pierre Téchoueyres)
Cc: 28806 <at> debbugs.gnu.org, jaygkamat <at> gmail.com
Subject: Re: bug#28806: syntax highlighting in ox-odt and emacs26+ broken
Date: Fri, 09 Feb 2018 10:57:05 +0200
> From: pierre.techoueyres <at> free.fr (Pierre Téchoueyres)
> Cc: Jay Kamat <jaygkamat <at> gmail.com>,  28806 <at> debbugs.gnu.org
> Date: Fri, 09 Feb 2018 00:03:31 +0100
> 
> > 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 ?

No, I don't think so.  All of the above can be the result of some Org
specific problem.  That's why I suggested that the Org developers look
into this issue first.




bug reassigned from package 'org-mode' to 'emacs'. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 06 Jun 2018 21:53:01 GMT) Full text and rfc822 format available.

Merged 28806 31718 31734. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 06 Jun 2018 21:53:02 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 12 Jun 2018 22:23:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 16 Jul 2018 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.