From: Kyle Meyer <kyle@kyleam.com>
To: ciolfi@mathworks.com
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: fontification error with #end_src in 9.3.7 [9.3.7 (9.3.7-dist @ /PATH/TO/org/install/emacs/site-lisp/org/)]
Date: Sat, 13 Jun 2020 06:42:21 +0000 [thread overview]
Message-ID: <87sgezpiuq.fsf@kyleam.com> (raw)
In-Reply-To: <r9r1ulpctz.fsf@ah-ciolfi-lah-ciolfi-l.dhcp.mathworks.com>
John Ciolfi writes:
> Given the following org file, on the #+end_src line, I get "Org mode
> fontification error in #<buffer foo.org> at 9". If I place a newline
> before the #+end_src line, the error goes away. This is a recent
> regression. This worked fine in 9.2.6 and prior.
>
> #+begin_src C++
> #include <iostream>
> int main() {
> std::cout << "hello";
> return 0;
> }
>
> // The results:
> #+end_src
>
> #+RESULTS:
Thanks for the report.
This bisects to 04d2828ad (org: Fix verbatim block fontification to end
blocks on headlines, 2019-12-11). Reverting different parts of that
patch, it seems this is the problematic hunk:
diff --git a/lisp/org.el b/lisp/org.el
index 68ca5839a..14840d8ca 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5320,10 +5320,14 @@ (defun org-fontify-meta-lines-and-blocks-1 (limit)
(add-text-properties
beg (if whole-blockline bol-after-beginline end-of-beginline)
'(face org-block-begin-line))
- (add-text-properties
- beg-of-endline
- (min (point-max) (if whole-blockline (min (point-max) (1+ end-of-endline)) end-of-endline))
- '(face org-block-end-line))
+ (unless (string-prefix-p "*" (match-string 1))
+ (add-text-properties
+ beg-of-endline
+ (if whole-blockline
+ (let ((beg-of-next-line (1+ end-of-endline)))
+ (min (point-max) beg-of-next-line))
+ (min (point-max) end-of-endline))
+ '(face org-block-end-line)))
t))
((member dc1 '("+title:" "+author:" "+email:" "+date:"))
(org-remove-flyspell-overlays-in
I'll try to take a closer look tomorrow.
next prev parent reply other threads:[~2020-06-13 6:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 20:27 Bug: fontification error with #end_src in 9.3.7 [9.3.7 (9.3.7-dist @ /PATH/TO/org/install/emacs/site-lisp/org/)] John Ciolfi
2020-06-12 3:49 ` stardiviner
2020-06-13 6:42 ` Kyle Meyer [this message]
2020-06-13 19:21 ` Kyle Meyer
2020-06-15 14:58 ` John Ciolfi
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=87sgezpiuq.fsf@kyleam.com \
--to=kyle@kyleam.com \
--cc=ciolfi@mathworks.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).