emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maxim Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Bug: org-src-font-lock-fontify-block should be wrapped with save-match-data [9.3.7 (9.3.7-4-gba6ca7-elpaplus @ mixed installation! /mnt/c/Users/toz/Weiterbildung/Soft/Emacs/ and /mnt/c/Users/toz/.emacs.d/elpa/org-plus-contrib-20200615/)
Date: Tue, 24 Aug 2021 23:57:53 +0700	[thread overview]
Message-ID: <sg38ei$t66$1@ciao.gmane.io> (raw)
In-Reply-To: <87r1ektxe3.fsf@gmail.com>

On 23/08/2021 14:45, Timothy wrote:
> 
> Thanks for your efforts. I have prepared a patch accordingly that wraps
> org-src-font-lock-fontify-block’s body with save-match-data (attached).
> 
> If I don’t hear anything bad about it in the next few days, I’ll push it :)
> Please let me know if my commit message agrees with your understanding of the
> issue.

Timothy, are you able to reproduce the issue with performance? Due to 
the thread
https://orgmode.org/list/CAFhsWEgAb_im1WpXp3xsfFxcoahKyycM4GaqRin0SUXxD0gMzg@mail.gmail.com/ 
"Large source block causes org-mode to be unusable" I assume that it 
could be quite severe. On the other hand I tried to insert an .el file 
into org-guide.org and I have not noticed slow down. Actually my 
curiosity is caused by other performance issues, so I am interested if 
the effect may be broader.

The following question may be dumb since I am not familiar how font lock 
works in Emacs. Is it necessary to wrap whole function? I do not see 
explicit operation with regexps. The only suspecting line is

   (org-font-lock-ensure)

I am not sure whether the body of `org-src-font-lock-fontify-block' 
should be wrapped or its call site.

Feel free to disregard my questions since fontification is far aside 
from my experience.




  reply	other threads:[~2021-08-24 16:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20 10:07 Bug: org-src-font-lock-fontify-block should be wrapped with save-match-data [9.3.7 (9.3.7-4-gba6ca7-elpaplus @ mixed installation! /mnt/c/Users/toz/Weiterbildung/Soft/Emacs/ and /mnt/c/Users/toz/.emacs.d/elpa/org-plus-contrib-20200615/) Tobias Zawada
2021-08-23  7:45 ` Timothy
2021-08-24 16:57   ` Maxim Nikulin [this message]
2021-08-25  8:07     ` What happened to ./contrib? Martin Steffen
2021-08-25  8:44       ` Tim Cross
2021-08-25 11:47       ` Maxim Nikulin
2021-08-25 11:56     ` Bug: org-src-font-lock-fontify-block should be wrapped with save-match-data [9.3.7 (9.3.7-4-gba6ca7-elpaplus @ mixed installation! /mnt/c/Users/toz/Weiterbildung/Soft/Emacs/ and /mnt/c/Users/toz/.emacs.d/elpa/org-plus-contrib-20200615/) Maxim Nikulin
2021-08-31 11:28       ` Timothy
  -- strict thread matches above, loose matches on Subject: below --
2021-08-25  4:05 Tobias Zawada

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='sg38ei$t66$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).