From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id gGGzODOsDmeWqQAAe85BDQ:P1 (envelope-from ) for ; Tue, 15 Oct 2024 17:53:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id gGGzODOsDmeWqQAAe85BDQ (envelope-from ) for ; Tue, 15 Oct 2024 19:53:56 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=W98zxz9S; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729014834; 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=ENuzuPSh4acagID/OAC0ii+ACSZS4WOAyuqoYDwNLlE=; b=tyM0xJ6/PpEfTiBA4QD+qdmJw0q677FCxEFO1zeUjAybdfAeCyxpdCioH1rFA82uLCySAd f2iaI9NrziOXoJEE+K1vTyHeR5rf9J5WCGz40Hqjy+6egW3h+BXZ8Dx5hCd/ST0j0tYi0o tTq7pSnT12tWNGXQFjfM88g8rDZqLUkSUcPYpoFmy4zVkJGuNlLmR9ropoZKjbOAoeVf6J zYDoIG9n4NtSYmpWxFBCFgNc1jSlaWo5n1ZLxB0mff1AHxKgrlOQD5UjAYPh1xG+aanDKK PZ7vPQL+ZymQ1ND19lKaOrmX30aWNgq8DKC6mUSVIYk+AOZ9oZNWyOgQxrTyIA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729014834; a=rsa-sha256; cv=none; b=rGFJ3TLHX2aRxNJx0ki7N20DN/tqha6VVSwI4BRyTh4g/JFYSOC1jYfLabyfwKIFgdpWl6 bL1QGdSSuHUagQ/2EWhg4gt/gf753K4RYeAS42yEzyXqXxhhNUhmb57ZvxbAxVp4O92/1D P70KTdOFDIFjU5zWd+BK3m0qB16IbLEb2CBfrS4ybBXHrb6guBBkqiINPdBKu+Km5l09CN MsQ4lgL+wjcHfjR9dE9sn1WjlPcklStrn+npCRmA7w60Z4HI4WIBlKaRNDCVff+30Dq0Mh LRexlxsMXNZPMrLt/hmDEaiuI94/S/ndEHsN7aQFxI5hZl+jenueXI3neoqNjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=W98zxz9S; 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"; dmarc=pass (policy=none) header.from=gmail.com 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 BED255C7F7 for ; Tue, 15 Oct 2024 19:53:54 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t0ljn-0003ie-Th; Tue, 15 Oct 2024 13:53:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0ljl-0003iQ-5E for emacs-orgmode@gnu.org; Tue, 15 Oct 2024 13:53:37 -0400 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t0ljj-0008MS-De for emacs-orgmode@gnu.org; Tue, 15 Oct 2024 13:53:36 -0400 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2fb49510250so21850971fa.0 for ; Tue, 15 Oct 2024 10:53:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729014813; x=1729619613; darn=gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=ENuzuPSh4acagID/OAC0ii+ACSZS4WOAyuqoYDwNLlE=; b=W98zxz9SrrwFnJPUQKdIsapooqmDpsaz0iEhG8htnIwAzI42om24PdpIa3oJHk5e0q 0jBQUhzWYePOjRkSbZWTh6seqHLW7WWZYxBtak8naOECf8vYPbM/Bpz+d7dwb3J40AWv zb1k6RsDg1toVXeElAM11uRewvWhFHVfXYVJ0HRuVJT+ihpmm65IxpJMv6JXANnRIqq6 q4VicPeTlGOc1MzDva23tlBoZODQWi8YiKQoJSCfFQVtc9xXw99t210u4ElbcjEYXl2/ LCu3uWX7HL/kgoHpRj/MXat8WrCfcQUQNTqwmDJ/InDuT+4eufImeWkukLlKEgodT1hi urDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729014813; x=1729619613; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ENuzuPSh4acagID/OAC0ii+ACSZS4WOAyuqoYDwNLlE=; b=DyCtPnDCmRx7Dk90J4K5Fvq6bdVGbDTDia+UGG7H4k6mLXL8nJvMobn924DgopMaC7 l7LKyTiOlNE4MOkwt64FFnCUws0t75dAzd2q96aomo0I2tsEYwMcLSpH38rgqbRfcwS9 9g9JhfXpnNe3w9NZ2pjWPGb4MLJqnJ5QKC36bkPKf5j0vAl+I2S3HQioFs2hP57pqDLK Jh2FCV46xgC20KBVPq0znpcWamEI29s8F9/fCsvo+8yoPA5kK1cxsBPTYAePDgOs1cvH cOgdVQs/IGnX8dq0gjd6Wy8wRms1bRysUKi3EMCwP/Xe8onWCFAUE959qykvvwDzr7OE wZsQ== X-Gm-Message-State: AOJu0YxiydpEfRYJJpxbaC24lAcPohlmgvVJYfpJVTlDYXn+XNq3HNcI DPcWagA4c6rITAZPqArefOUTATHE6YPTWj43I2ZspDDRtGNGGIVf2eiyOz8DJCqYEJ5jYYhSRhj NkZvqo0DWXuxqWIFWWnEiYkx/i6kFHg== X-Google-Smtp-Source: AGHT+IHpSMWfmwLMK2Niv36BK/Ifpp9np07ZQVzs4n4Oew5VaFNK8X6+pIAMJyP7/rXO2pRsBIZt5uKXMBD4Hxmo3wI= X-Received: by 2002:a2e:4a01:0:b0:2fb:4bee:47ec with SMTP id 38308e7fff4ca-2fb4bee4870mr34115941fa.33.1729014812993; Tue, 15 Oct 2024 10:53:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Anoop GR Date: Tue, 15 Oct 2024 23:23:21 +0530 Message-ID: Subject: Re: ob-clojure breaks tangling of comments using org-babel-tangle for clojure source code blocks To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000bd7180062487a169" Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=anoopemacs@gmail.com; helo=mail-lj1-x22a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.88 X-Spam-Score: -4.88 X-Migadu-Queue-Id: BED255C7F7 X-Migadu-Scanner: mx13.migadu.com X-TUID: nEYz3luk0Jba --000000000000bd7180062487a169 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable We are missing the comment that was expected in the second line of the output. In its place, there is an empty newline. On Tue, Oct 15, 2024 at 11:22=E2=80=AFPM Anoop GR wr= ote: > The contents of the tangled output.clj file were:- > --- > (def e 2.72) > > (def pi 3.14) ;;This is a comment not on a line of its own > --- > > On Tue, Oct 15, 2024 at 11:21=E2=80=AFPM Anoop GR = wrote: > >> The contents of the org file were >> --- >> This file contains only two source blocks >> #+begin_src clojure :noweb-ref "Define a constant" >> (def e 2.72) >> ;;This is a comment on a line of its own >> (def pi 3.14) ;;This is a comment not on a line of its own >> #+end_src >> >> The following block will be tangled >> #+begin_src clojure :noweb yes :tangle output.clj >> <> >> #+end_src >> --- >> >> On Tue, Oct 15, 2024 at 11:13=E2=80=AFPM Anoop GR = wrote: >> >>> Comments in org babel clojure blocks are not tangled out. >>> >>> Let us take an example org file with the following contents:- >>> >>> This org file contains only two source blocks and a total of ten lines. >>>> #+begin_src clojure :noweb-ref "Define a constant" >>>> >>> (def e 2.72) >>> >>> ;;This is a comment on a line of its own >>>> (def pi 3.14) ;;This is a comment not on a line of its own >>>> #+end_src >>> >>> The following block will be tangled >>>> #+begin_src clojure :noweb yes :tangle ./output.clj >>>> <> >>>> #+end_src >>> >>> >>> When I tangle the above file, the contents of the output.clj file are:- >>> >>>> (def e 2.72) >>> >>> >>>> (def pi 3.14) ;;This is a comment not on a line of its own >>> >>> >>> *The comment that was on a line of its own is missing from the tangled >>> output.* >>> >>> Was able to reproduce on both emacs 29.3.50 and 29.4 on Ubuntu 22.04 LT= S >>> Both were started using *emacs -Q* and then evaluating *(require >>> 'ob-clojure)* as the only line of config. >>> >> --000000000000bd7180062487a169 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
We are missing the comment that was expected in the second= line of the output.
In its place, there is an empty newline.

