emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org emphasis markers inside src blocks causes incorrect fontification
@ 2017-11-16 20:08 Kaushal Modi
  2017-11-16 21:47 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Kaushal Modi @ 2017-11-16 20:08 UTC (permalink / raw)
  To: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2106 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-25 14:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-16 20:08 Org emphasis markers inside src blocks causes incorrect fontification Kaushal Modi
2017-11-16 21:47 ` Nicolas Goaziou
2017-11-16 21:56   ` Kaushal Modi
2017-11-17 23:30     ` Nicolas Goaziou
2017-11-20 17:34       ` Kaushal Modi
2017-11-25 14:42         ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).