emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tom Gillespie <tgbugs@gmail.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: Tim Cross <theophilusx@gmail.com>,
	Org-mode <emacs-orgmode@gnu.org>,
	Arthur Miller <arthur.miller@live.com>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Font lock in org+elisp confused with ?\[
Date: Fri, 2 Apr 2021 15:59:41 -0700	[thread overview]
Message-ID: <CA+G3_PPzwiCwra9paOSNH40Z13AnoRc25OTemAAEvsD-5pfbrg@mail.gmail.com> (raw)
In-Reply-To: <CAJ51ETpah5QXNBTZW8tU246r639RdKERJisV4Z4t1GiPH9b3MA@mail.gmail.com>

Reposting my reply to the emacs-devel thread here as well. The hack I
mention that has performance issues was derived from John's solution
for the <> issue (though the performance issues are all of my own
creation). Best,

This is a known issue with org babel blocks. It is due to the fact
that org babel translates the font locking for the language but not
the syntax propertization. Another frequent cause is the bash case
statement. The end result is that unmatched parens leak out from the
babel blocks and wreak havoc elsewhere in the org file unless you
balance out the parens e.g. in a comment. I have a hacked fix for
this, but it has horrible performance, especially with line numbers
enabled. I think that a proper solution would run arbitrary syntax
propertization on subsets of a buffer without having to continually
check where those subsets start or end.

  reply	other threads:[~2021-04-02 23:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AM9PR09MB497740C52C6EE5A5680C9D84967B9@AM9PR09MB4977.eurprd09.prod.outlook.com>
2021-04-02  4:23 ` Font lock in org+elisp confused with ?\[ Tim Cross
2021-04-02 13:03   ` John Kitchin
2021-04-02 22:59     ` Tom Gillespie [this message]
2021-04-03 18:38     ` Arthur Miller

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:

  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=CA+G3_PPzwiCwra9paOSNH40Z13AnoRc25OTemAAEvsD-5pfbrg@mail.gmail.com \
    --to=tgbugs@gmail.com \
    --cc=arthur.miller@live.com \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    --cc=theophilusx@gmail.com \


* 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


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).