From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id oDBOO+MSWWRM1gAASxT56A (envelope-from ) for ; Mon, 08 May 2023 17:19:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wMZCO+MSWWRTMAAA9RJhRA (envelope-from ) for ; Mon, 08 May 2023 17:18:59 +0200 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 A6810376DA for ; Mon, 8 May 2023 17:18:59 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pw2d6-0000kU-C2; Mon, 08 May 2023 11:18:24 -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 1pw2d1-0000it-RG for emacs-orgmode@gnu.org; Mon, 08 May 2023 11:18:21 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pw2cx-0002UY-MM for emacs-orgmode@gnu.org; Mon, 08 May 2023 11:18:18 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 32D1524023A for ; Mon, 8 May 2023 17:18:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683559092; bh=ZYNgGgESnA47vBb3k4APPvqkfo5F52kxy7l2VYkr4lI=; h=From:To:Cc:Subject:Date:From; b=kzemOMxKBArf3Dp/Un+I/1uRWbUuuR9tMdIv1//TDcEVpwtm1maMa6S/aRQQbmzw5 yO80njEB99nkOr2PnJm7Qcvs0YxIe3K4s8v7CMH1IVLU11lE7hykRdscktXkQC/zhB cwM5d3W30nYL/co4KnJxAk/Yk6h356bQO87dNguair07o+OzP40/8VJpAK8CbaVRFH BJLE5/WkrAJALCi4KajDBVKum+KgckZ1dCSIW44wZD7fsc89trGxmBkXuAvNqrzjyl qkIE+ToF9gjOHrW8kfrG7aV/1OniQbVroLrDAWzfOoXU4m6FE0JQCXBbuzgWIqa9YI iwjcmDsSl3t4A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QFQ0M54f3z6tvl; Mon, 8 May 2023 17:18:11 +0200 (CEST) From: Ihor Radchenko To: Daniel Kraus Cc: Ag , emacs-orgmode@gnu.org Subject: Re: [BUG] Tangling of clojure code blocks is broken [9.7 (9.7-??-0807107 @ /Users/ag/.emacs.d/.local/straight/build-30.0.50/org/)] In-Reply-To: <87lehzb0k1.fsf@kraus.my> References: <87cz3eas4n.fsf@localhost> <87lehzb0k1.fsf@kraus.my> Date: Mon, 08 May 2023 15:21:30 +0000 Message-ID: <87pm7aluh1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683559139; a=rsa-sha256; cv=none; b=Uuk/DF2m1T0n/a+n6DzJMvR2iw4mSeXbxez6O283Cklw7MlJOz0sLvFfYGEjuhKXCtErSo /cYD5sVl52PZGa7L+Sa3FW9mx0Mv/fT4e7CbIiVE8EafdZR9PY+OMG+ooxr2btb9MZIMbX l62e44BQkD51Y5jW+cp35csiUg3AvZkA7kCY4icsJyde/bUrEKSRnke8G7UPFERAOF0jGe +/RkegViKbnpX7qlJz47vOMr1pSf69mlzjH5r1pY7K0XYd1YR+yqzB3Iq7EB63QRh43Rtd hO8d5+zp8huVINRY0UmRkAD+nN8dqNsC+1tHaOpimBMooUvbqtftlwLMIYv4Hg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=kzemOMxK; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683559139; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ELwZ4lltYqtpnu60ZoPOUFqv9Ze0s96KKYv5F/HQ/Lc=; b=q9aFtI5bMal1WFtzAgtS6EQbeyGCk0+hU9wheprWaI5bjAzB8ALTGDG3l1/cwrANWNOUPM NIdcQMR2u4dX9abQ8HtvBBEGz5W27cYysr2OW9xyviBC7sFTe43Dd21TNFUwqxn5WZ6mbE iq9ZsoJyl8Fo2vTaHFJy1lMY1vVffSzD17OgSFRKXhPzGuOaJG8Tx/Z0kNHktGeSaXEgXo JOkrWUZBzMTxZzgHhcR+4E3iwCc7sXjD+t9+iBYieilTCHMmkkgU3emvKNbuwcJKd1vJU0 ev+vLlwqr4OAcvFPdfIclRNS95YFJ5jpV1xINqrdJBmTfSsAQpVY+JVYCA8lQw== X-Migadu-Spam-Score: -5.18 X-Spam-Score: -5.18 X-Migadu-Queue-Id: A6810376DA X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=kzemOMxK; dmarc=pass (policy=none) header.from=posteo.net; 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-TUID: U/VNmpBIDW/T Daniel Kraus writes: > The problem is that or :results value (/the default) I only want the > result of the last expression and I do that `binding` of stdout to surpre= ss > all other output. > But I guess during tangle this should just be ignored? > Is there a simple way to find out if `org-babel-execute:clojure` is > executed or tangled? You can just move this extra logic arranging :results to org-babel-execute:clojure. > If it should be ignored on tangle, what about the :var defines. :var defines are affecting how the code is written. :results should not. So, :var is expected to affect tangling. If necessary, code block expansion can be disabled via :no-expand header argument: By default Org expands code blocks during tangling. The =E2=80=98no= -expand=E2=80=99 header argument turns off such expansions. Note that one side-effect of expansion by =E2=80=98org-babel-expand-src-block=E2=80=99 also assigns = values (see *note Environment of a Code Block::) to variables. Expansions also replace noweb references with their targets (see *note Noweb Reference Syntax::). Some of these expansions may cause premature assignment, hence this option. This option makes a difference only for tangling. It has no effect when exporting since code blocks for execution have to be expanded anyway. > We recently discussed this for ob-scheme where there was a problem with t= he > `let` wrapper. > Is it ok or expected that a the tangled code is wrapped in a let block? > Should I change it to a global `def`? I think that keeping `let' should be fine as long as it does not break things. In the previous discussion, the whole issue was that `let' was not always safe in that particular lisp dialect. We just need to make sure that it is documented. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at