Matthew Lundin writes:
> stardiviner writes:
>
>> Matthew Lundin writes:
>>
>>>
>>> I think you also need to replace the newline with a space in the upper
>>> case version.
>>>
>> Supposed there is \n after #+end_src. I also checked the original version
>> before
>> that change commit. The original has an newline. I write patch by comparing
>> before and after (side by side).
>
> I'm referring to this line in the patch:
>
> indent (if upper-case-p "#+BEGIN_SRC\n" "#+begin_src
> ")
> ^
>
> The newline that needs to be removed is indicated by "^".
>
> You can see a correct similar version of this line on line 1932 of
> ob-core.el.
>
> The original line the problematic commit replaced would also have had a
> space in both, since it called either downcase or upcase on the string
> "#+begin_src ".
You're right, I updated the patch now. I really missed seeing that. :)
From 67b11b793d4ce45c75f5874571434c8a769ed7f3 Mon Sep 17 00:00:00 2001
From: stardiviner
Date: Mon, 1 Jun 2020 08:44:22 +0800
Subject: [PATCH] [PATCH] fix 5f0a9cca3 missing space
* lisp/ob-core.el (org-babel-demarcate-block): replace wrong newline
with missing space.
---
lisp/ob-core.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index e554e3934..e798595bd 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -1908,7 +1908,7 @@ (defun org-babel-demarcate-block (&optional arg)
(if (looking-at "^") "" "\n")
indent (if upper-case-p "#+END_SRC\n" "#+end_src\n")
(if arg stars indent) "\n"
- indent (if upper-case-p "#+BEGIN_SRC\n" "#+begin_src\n")
+ indent (if upper-case-p "#+BEGIN_SRC " "#+begin_src ")
lang
(if (> (length headers) 1)
(concat " " headers) headers)
--
2.26.2
>
> Best,
>
> Matt
--
[ stardiviner ]
I try to make every word tell the meaning that I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
signature.asc
Description: PGP signature