all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [DISCUSSION] Refactoring fontification system
@ 2021-11-19 14:12 Ihor Radchenko
  2021-11-19 14:18 ` Bruce D'Arcus
                   ` (3 more replies)
  0 siblings, 4 replies; 29+ messages in thread
From: Ihor Radchenko @ 2021-11-19 14:12 UTC (permalink / raw)
  To: emacs-orgmode

Dear all,

Recently, there have been multiple issues related to incorrect
fontification:
- https://list.orgmode.org/orgmode/23707.20428.546749.44853@frac.u-strasbg.fr/
- https://list.orgmode.org/orgmode/87fsujp7mc.fsf@web.de/
- https://list.orgmode.org/orgmode/87czvqxdn9.fsf@gmail.com/
- https://list.orgmode.org/8735nsv9qo.fsf@nicolasgoaziou.fr/T/#me1c44b6e493dd280cca4f042b833c24749ae4fe0

These issues keep appearing because our current fontification code is
based on regexps and only approximates the actual Org grammar elements.
It is largely a legacy from the times when org-element parser was not a
thing.

Maybe it is a time to upgrade the fontification according to our
state-of-art parser?

Instead of fontifying elements individually via regexps, we can leverage
org-element-map, org-element-parse-buffer, org-element-cache, and
jit-lock-mode. Each type of Org element/object can be assigned with a
fontification function accepting a single argument - the element datum.

Also, the fontification code can be move to a separate library.

WDYT?

Best,
Ihor



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

end of thread, other threads:[~2024-04-15 14:25 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-19 14:12 [DISCUSSION] Refactoring fontification system Ihor Radchenko
2021-11-19 14:18 ` Bruce D'Arcus
2021-11-19 16:09 ` Tim Cross
2021-11-24 22:03 ` Nicolas Goaziou
2022-06-03  9:45 ` Ihor Radchenko
2022-06-03 20:37   ` Ted Reed via General discussions about Org-mode.
2022-06-04 13:45     ` Ihor Radchenko
2022-06-04 23:28       ` Ted Reed via General discussions about Org-mode.
2022-06-03 21:38   ` Tim Cross
2022-06-07 16:48   ` Max Nikulin
2022-06-08  2:02     ` Ihor Radchenko
2022-06-08  4:23       ` Tom Gillespie
2022-06-08  6:35         ` Tim Cross
2022-06-09 15:31         ` Max Nikulin
2022-06-10  2:06           ` [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system) Ihor Radchenko
2022-06-15  3:40             ` Max Nikulin
2022-06-16 12:31               ` Ihor Radchenko
2022-06-16 12:33               ` [BUG] Unescaped #+ lines in WORG example blocks (was: [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system)) Ihor Radchenko
2022-06-16 16:33                 ` Tim Cross
2024-04-15 13:44                 ` Ihor Radchenko
2022-06-16 15:08       ` [DISCUSSION] Refactoring fontification system Max Nikulin
2022-06-08  6:52   ` Phil Estival
2023-05-30 11:25   ` [RFC] Refactoring org-element API (was: [DISCUSSION] Refactoring fontification system) Ihor Radchenko
2023-05-30 11:32     ` Ihor Radchenko
2023-05-30 15:00     ` [RFC] Refactoring org-element API Stefan Nobis
2023-05-31  8:57       ` Ihor Radchenko
2023-06-23 12:20         ` Ihor Radchenko
2023-06-30 13:53           ` Ihor Radchenko
2023-07-01 11:44     ` [RFC] Refactoring org-element API (was: [DISCUSSION] Refactoring fontification system) Ihor Radchenko

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.