emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>,
	"Léo Ackermann" <leo.komba@gmail.com>
Subject: Re: Large source block causes org-mode to be unusable
Date: Mon, 21 Jun 2021 14:36:44 -0500	[thread overview]
Message-ID: <CA+M2ft9o+MesQPU8REB-ZjHz7zqR039Fk1L5GQAk2RuhUBH5hg@mail.gmail.com> (raw)
In-Reply-To: <m2bl7zuinz.fsf@andrew.cmu.edu>

[-- Attachment #1: Type: text/plain, Size: 1978 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2738 bytes --]

  reply	other threads:[~2021-06-21 19:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 18:27 Large source block causes org-mode to be unusable Léo Ackermann
2021-06-21 18:43 ` John Hendy
2021-06-21 18:57 ` Sébastien Miquel
2021-06-21 19:22 ` John Kitchin
2021-06-21 19:36   ` John Hendy [this message]
2021-06-21 20:41     ` Tom Gillespie
2021-06-22  4:48       ` Tim Cross
2021-06-22  7:54     ` Eric S Fraga
2021-06-22 11:20       ` Léo Ackermann
2021-06-22 12:13         ` Eric S Fraga
2021-06-22 12:32           ` Léo Ackermann
2021-06-22 13:03             ` Eric S Fraga
2021-06-22 13:32               ` Léo Ackermann
2021-06-23 16:40             ` Maxim Nikulin
2021-06-23 19:42               ` Gennady Uraltsev
2021-06-24  7:54                 ` Eric S Fraga
2021-06-26 14:10                   ` Léo Ackermann
2021-06-28  8:28                     ` Sébastien Miquel
2021-06-28 10:42                       ` Eric S Fraga
2021-06-28 10:40                     ` Eric S Fraga
2021-06-22  6:10 ` Timothy

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=CA+M2ft9o+MesQPU8REB-ZjHz7zqR039Fk1L5GQAk2RuhUBH5hg@mail.gmail.com \
    --to=jw.hendy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    --cc=leo.komba@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).