emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: "Léo Ackermann" <leo.komba@gmail.com>, Timothy <tecosaur@gmail.com>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: [BUG] Conflict between org-emphasis and org-latex
Date: Sun, 26 Sep 2021 18:29:28 +0000	[thread overview]
Message-ID: <87ee9bchrr.fsf@posteo.net> (raw)
In-Reply-To: <CAFhsWEjFLHfvbvb8Rniue7fuTOLDeQXKBk_27G9-BiMQ-B4e=Q@mail.gmail.com> ("Léo Ackermann"'s message of "Sun, 26 Sep 2021 18:57:14 +0200")

Hi Léo and Timothy,

Léo Ackermann writes:

> [...]
> I think that this bug has been introduced recently (I
> never noticed it before)

I don't know if I'm pointing in the right direction, or I am missing
something, but I would say that this is a problem (or consequence) of
`org-emphasis-regexp-components'. According to the docstring, it is a list
with five parts:

("-[:space:]('\"{"
"-[:space:].,:!?;'\")}\\["
"[:space:]"
"."  ;; <<====
15)

where part 4, body-regexp, is: "A regexp like "." to match a body
character. Don’t use non-shy groups here, and don’t allow
newline here".

Therefore, the segment "} and {" is fontized here as emphasis

For a LaTeX fragment I think you can do:

(setq org-highlight-latex-and-related 'script)

According to the docstrip:

Non-nil means highlight LaTeX related syntax in the buffer.
When non-nil, the value should be a list containing any of the
following symbols:
  ‘native’   Highlight LaTeX snippets and environments natively.
  ‘latex’    Highlight LaTeX snippets and environments.
  ‘script’   Highlight subscript and superscript.
  ‘entities’ Highlight entities.

Best regards,

Juan Manuel


      parent reply	other threads:[~2021-09-26 18:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26 12:24 [BUG] Conflict between org-emphasis and org-latex Léo Ackermann
2021-09-26 12:57 ` Juan Manuel Macías
2021-09-26 16:57   ` Léo Ackermann
2021-09-26 17:01     ` Timothy
2021-09-26 17:05       ` Léo Ackermann
2021-09-26 17:07         ` Timothy
2021-09-30 14:48         ` Max Nikulin
2021-09-26 18:29     ` Juan Manuel Macías [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ee9bchrr.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=leo.komba@gmail.com \
    --cc=tecosaur@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).