From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Org emphasis markers inside src blocks causes incorrect fontification Date: Thu, 16 Nov 2017 20:08:20 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11c012622d385f055e1f2f9d" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFQSg-0001ly-TE for emacs-orgmode@gnu.org; Thu, 16 Nov 2017 15:08:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFQSf-0003QC-DX for emacs-orgmode@gnu.org; Thu, 16 Nov 2017 15:08:34 -0500 Received: from mail-yw0-x22d.google.com ([2607:f8b0:4002:c05::22d]:41458) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eFQSf-0003PI-6E for emacs-orgmode@gnu.org; Thu, 16 Nov 2017 15:08:33 -0500 Received: by mail-yw0-x22d.google.com with SMTP id k3so191924ywk.8 for ; Thu, 16 Nov 2017 12:08:33 -0800 (PST) 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: emacs-org list --001a11c012622d385f055e1f2f9d Content-Type: text/plain; charset="UTF-8" Hello, I increase the number of consecutive lines to be parsed for Org emphasis to 20 lines using: ===== (setcar (nthcdr 4 org-emphasis-regexp-components) 20) ;Up to 20 lines, (org-set-emph-re 'org-emphasis-regexp-components org-emphasis-regexp-components) ===== With that set, I see that equal signs in source blocks falsely trigger the org-verbatim fontification. And I see this[1]. Notice the fontification in the attached image (link at bottom of this email).. The equal signs in the first src block initiate the org-verbatim fontification and that goes on till the equal signs in the next code block.. so Heading 2 shows up in org-verbatim face. Here is the test file: ===== * Heading 1 #+BEGIN_SRC nim let foo = 0 doAssert foo == 0 #+END_SRC ** Heading 2 #+BEGIN_SRC nim let bar = 0 doAssert bar == 0 #+END_SRC ===== Shouldn't the presence of org emphasis markers be ignored when inside src blocks? Org mode version 9.1.2 (release_9.1.2-202-g04e053 @ /home/kmodi/usr_local/apps/6/emacs/emacs-26/share/emacs/site-lisp/org/) I don't see this issue (or rather that issue is masked) if I evaluate: ===== (setcar (nthcdr 4 org-emphasis-regexp-components) 1) ;Back to default (org-set-emph-re 'org-emphasis-regexp-components org-emphasis-regexp-components) ===== [1]: https://i.imgur.com/6TmUoTS.png -- Kaushal Modi --001a11c012622d385f055e1f2f9d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

I increase the n= umber of consecutive lines to be parsed for Org emphasis to 20 lines using:=

=3D=3D=3D=3D=3D=C2=A0=C2=A0
=C2=A0(setcar (nthcdr 4 org-emphasis-regexp-components) 20) ;Up to 20 li= nes,=C2=A0 =C2=A0 =C2=A0(org-set-emph-re 'org-emphasis-regexp-component= s org-emphasis-regexp-components)
=3D=3D=3D=3D=3D=C2=A0
=C2=A0
With= that set, I see that equal signs in source blocks falsely trigger the org-= verbatim fontification. And I see this[1]. Notice the fontification in the = attached image (link at bottom of this email).. The equal signs in the firs= t src block initiate the org-verbatim fontification and that goes on till t= he equal signs in the next code block.. so Heading 2 shows up in org-verbat= im face.

Here is the test file:

=3D=3D=3D=3D=3D
* Heading 1
#+BEGIN_SR= C nim
let foo =3D 0
doAssert foo =3D=3D 0
#+E= ND_SRC
** Heading 2
#+BEGIN_SRC nim
let b= ar =3D 0
doAssert bar =3D=3D 0
#+END_SRC
=3D= =3D=3D=3D=3D

Shouldn't the presence = of org emphasis markers be ignored when inside src blocks?

Org mode version 9.1.2 (release_9.1.2-202-g04e053 @ /home/kmodi/us= r_local/apps/6/emacs/emacs-26/share/emacs/site-lisp/org/)
I don't see this issue (or rather that issue is masked) if = I evaluate:

=3D=3D=3D=3D=3D
= =C2=A0(setcar (nthcdr 4 org-emphasis-regexp-components) 1) ;Back to default=
=C2=A0(org-set-emph-re 'org-emphasis-regexp-components org-e= mphasis-regexp-components)
=3D=3D=3D=3D=3D

[1]: https://i.imgur.com/6TmUoTS.png
=
--

Kaushal Modi

--001a11c012622d385f055e1f2f9d--