From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mEU8DnV0zWJsTgAAbAwnHQ (envelope-from ) for ; Tue, 12 Jul 2022 15:17:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id IOQQDnV0zWLE/AAA9RJhRA (envelope-from ) for ; Tue, 12 Jul 2022 15:17:41 +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 B833622E9 for ; Tue, 12 Jul 2022 15:17:40 +0200 (CEST) Received: from localhost ([::1]:39952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFlj-0007CH-5i for larch@yhetil.org; Tue, 12 Jul 2022 09:17:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFOD-0007bH-R9 for emacs-orgmode@gnu.org; Tue, 12 Jul 2022 08:53:21 -0400 Received: from smtpout02-ext4.partage.renater.fr ([194.254.241.31]:36634) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFOA-0001wN-66 for emacs-orgmode@gnu.org; Tue, 12 Jul 2022 08:53:20 -0400 Received: from zmtaauth02.partage.renater.fr (zmtaauth02.partage.renater.fr [194.254.241.25]) by smtpout20.partage.renater.fr (Postfix) with ESMTP id 5B835BFD8C for ; Tue, 12 Jul 2022 14:53:11 +0200 (CEST) Received: from zmtaauth02.partage.renater.fr (localhost [127.0.0.1]) by zmtaauth02.partage.renater.fr (Postfix) with ESMTPS id 549F3A017A for ; Tue, 12 Jul 2022 14:53:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zmtaauth02.partage.renater.fr (Postfix) with ESMTP id 42F0FA00B1 for ; Tue, 12 Jul 2022 14:53:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 zmtaauth02.partage.renater.fr 42F0FA00B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unistra.fr; s=CF279DD4-6F58-4C59-BB33-73FDC6DFC1E3; t=1657630391; bh=sBt8MlrnXel6cqpZhOHg4YzrUhzUR4EsUM5J3WT32kM=; h=MIME-Version:Message-ID:Date:From:To; b=CbigPZVAACwcRlTQqnq2fF4t0oeeodqpRj2G1YPX6SQlFopGHrJV7fGzLUvW9ag3F aMR9iOQ/Tc21rTieEg3iwfbpJ6zNDi+C3CvoYQtbA9+mDsGGab5Lm4nmZd8qltLAjt 1+wtdO42i0VJ6/ZsrBj/EsiQEDmcPSZeob7Dge5Nm7lD6j66YLnwUrH+KN2fo1i2b4 /oqcPAW3Arq3/b/w+RDbE/oRcksycekfJcTkmUEBth3969bNGuU73RVQUH10CwQv1u 4e505XRJFVnIUhaHEPNQu8plWby5BdFQzgG/ML/753amp6sgwhmeeQYVXC1XgtPzLP A244iGlAuTn7A== X-Virus-Scanned: amavisd-new at zmtaauth02.partage.renater.fr Received: from zmtaauth02.partage.renater.fr ([127.0.0.1]) by localhost (zmtaauth02.partage.renater.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nIzLM-RSRLjm for ; Tue, 12 Jul 2022 14:53:11 +0200 (CEST) Received: from 130.79.11.24 (unknown [194.254.241.249]) by zmtaauth02.partage.renater.fr (Postfix) with ESMTPA id 10095A0179 for ; Tue, 12 Jul 2022 14:53:11 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <25293.28342.763993.795868@gargle.gargle.HOWL> Date: Tue, 12 Jul 2022 14:53:10 +0200 From: Alain.Cochard@unistra.fr To: Org Mode List Subject: Confused about source code blocks evaluation when exporting X-Mailer: VM 8.2.0b under 27.2 (x86_64-redhat-linux-gnu) X-Renater-Ptge-SpamState: clean X-Renater-Ptge-SpamScore: -100 X-Renater-Ptge-SpamCause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejhedgheekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecutffgpfetvffgtfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepgggtgffkfffhvffuofhrsehtqhertdertdejnecuhfhrohhmpeetlhgrihhnrdevohgthhgrrhgusehunhhishhtrhgrrdhfrhenucggtffrrghtthgvrhhnpeeggeettdekheejkeeuhfelfefhveeiteeuvedtkeevteekieekvdegheevgfffheenucffohhmrghinhepvgigphhorhhtrdhorhhgnecukfhppeduleegrddvheegrddvgedurddvgeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelgedrvdehgedrvdeguddrvdegledphhgvlhhopedufedtrdejledruddurddvgedpmhgrihhlfhhrohhmpeetlhgrihhnrdevohgthhgrrhgusehunhhishhtrhgrrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopegvmhgrtghsqdhorhhgmhhouggvsehgnhhurdhorhhg 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, 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=1657631860; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=sBt8MlrnXel6cqpZhOHg4YzrUhzUR4EsUM5J3WT32kM=; b=J+YB20ATyNQQuXxvzGWToUo1NBti6I2pTjz4qUCvXC7ugO+mIumekx5y7sZU9u/ab5Xkc9 Qay0adaDYCVgvOaTOLNVo6AbO3Z9302gDnhS9TtI3iuY5DTXQMXrVjoAfQRkE+TlYlUla6 Qet8+GuPiK9uT7By3odGYN2sLXisC32n3I5qfQF5MJQVh8MT041DWUfxaw9dy5CjkpCDtY gVm2yGXiKKGz55HUSLfD3lTz5BF/B4a4kGTq+kuk/EJ8oI7HYsMjq51bZOZJrGZCcOp80X ZLLfomZ/X7SHMbtqfG6luEi33nUw68Sy18T4NcZDloKKbKfuSyxH5LI3SsT/gg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657631860; a=rsa-sha256; cv=none; b=pDfAQdnTUmmrySrByArOYohj0HDp11rSIyUlIohd8Ah5cuUMxa23+h5658bNSXZVZeNPXE QrLf2ScJoyYo4BNeQ3Bfh9rhOiGPfEfnZuHXDQnjxjQ61H7GKeQF8FDCI6GpfGBl9aqEn0 /chEGgfl15X3qtI0ZOXSp1J68rfG5yIn92DMgqkxAGRPetokc949R6bhwhfcvQLMl7RBll k5wrTVXBYZrTT27aPH8rpgaqkQuC+R3EoxS5P3FjGFr4ZR7WBmPeBV+aZC90j/HtIviCQH 75GQiqh8cfwN397pTJc242dLxFj2nPjgibqtKpw3aD5mTlIV+UjWDJSBFvvWag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=unistra.fr header.s=CF279DD4-6F58-4C59-BB33-73FDC6DFC1E3 header.b=CbigPZVA; 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.65 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=unistra.fr header.s=CF279DD4-6F58-4C59-BB33-73FDC6DFC1E3 header.b=CbigPZVA; 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: B833622E9 X-Spam-Score: -5.65 X-Migadu-Scanner: scn1.migadu.com X-TUID: 1zEuYJ8932M7 Hello. The manual says: Org evaluates code in the following circumstances: =5FSource code blocks=5F Org evaluates source code blocks in an Org file during export. Org also evaluates a source code block with the =E2=80=98C-c C-c= =E2=80=99 key chord. NB: each test below is performed with a new 'emacs -Q' session. I have: Org mode version 9.5.2 (release=5F9.5.2-25-gaf6f12 @ /home/cochard/usr/local/emacs-28.1/lisp/org/) (test 1) I have an org file which only contains #+BEGIN=5FSRC emacs-lisp=20 (message "foo") (setq my-var 'bar) #+END=5FSRC If I do 'C-c C-c', I am asked the following Evaluate this emacs-lisp code block on your system=3F (yes or no)=20= If I answer 'yes', the following block #+RESULTS: : bar is inserted below the source block; also I see, in the *Messages* buffer: executing Emacs-Lisp code block... foo Code block evaluation complete. and if if 'C-h v' for 'my-var', it says my-var=E2=80=99s value is =E2=80=98bar=E2=80=99 So far so good. (Well almost: why does '#+RESULTS:' show 'bar' and not 'foo'=3F After all, I'm just setting 'my-var', I'm not asking to display its value. But that's incidental.) (test 2) Same org file. If I do 'C-c C-e l o', no question is asked, no '#+RESULTS:' block is inserted, and the resulting pdf file shows: Contents (message "foo") (setq my-var =E2=80=99bar) The *Messages* buffer shows org-babel-exp process emacs-lisp at position 1... Saving file /home/cochard/tmp/scr.tex... Wrote /home/cochard/tmp/scr.tex Processing LaTeX file scr.tex... PDF file produced. Running /usr/bin/xdg-open /home/cochard/tmp/scr.pdf...done and 'my-var' is not understood as a variable. So I don't understand. I can only conclude that the code is not evaluated, which seems to me contradictory with "Org evaluates source code blocks in an Org file during export". (test 3) Same code, except that I change the 1st line to #+BEGIN=5FSRC emacs-lisp :exports results=20 If I do 'C-c C-e l o', I am asked the same question as in test 1: Evaluate this emacs-lisp code block on your system=3F (yes or no)=20= but even if I answer 'yes', no '#+RESULTS:' block is inserted. The *Messages* buffer shows org-babel-exp process emacs-lisp at position 1... executing Emacs-Lisp code block... foo Code block evaluation complete. Saving file /home/cochard/tmp/scr.tex... Wrote /home/cochard/tmp/scr.tex Processing LaTeX file scr.tex... PDF file produced. and the pdf file shows: Contents bar and my-var is defined. So the code is evaluated this time, but I don't really understand the whole process either... For example, what should I do if I want the code to be evaluated, the '#+RESUTS:' block to be inserted in the org file, but nothing to be shown in the exported pdf=3F (i.e., neither the code nor its results) Same question for code evaluation but nothing related to this code inserted or exported. I've tried using the ':eval' header argument but it never worked as I expected. Thank you for you help. --=20 EOST (=C3=89cole et Observatoire des Sciences de la Terre)=20 ITE (Institut Terre & Environnement) | alain.cochard@unistra.fr 5 rue Ren=C3=A9 Descartes [bureau 106] | Phone: +33 (0)3 68 85 50 44= =20 F-67084 Strasbourg Cedex, France | [ slot available for rent ]