On T= ue, Oct 15, 2024 at 11:22=E2=80=AFPM Anoop GR <anoopemacs@gmail.com> wrote:
The contents of the tan= gled output.clj file were:-
---
(def e 2.72)

(def pi 3= .14) ;;This is a comment not on a line of its own
---

On= Tue, Oct 15, 2024 at 11:21=E2=80=AFPM Anoop GR <anoopemacs@gmail.com> wrote:
<= /div>
The contents of the org file were
---
This file contains only tw= o source blocks
#+begin_src clojure :noweb-ref "Define a constant&q= uot;
(def e 2.72)
;;This is a comment on a line of its own
(def pi= 3.14) ;;This is a comment not on a line of its own
#+end_src

The= following block will be tangled
#+begin_src clojure :noweb yes :tangle = output.clj
<<Define a constant>>
#+end_src
= ---

On Tue, Oct 15, 2024 at 11:13=E2=80=AFPM Anoop GR <anoopemacs@gmail.com> = wrote:
Comments in org babel clojure blocks are not tangled out.

Let us take an example org file with the following co= ntents:-

This org file contains only two source blocks and a total of ten lines.=
#+begin_src clojure :noweb-ref "Define a constant"
(def e 2.72)=C2=A0<= /blockquote>
;;This is a c= omment on a line of its own
(def pi 3.14) ;;This is a comment not on a l= ine of its own
#+end_src
The following block will be tangled
#+begin_src cloj= ure :noweb yes :tangle ./output.clj
<<Define a constant>>#+end_src

When I tangle the above fi= le, the contents of the output.clj file are:-
(def e 2.72)

(def pi 3.14) ;;This is a comment not = on a line of its own

The comment that was on = a line of its own is missing from the tangled output.

Was able to reproduce on both emacs 29.3.50 and 29.4 on Ubuntu 22.0= 4 LTS
Both were started=C2=A0using emacs -Q=C2=A0and then evaluating (requi= re 'ob-clojure)=C2=A0as the only line of config.
--000000000000bd7180062487a169--