From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WGpCGYWg2mF0QQEAgWs5BA (envelope-from ) for ; Sun, 09 Jan 2022 09:44:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WAXTFYWg2mFx2gAAauVa8A (envelope-from ) for ; Sun, 09 Jan 2022 09:44:53 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C202D356AA for ; Sun, 9 Jan 2022 09:44:52 +0100 (CET) Received: from localhost ([::1]:59136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6Top-0000EC-K8 for larch@yhetil.org; Sun, 09 Jan 2022 03:44:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6TnE-0000Bs-Jp for emacs-orgmode@gnu.org; Sun, 09 Jan 2022 03:43:15 -0500 Received: from [2607:f8b0:4864:20::934] (port=46068 helo=mail-ua1-x934.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n6TnD-00012P-2A for emacs-orgmode@gnu.org; Sun, 09 Jan 2022 03:43:12 -0500 Received: by mail-ua1-x934.google.com with SMTP id x33so16981647uad.12 for ; Sun, 09 Jan 2022 00:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=P/Gg70HpV/DFx3HBAs/7KVKtHqQNv0XWdsW2AkEH2hg=; b=qZBDvvNZDoEXkaY0uwYdn4Q1yNqWYOHizvOJg0ohephsRlDooXEcJEbjAx2xJn+93f 8xQY8EYrZ6kF9AJDyJyOOyrvUpVy2qTRGu6YcyF2pO1ZzEAU/P/VtDVzndhtW+KMKhUl MXkORwFxYBgn58bzTw0iyrb9Cy/fUYz8e4f+/J6vwwVtVOibGPWrRybpiwUGIZEHQNhX 3O51UdD53E0VeX6+2xajEQxHMj/FYc7pS1Q4p610EqEv6mCPI3npUG/oFdnbXhSv/2Dr 3vscOIx/f9cRoYixTV9HYAAjaLbOkapra/XapjCEFwu4osLZyH62bL54eSdjwuGNFwKh hxBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=P/Gg70HpV/DFx3HBAs/7KVKtHqQNv0XWdsW2AkEH2hg=; b=yiHEamvr/lL5rP0UCchI48GRKyE9+Qwkq2Y2ANJu4fw885e5WAOVnPF7TjpwHbN91L 6fHej0CwzU+f7isYgO7U1yt9bY9piCdAkuzdM5zsT1KoMgSWEhUb3+bLTTta67KKGYGM KwkhzOjrODCnqWxaZNNasLY56f2n5+ejfrvI47GyVjgmglqzSdTq2NH6PmVoaZ7DL3DF hX8RqQlFZzdgprevCYIEWlNkZ92SMwwt5kbFwN/IeVs0836ZX5zhgzoWt2y5zWRgb/aA KgiR4bd8+Tc/FTADdoiDk18OYL3yvxW3LeYjIqWa5Pyu8GX8c8LhVNMC/TkBhgyL5blU bqQg== X-Gm-Message-State: AOAM530zVsLDYWtQi/T7F7g2oVXrBZWkdYaNu+n8SfphXo/r18xNLhNq vFxVT9ly7IyYri5GIDm+neSCFpVM0TSagBNFc5GVhEeh X-Google-Smtp-Source: ABdhPJxtqTzKXij+hpOhnjbRowPHrs5FaIePkg+f/gEx4uDrdpqKoEOBKaltT4JzeMyOfgNzHedhLcUN+moj202UYg4= X-Received: by 2002:a67:2f58:: with SMTP id v85mr1353404vsv.13.1641717789806; Sun, 09 Jan 2022 00:43:09 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Vikas Kumar Date: Sun, 9 Jan 2022 00:42:58 -0800 Message-ID: Subject: 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/)] To: emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="000000000000aee72505d52235e4" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::934 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::934; envelope-from=kr.vikas@gmail.com; helo=mail-ua1-x934.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641717893; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=WjMOkC6HJ8j1JslEA+7iTqcGvCBIqZMPkZoUCcEB6cA=; b=CMdGd0Grrv7Se4v2sRqGh3y/1zq8RIq4ZhlbGV8Cwelzi4UYPFxPVrxfP1fF2WWF9dl62O nNcgjfR76rhAmWyu2XQYyAGP1gnpFacfBUz60rZs6m8idgYQJP92nju1B4QCKtAqn4LtLZ UWqWxk3VbVWdL8fE+nrek9hTXWYM9275GxqCW71wBiHeDnIaXSMESWyY91X8RifOPxIkQg NC0ISH2+9kywMc4OX5MzhzUvtkKK+6NFKVuICxWJlcL4QIeiwm4w//cfmeenDVERbRCkYE 2Oj4N+iYfF8zhCHs3iyduNskS6AfY+erB5vrEpon0eyZiD331R0/if4Z4RDK1g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641717893; a=rsa-sha256; cv=none; b=cdXFtIf/YxUuHXzbxbGU3q0WlFer4zEG53CjLmaDoXO7JGEFFC5jyhsNhfTwvPXld+ExFD sRitZzZg9KXC+q940Hq50mq+MNldX5ryjNK6vX9DDB7omMrYRPo+St/LKqEhwPfQLPd9eq fuX32EYRi14ZWPvZPX8C7qifdnbMAZopE7g+4CvGhmgGkR6ooc5ioA+UaUr6few5Bnzbmu u68DlVNDQkMHc9pk6GuipWcVLl/AFDJGAmAX9sKTfM4wQun4ai0jho5+r0wsNFEjy6zZyh Naf11tW2kCQxof1KECEBvTLa2azzVKAzMPLLHnA9Ah5n/UGXhJ2LyqZkqgDDTw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=qZBDvvNZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.01 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=qZBDvvNZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C202D356AA X-Spam-Score: -2.01 X-Migadu-Scanner: scn1.migadu.com X-TUID: 9xu56bRyCpxW --000000000000aee72505d52235e4 Content-Type: multipart/alternative; boundary="000000000000aee72105d52235e2" --000000000000aee72105d52235e2 Content-Type: text/plain; charset="UTF-8" Here is a patch with the fix. -- Thanks, Vikas On Sat, Jan 8, 2022 at 9:22 PM Vikas Kumar wrote: > Hello, > > When I use ':results value list' in an emacs-lisp source block it looks > like Babel does > not indent list items correctly when one of the items is a multi-line text. > > To reproduce evaluate the following code block: > > #+begin_src emacs-lisp :results value list > '("Foo1\nBar1" "Foo2\n\nBar2") > #+end_src > > > It outputs: > > #+RESULTS: > - Foo1 > Bar1 > - Foo2 > > > Bar2 > > > Expected output: > > #+RESULTS: > - Foo1 > Bar1 > - Foo2 > > > Bar2 > > > Since the second line of the first item is out of indentation, this makes > the output list actually > finish after the first line of the first item. Re-evaluating the block > then only removes the first line > of the previous output. > > My Emacs and Org mode version: > Emacs : GNU Emacs 27.2 (build 1, x86_64-apple-darwin20.6.0, Carbon > Version 164 AppKit 2022.6) > of 2021-11-16 > Package: Org mode version 9.4.4 (release_9.4.4 @ > /Applications/Emacs.app/Contents/Resources/lisp/org/) > > -- > Thanks, > VIkas > --000000000000aee72105d52235e2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Here is a patch with the fix.

