From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Org emphasis markers inside src blocks causes incorrect fontification Date: Thu, 16 Nov 2017 22:47:26 +0100 Message-ID: <87bmk1vqtt.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFS0V-0003MW-BA for emacs-orgmode@gnu.org; Thu, 16 Nov 2017 16:47:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFS0Q-0007uN-Fk for emacs-orgmode@gnu.org; Thu, 16 Nov 2017 16:47:35 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:50528) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eFS0Q-0007tl-9r for emacs-orgmode@gnu.org; Thu, 16 Nov 2017 16:47:30 -0500 In-Reply-To: (Kaushal Modi's message of "Thu, 16 Nov 2017 20:08:20 +0000") 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: Kaushal Modi Cc: emacs-org list Hello, Kaushal Modi writes: > 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. [...] > Shouldn't the presence of org emphasis markers be ignored when inside src > blocks? It should. Note that current fontification system only approximates the syntax of the Org document. There are certainly more bugs like this one lurking in the shadows. At the moment, my suggestion would be to not mess with `org-emphasis-regexp-components'. Regards, -- Nicolas Goaziou