From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug? Highlighting inconsistent with export Date: Tue, 30 Aug 2016 12:08:07 +0200 Message-ID: <87eg56in7c.fsf@saiph.selenimh> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1befxn-0006BO-Jr for emacs-orgmode@gnu.org; Tue, 30 Aug 2016 06:08:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1befxh-00075l-Bl for emacs-orgmode@gnu.org; Tue, 30 Aug 2016 06:08:14 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:35510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1befxh-00075d-4m for emacs-orgmode@gnu.org; Tue, 30 Aug 2016 06:08:09 -0400 In-Reply-To: (=?utf-8?Q?=22Cl=C3=A9ment?= Pit--Claudel"'s message of "Mon, 29 Aug 2016 13:52:08 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: =?utf-8?Q?Cl=C3=A9ment?= Pit--Claudel Cc: emacs-orgmode@gnu.org Hello, Cl=C3=A9ment Pit--Claudel writes: > In the following snippets, I have marked which bits are syntax-highlighte= d as code, and which bits are exported as code. > > Some =E2=80=9C=3Dcode=3D=E2=80=9D [fn:: ~more~ ~of it~].= ~even more code~=E2=80=94 ~this~ =E2=80=94. > Highlighted? No Yes No No No > Exported? No Yes Yes No No > > Note the inconsistency in the footnote case. ~this~ isn't highlighted > because it's surrounded by non-breaking space. ~of it~ isn't > highlighted because of the =E2=80=98]=E2=80=99, but on export it does get= rendered as > code. > > Some suggestions: Paired delimiters and quotes, such as =E2=80=9C=E2=80= =9D =E2=80=98=E2=80=99 <> [], > could be allowed around code It could be hard to catch them all. > Spaces (including zero-width spaces) could also be allowed I have no objection to this. However, another option is to get rid of `org-emphasis-regexp-components', make every paired "=3D" character trigger verbatim mode and every paired "~" characters trigger code mode, but provide a way to escape "=3D" and "~". It should probably be extended to any emphasis markup and special characters like "|", "#"... There's more work involved, though. Regards, --=20 Nicolas Goaziou