From: "Rudolf Adamkovič" <salutis@me.com>
To: Ihor Radchenko <yantar92@posteo.net>, Vikas Kumar <kr.vikas@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: [PATCH] Re: Bug: Incorrect indentation in Org Babel list output with multiline text [9.4.4 (release_9.4.4 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]
Date: Fri, 21 Oct 2022 16:42:12 +0200 [thread overview]
Message-ID: <m2mt9pi6gr.fsf@me.com> (raw)
In-Reply-To: <878rl965sh.fsf@localhost>
[-- Attachment #1: Type: text/plain, Size: 188 bytes --]
Ihor Radchenko <yantar92@posteo.net> writes:
> Applied onto main.
I wrote a regression test, so that we do not need to fix this problem
again next time. Please see the attached patch.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-test-ob-Test-indentation-of-multiline-text-in-list-o.patch --]
[-- Type: text/x-patch, Size: 1551 bytes --]
From 9cb3c86abcc1fe983b5e6d2ff7a80c1d714fb126 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= <salutis@me.com>
Date: Fri, 21 Oct 2022 16:26:33 +0200
Subject: [PATCH] test-ob: Test indentation of multiline text in list output
* testing/lisp/test-ob.el (test-ob/org-babel-results-indented-list):
Add a regression test for the recent change to ob-core list formatting
in e7005787993f521f76e99f00e8a04d87703c493f.
---
testing/lisp/test-ob.el | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index 4ac278faf..4beaecf7b 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -1175,6 +1175,29 @@ trying to find the :END: marker."
(org-babel-execute-src-block)
(org-babel-execute-src-block)))
+(ert-deftest test-ob/org-babel-results-indented-list ()
+ "Test that :results value list indents multi-line items correctly."
+ (should
+ (string= "- Foo1
+ Bar1
+- Foo2
+
+ Bar2
+"
+ (org-test-with-temp-text
+ "#+begin_src emacs-lisp :results value list
+'(\"Foo1
+Bar1\"
+ \"Foo2
+
+Bar2\")
+#+end_src"
+ (org-babel-execute-src-block)
+ (org-forward-element)
+ (org-narrow-to-element)
+ (delete-trailing-whitespace)
+ (buffer-string)))))
+
(ert-deftest test-ob/file-desc-header-argument ()
"Test that the :file-desc header argument is used."
(org-test-with-temp-text "#+begin_src emacs-lisp :results file :file-desc bar
--
2.38.0
[-- Attachment #3: Type: text/plain, Size: 216 bytes --]
Rudy
--
"Be especially critical of any statement following the word
'obviously.'"
-- Anna Pell Wheeler, 1883-1966
Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia
next prev parent reply other threads:[~2022-10-21 14:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-09 5:22 Bug: Incorrect indentation in Org Babel list output with multiline text [9.4.4 (release_9.4.4 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)] Vikas Kumar
2022-01-09 8:42 ` Vikas Kumar
2022-01-11 18:55 ` Vikas Kumar
2022-01-11 20:05 ` [PATCH] " Sébastien Miquel
2022-01-11 20:40 ` Vikas Kumar
2022-10-21 6:37 ` Ihor Radchenko
2022-10-21 14:42 ` Rudolf Adamkovič [this message]
2022-10-22 4:33 ` [PATCH] " Ihor Radchenko
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=m2mt9pi6gr.fsf@me.com \
--to=salutis@me.com \
--cc=emacs-orgmode@gnu.org \
--cc=kr.vikas@gmail.com \
--cc=yantar92@posteo.net \
/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).