emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Large source block causes org-mode to be unusable


From: John Hendy
Subject: Re: Large source block causes org-mode to be unusable
Date: Mon, 21 Jun 2021 14:36:44 -0500

Indeed. The top google hit for "emacs fontify proof block slow" I provided says exactly that :)

https://emacs.stackexchange.com/questions/46561/org-mode-9-too-slow-with-long-code-blocks
"""
That said, I think keeping 2000 lines of source code inside an org src block is neither a standard use case nor a reasonable idea. You can use the #+INCLUDE ... src ... directive or split the block into a number of more reasonably sized cells. If you insist on keeping the entire block, then disable native highlighting of src code blocks.
"""

On Mon, Jun 21, 2021 at 2:23 PM John Kitchin <jkitchin@andrew.cmu.edu> wrote:
A quick and dirty way to fix this might be an include file, i.e. move
the block out of your manuscript file into a separate org file, and then
just include it.

Léo Ackermann <leo.komba@gmail.com> writes:

> Dear all,
>
> I am working in an org-file of reasonable size (<2000 lines): my first
> paper written in org-mode. Everything fine (and fast) until I started to
> add `#+BEGIN_proof / #+END_proof` within my .org to make my .pdf export
> prettier. This caused the editing of the proofs to be very slow: navigation
> within the proof is fast but adding/removing any char takes around 4s per
> char.
> It seems that the fontify function is responsible for that (see
> screenshot). As far as I understand, this function tries to fontify the
> whole block as soon as a single char is modified. In my case, it then tries
> to fontify a whole proof (~4 pages in my .pdf, with many LaTeX formulas)
> several times per second...
>
> Is there a way to make this fontify function to act "around my cursor" ?
>
> Best,
> Leo


--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
Pronouns: he/him/his


reply via email to

[Prev in Thread] Current Thread [Next in Thread]