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 ms5.migadu.com with LMTPS id aGSPA4/kzWL2QgAAbAwnHQ (envelope-from ) for ; Tue, 12 Jul 2022 23:15:59 +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 GIR+A4/kzWJOvwAA9RJhRA (envelope-from ) for ; Tue, 12 Jul 2022 23:15: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 1B0E831812 for ; Tue, 12 Jul 2022 23:15:53 +0200 (CEST) Received: from localhost ([::1]:45378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBNEV-0006Fz-Qi for larch@yhetil.org; Tue, 12 Jul 2022 17:15:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBND1-0005xF-Rd for emacs-orgmode@gnu.org; Tue, 12 Jul 2022 17:14:21 -0400 Received: from smtpout02-ext4.partage.renater.fr ([194.254.241.31]:49652) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBNCt-0001PV-BO for emacs-orgmode@gnu.org; Tue, 12 Jul 2022 17:14:18 -0400 Received: from zmtaauth04.partage.renater.fr (zmtaauth04.partage.renater.fr [194.254.241.26]) by smtpout20.partage.renater.fr (Postfix) with ESMTP id 47B11BFDEC; Tue, 12 Jul 2022 23:13:51 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zmtaauth04.partage.renater.fr (Postfix) with ESMTP id 2E8731C024D; Tue, 12 Jul 2022 23:13:51 +0200 (CEST) Received: from zmtaauth04.partage.renater.fr ([127.0.0.1]) by localhost (zmtaauth04.partage.renater.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 5x9qB8oiWC91; Tue, 12 Jul 2022 23:13:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zmtaauth04.partage.renater.fr (Postfix) with ESMTP id DF4911C0263; Tue, 12 Jul 2022 23:13:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 zmtaauth04.partage.renater.fr DF4911C0263 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unistra.fr; s=CF279DD4-6F58-4C59-BB33-73FDC6DFC1E3; t=1657660430; bh=V6suIoO04Ub8neTvy1zHwi3jR9pYvO7Op2eZgwloKl0=; h=MIME-Version:Message-ID:Date:From:To; b=G4pdaH+uL/M/bvGoCbwnnVRBzKWpxUsO/54MEvT4EQrr6rpALpu55jJ0DRSJeTDun GOu92MlynYX1OmQ6krzF6RVirth47g0iZjwIDPinA2dsL6CWZbyRJHiSLkO3Vfy3rc o2fQ9/mjooSsbKmC0XbBIHlht2R8rzzEnh4y0nMtRsVX2/Sy/mjMaYV72mXN5u6NyO ngHTog3gvpKcMtqQDgLAkpw/OHQEZBpxv1m+Cumfepijp2AQTtjxOEeZVLmhoCHQp+ n6u+zgQBnmQha84E1MHZ0mAnn5ZfkgZArYyjcKBGGUwSr60Z5xl8RGIiRerWB1ypuI iJcYprXaS7qyw== X-Virus-Scanned: amavisd-new at zmtaauth04.partage.renater.fr Received: from zmtaauth04.partage.renater.fr ([127.0.0.1]) by localhost (zmtaauth04.partage.renater.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hsiPf6-P265e; Tue, 12 Jul 2022 23:13:50 +0200 (CEST) Received: from 90.33.191.238 (unknown [194.254.241.250]) by zmtaauth04.partage.renater.fr (Postfix) with ESMTPA id 80A661C024D; Tue, 12 Jul 2022 23:13:50 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <25293.58381.803841.645075@gargle.gargle.HOWL> Date: Tue, 12 Jul 2022 23:13:49 +0200 From: Alain.Cochard@unistra.fr To: alain.cochard@unistra.fr Cc: Org Mode List , "Fraga, Eric" , Greg Minshall Subject: Re: Confused about source code blocks evaluation when exporting In-Reply-To: <25293.28342.763993.795868@gargle.gargle.HOWL> References: <25293.28342.763993.795868@gargle.gargle.HOWL> X-Mailer: VM 8.2.0b under 27.2 (x86_64-redhat-linux-gnu) X-Renater-Ptge-SpamState: clean X-Renater-Ptge-SpamScore: -85 X-Renater-Ptge-SpamCause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejhedgudeitdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucftgffptefvgfftnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenogetfedtuddqtdduucdludehmdenucfjughrpeggtgfgkfffhffvvefujghfofhrsehtqhertdertddunecuhfhrohhmpeetlhgrihhnrdevohgthhgrrhgusehunhhishhtrhgrrdhfrhenucggtffrrghtthgvrhhnpedtvefftdeuhfeifeevgeejhffffffftdduvdegfeduudfghfetgfeuffdvhfffgeenucfkphepudelgedrvdehgedrvdeguddrvdehtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleegrddvheegrddvgedurddvhedtpdhhvghlohepledtrdeffedrudeluddrvdefkedpmhgrihhlfhhrohhmpeetlhgrihhnrdevohgthhgrrhgusehunhhishhtrhgrrdhfrhdpnhgspghrtghpthhtohepgedprhgtphhtthhopehmihhnshhhrghllhesuhhmihgthhdrvgguuhdprhgtphhtthhopegvrdhfrhgrghgrsehutghlrdgrtgdruhhkpdhrtghpthhtohepvghmrggtshdqohhrghhmohguvgesghhnuhdrohhrghdprhgtphhtthhopegrlhgrihhnrdgtohgthhgrrhgusehunhhishhtrhgrrdhfrh Received-SPF: pass client-ip=194.254.241.31; envelope-from=Alain.Cochard@unistra.fr; helo=smtpout02-ext4.partage.renater.fr X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.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, NICE_REPLY_A=-0.001, RCVD_HELO_IP_MISMATCH=2.368, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Reply-To: alain.cochard@unistra.fr Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1657660553; h=from:from:sender:sender:reply-to: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=V6suIoO04Ub8neTvy1zHwi3jR9pYvO7Op2eZgwloKl0=; b=ZEVyp58JRkSoCYt4gCVkZ6icS3N1Sd1hddRTjVVV72BDsD2C0nbYOjQBE0w+lbBrfIVlT+ yxXP95Yw3fT9gtnUEKvRiKoKVdFslzzNZzxeQFrjiTYO9dyZxMuqCqhw+dS0IwSPCP7iv4 1rQ0fOzYWdXxOATBVwfASGi7cNkShdx6AmSbyv0lr2wFkwzbCnY9xwvQV6yawxUtbYlFm9 KYrl2ApZ926Wmfr+qPJJ/HX5wvgNVXRUjCZudk0HokZZlF2LY5p0fw5g/hd/D8jjRuxSkw G1bhErlq0VhqToMnZ2877e0o4UBREi/Xzanu01yxfS1qGjSXQrZOzwQkNL3Xyw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657660553; a=rsa-sha256; cv=none; b=Yyfe3BFnPtTK0/aNMt8XYiNvpuw61geF6hTkAFuGEaU9Sr3sPmz1AdgFNrELkb7FUdnzDc MhBOVWYJDFJFk+joD2uUfEzGfXKzlWnoPWxP5K6VJvQ5+Pf9bBuWQ+DTuj2VDmppoLvgIM SWvrLmL4LmDHIa9v2O2Dxd1HiTuNPS084ms8dMfMIwEj6FBapegaNrUlyrgFpMIDTdlXU5 s9FbXixREGCd/TeN7lTW5IEC5EWfaBneHlbx3sBakTCxZT4uvp25g+sA9zu7lRdc8avV4M PDKZZ5HH8mWG/rsOuaiaOyfgwqPPyfE1McOQ/JLqiQOqqAJ4dnVvHcgKBTVSJQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=unistra.fr header.s=CF279DD4-6F58-4C59-BB33-73FDC6DFC1E3 header.b=G4pdaH+u; dmarc=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: -5.55 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=unistra.fr header.s=CF279DD4-6F58-4C59-BB33-73FDC6DFC1E3 header.b=G4pdaH+u; dmarc=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: 1B0E831812 X-Spam-Score: -5.55 X-Migadu-Scanner: scn1.migadu.com X-TUID: Rjil4J0vKvP0 Fraga, Eric writes on Tue 12 Jul 2022 14:08: > On Tuesday, 12 Jul 2022 at 14:53, Alain.Cochard@unistra.fr wrote: > > So far so good. (Well almost: why does '#+RESULTS:' show 'bar' an= d > > not 'foo'=3F After all, I'm just setting 'my-var', I'm not asking= to > > display its value. But that's incidental.) >=20 > It's not incidental. By default, the results of a src block evaluat= ion > is the value of the src block which is typically the value returned = by > the last statement. I guess I didn't use 'incidental' correctly. I meant it as "not my main concern". Anyway, thank you; I could check that if I switch the 2 lines I indeed get '#+RESULTS:' to show foo'. > You can modify this by adding >=20 > :results output >=20 > for instance to the begin=5Fsrc line. >=20 > > (test 2) Same org file. If I do 'C-c C-e l o', no question is ask= ed, > > no '#+RESULTS:' block is inserted, and the resulting pdf file show= s: >=20 > On export, the default is to export the code. If you want the resul= ts, > you need to add >=20 > :exports results >=20 > or if you want both code and results, >=20 > :exports both Greg Minshall writes on Tue 12 Jul 2022 17:22: > maybe look in the org manual for ":results" (with "value" or > "output" as options) and ":exports" (with "code" or "results" or > "both" as options). Thank you both, I made progress; but the behavior is still very so unintuitive to me. For example, I haven't found a way to have this block: #+begin=5Fsrc emacs-lisp (message "foo") (message "bar") #+END=5FSRC and have the following inserted during export: #+RESULTS: : foo : bar (after all, that is was goes into the *Messages* buffer upon evaluation with 'C-c C-c'...) Finally I still tend to consider that the sentence "Org evaluates source code blocks in an Org file during export" is confusing. But maybe that's just I who interpret this as "code evaluation is the default behavior upon export". Regards --=20 EOST (=C9cole et Observatoire des Sciences de la Terre)=20 ITE (Institut Terre & Environnement) | alain.cochard@unistra.fr 5 rue Ren=E9 Descartes [bureau 106] | Phone: +33 (0)3 68 85 50 44=20= F-67084 Strasbourg Cedex, France | [ slot available for rent ]