all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Org-mode blocks multiline fontification performance
@ 2021-06-23 18:41 Sébastien Miquel
  2021-06-24  6:12 ` Jean Louis
  0 siblings, 1 reply; 4+ messages in thread
From: Sébastien Miquel @ 2021-06-23 18:41 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

Org allows the use of special blocks such as

#+begin_proof
Some LaTeX fragments in here: $a^2 + b^2 = c^2$.
#+end_proof

that may be exported to matching LaTeX environments.

We want some light fontification of such blocks:
  1. *Matching* #+begin and #+end lines should be fontified
  2. Some background color face should be applied to the inside of the 
block.
     (This isn't actually currently the case for such special blocks, 
but applies
     for other blocks)

It is currently implemented by adding the `font-lock-multiline' property 
to the
block.

When the inside of the block is modified, the region to refontify is 
extended to
the whole block (the multiline region), and the whole block is refontified.

The issue is that
  + the block may be quite large
  + the LaTeX fragment fontification can be quite expensive.

For very large blocks, this makes emacs unusable, and for smaller 
blocks, it can
still incur some noticeable delay.

Is there a better way to achieve 1. and 2. ?
If not, how about 2. only ?

Regards,

-- 
Sébastien Miquel




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

end of thread, other threads:[~2021-06-24  6:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-23 18:41 Org-mode blocks multiline fontification performance Sébastien Miquel
2021-06-24  6:12 ` Jean Louis
2021-06-24  6:26   ` Sébastien Miquel
2021-06-24  6:38     ` Jean Louis

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.