From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jay Kamat Newsgroups: gmane.emacs.bugs Subject: bug#28806: syntax highlighting in ox-odt and emacs26+ broken Date: Fri, 13 Oct 2017 02:29:23 -0400 Message-ID: <87wp3za7cs.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1507876223 5567 195.159.176.226 (13 Oct 2017 06:30:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Oct 2017 06:30:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) To: 28806@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 13 08:30:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2tU2-0008DF-6x for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Oct 2017 08:30:10 +0200 Original-Received: from localhost ([::1]:48600 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2tU8-0007Js-2K for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Oct 2017 02:30:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2tU1-0007GX-Gk for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 02:30:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2tTv-0001VV-H0 for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 02:30:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56186) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2tTv-0001VL-Co for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 02:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e2tTv-0007tb-5a for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 02:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jay Kamat Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Oct 2017 06:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150787618830293 (code B ref -1); Fri, 13 Oct 2017 06:30:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Oct 2017 06:29:48 +0000 Original-Received: from localhost ([127.0.0.1]:36634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2tTc-0007sQ-2O for submit@debbugs.gnu.org; Fri, 13 Oct 2017 02:29:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2tTW-0007s2-V5 for submit@debbugs.gnu.org; Fri, 13 Oct 2017 02:29:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2tTQ-0001DU-It for submit@debbugs.gnu.org; Fri, 13 Oct 2017 02:29:33 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35910) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e2tTQ-0001DJ-Fm for submit@debbugs.gnu.org; Fri, 13 Oct 2017 02:29:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2tTP-0006os-20 for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 02:29:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2tTL-00019h-2G for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 02:29:31 -0400 Original-Received: from mail-qt0-x22e.google.com ([2607:f8b0:400d:c0d::22e]:43701) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2tTK-00018m-Tc for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 02:29:26 -0400 Original-Received: by mail-qt0-x22e.google.com with SMTP id j58so6726604qtj.0 for ; Thu, 12 Oct 2017 23:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=AJHQ/sYa3sQuzAhwVd8OdTFSeN0ES2ePF5JEXy4IjVY=; b=ZywBKA/k9Ilh1HDmpHafjxvtpHLEBmKfPdk4hyoGoscJf5lx7S33vtk6VfhOMwymPF ftrh6Nwp9xq0dV5NzHUX5T5Mq7tZupczTh84J/3fh1LZ/cGsBRrZClHBGhNWnNfNc699 mcbw7kqfphC9rMCnIVzh5bcL3UNxuwCA2oSKSUnhkH4nAddPCDrZ7BQt2g8i/zbKyGQ2 nyy/Yp/rd1xOkKc+5x8P+S3HiuTNDDBBQUsMlV3SVtoDikANXw21g+Gf1oAecRLpmmJx lqG/lMxvDJ/V6nHbGZJrlUxE3yIdatk/8RyOXEVzNV0KAbHK5Ovj4s/GGOAO4dOONS3k dQRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=AJHQ/sYa3sQuzAhwVd8OdTFSeN0ES2ePF5JEXy4IjVY=; b=ibTxkhAOJwiPoW9EKXO/vXA2ocXLJGk9942IfkdyPZr+nINVxTf0VxWs743XIUuGWU oRrb6+CtUi9HuoDg4bObFvk53lmkcDtYc5+r/VU0j8952c0LxO7Q/k136MxsEkHn0gTH meWjLsMND05xy932qRjlsyg3ZML6pwn+6TPhi71cZlbNQXzs/igcLbWHU9dfl4iM+Bx+ N6xcDTFRODUAIZs9/bQyA3w+stR/4XJhZ/DmI3HKyRdz33+rpHY/mBgqM6IqiCN1rVRN EEKnwvC/Z3QsU8Nrtk4F2g5Ay0UrGYHSB5v/JSn0jwV0AMNTo8qqVS0IOixt8hq7V1wo aJTw== X-Gm-Message-State: AMCzsaXKNppdAnFqmXCwSRjrJYnwyollK8pjx4/Vq0kxAf8qs6DOOG44 F9zbGuTWyajId0X0jWoqYpmpiCvD X-Google-Smtp-Source: AOwi7QBEbdFYWYSZvw9Z5CiaWDXmS+vcrlHBF4wXCMQj1vxh2JtGKfWG+YL+R4BwnQO5iVkhDT2PMQ== X-Received: by 10.129.5.14 with SMTP id 14mr246387ywf.463.1507876164618; Thu, 12 Oct 2017 23:29:24 -0700 (PDT) Original-Received: from laythe (res404s-128-61-104-57.res.gatech.edu. [128.61.104.57]) by smtp.gmail.com with ESMTPSA id p188sm114093ywb.53.2017.10.12.23.29.23 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Oct 2017 23:29:23 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138321 Archived-At: 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