--=C2=A0<= /div>
Thanks,
Vikas

On Sat, Jan 8, 2022 at 9:22 PM Vikas= Kumar <kr.vikas@gmail.com>= wrote:
Hello,

When I use ':results value list'= in an emacs-lisp source block it looks like Babel does
not inden= t list items correctly when one of the items is a multi-line text.

To reproduce evaluate the following code block:
=
#+begin_src emacs-lisp :results value li= st
=C2=A0 '("Foo1\nBar1&= quot; "Foo2\n\nBar2")
#= +end_src

=
It outputs:
#+RESULTS:
- Foo1
Bar1
- Foo2

Bar2

Expected output:

#+RESULTS:
-= Foo1
=C2=A0 Bar1
- Foo2

=C2=A0 Bar2<= /div>

Since the second line of the first it= em is out of indentation, this makes the output list actually
fin= ish after the first line of the first item. Re-evaluating the block then on= ly removes the first line
of the previous output.

<= /div>
My Emacs and Org mode version:
Emacs =C2=A0: GNU Emacs = 27.2 (build 1, x86_64-apple-darwin20.6.0, Carbon Version 164 AppKit 2022.6)=
=C2=A0of 2021-11-16
Package: Org mode version 9.4.4 (release_9.4.4 @= /Applications/Emacs.app/Contents/Resources/lisp/org/)

--=C2=A0
Thanks,
VIkas
--000000000000aee72105d52235e2-- --000000000000aee72505d52235e4 Content-Type: application/octet-stream; name="0001-ob-core.el-Fix-indentation-of-multiline-text-in-list.patch" Content-Disposition: attachment; filename="0001-ob-core.el-Fix-indentation-of-multiline-text-in-list.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_ky70diqi0 RnJvbSBjYjM1Y2ViYjQxNjRmODVmN2MzYzFlZGQzMTNjMzU1NTcwOGIzMzg4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBWaWthcyBLdW1hciA8a3IudmlrYXNAZ21haWwuY29tPgpEYXRl OiBTdW4sIDkgSmFuIDIwMjIgMDA6MTI6NDggLTA4MDAKU3ViamVjdDogW1BBVENIXSBvYi1jb3Jl LmVsOiBGaXggaW5kZW50YXRpb24gb2YgbXVsdGlsaW5lIHRleHQgaW4gbGlzdCBvdXRwdXQKCiog bGlzcC9vYi1jb3JlLmVsIChvcmctYmFiZWwtZm9ybWF0LXJlc3VsdCk6IFVzZSBgb3JnLWxpc3Qt dG8tb3JnJwppbnN0ZWFkIG9mIGBvcmctbGlzdC10by1nZW5lcmljJyB0byBmb3JtYXQgcmV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