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 +ALiE/ayz2Jk1gAAbAwnHQ (envelope-from ) for ; Thu, 14 Jul 2022 08:08:54 +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 YBbVE/ayz2IpZwAA9RJhRA (envelope-from ) for ; Thu, 14 Jul 2022 08:08:54 +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 E458A8577 for ; Thu, 14 Jul 2022 08:08:53 +0200 (CEST) Received: from localhost ([::1]:53012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBs1n-00026E-Jl for larch@yhetil.org; Thu, 14 Jul 2022 02:08:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBs0E-00023n-Ga for emacs-orgmode@gnu.org; Thu, 14 Jul 2022 02:07:12 -0400 Received: from mr85p00im-zteg06023901.me.com ([17.58.23.192]:54950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBs08-00025B-E8 for emacs-orgmode@gnu.org; Thu, 14 Jul 2022 02:07:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1657778822; bh=1qj/Bvaxb0kJ6+aXXCZ+qdzr0p5YcZ7j3oHzQ3jKWm8=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=AZypLAU5yGcJ2tfz11cv/ynzt+lxggRgkznE7tU1sXdzrw9GhDAo/Sx2v9th4fF5J OrRgCZwPI95QlZwy3T7ZdrFWl524RNzi96Q835c7OwxaVLEz0VXp6QCIPKUFUcpGa4 XGG71MLSixaTHKaBOcvDgfJHMFDM7+2gTG6I0c5gvXAdbdR0Gb01stIXb6neZXQPOo VCOP+By/rmCSWL2QsB3+SYhL4a+9dZZG/1Q950rd2sNNTY6buCL3j/eRqYR7erFgXj 2ml6Oa0Lw3PI+K1cKDOFPJHgGRJp5T4KbIyVHPcs7DHh1jylKBmIi9/1D290fPTyZe 7bXEdIz/+81YA== Received: from Rudolfs-MacBook-Air.local (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-zteg06023901.me.com (Postfix) with ESMTPSA id 5C9E16E075A; Thu, 14 Jul 2022 06:07:01 +0000 (UTC) From: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= To: alain.cochard@unistra.fr, Org Mode List 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> Date: Thu, 14 Jul 2022 08:06:58 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: 3pHgNfgB2kS1Og6_nmeH4J5EcqsbnJle X-Proofpoint-GUID: 3pHgNfgB2kS1Og6_nmeH4J5EcqsbnJle X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.572,17.11.62.513.0000000_definitions?= =?UTF-8?Q?=3D2022-01-14=5F01:2022-01-14=5F01,2020-02-14=5F11,2021-12-02?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=842 clxscore=1015 adultscore=0 suspectscore=0 phishscore=0 spamscore=0 malwarescore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2207140024 Received-SPF: pass client-ip=17.58.23.192; envelope-from=salutis@me.com; helo=mr85p00im-zteg06023901.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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" 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=1657778933; 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: 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=1qj/Bvaxb0kJ6+aXXCZ+qdzr0p5YcZ7j3oHzQ3jKWm8=; b=XrzatcCl/NCcOqPb574ugLI+AjoKQsS2O2h8DRq91L/IpW0vpmzDiqUf0gK6FhqkyMu4I0 XzjTmxyv79UMy3ClNXUb3OpHLjjRZPbhoxdiW6gyhKq4sSAS+/foZR6e40VlZcKW6jzSy2 kaw0+SWh6rYjZeYJv8khvTctYfblolNDf/FTsoDnOvO2yiCHelPZ73iqwrFC9ol9+ypsCw ukwiekhrvtSNLsmPxuJKvTpO9jzt4Hh79Zdkje1bRjfABsuZ0lN2B17zQngPAW/zOSXvMh 7/VNuzth7Gz+D8M63cA/vNbCfe5WqU+JZKPVT2gjoyFOF/agrg6+k93mtjYe/Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657778933; a=rsa-sha256; cv=none; b=sJpfEOVv8CqVEQacz2ONhfbJiXCN1HrFdkmn/Q0RHaUovolGF04H2U0M7XgMLqiC78mJz0 CvqozPr9qWrdz2vSlXUuhNPh62CjzFLINT4s7A3wO8M1S6v5/dmUOwx2R+2UBGQn/JABeO 2Tf908BOywxlamvsIWOSOkt7auQXbM2CBOLgySRwiXfKRhFZuatXTfRe3ufoNCv8Iqf9qH sgUTsVti6FHBNilwSnLaCAjG6jSpxzrwSGsfXuUP3qPmLroYx+n6PVhq+BEV+Gm/cBGSx9 ZVEljcHhKBmZTHd8kx5xAxJLaIranQlBg0DlsKmqCk7f20Zo3erQLSCkQF8SzQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=me.com header.s=1a1hai header.b=AZypLAU5; dmarc=pass (policy=quarantine) header.from=me.com; 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: -9.44 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=me.com header.s=1a1hai header.b=AZypLAU5; dmarc=pass (policy=quarantine) header.from=me.com; 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: E458A8577 X-Spam-Score: -9.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: RuP3XmhptvJE Alain.Cochard@unistra.fr writes: > Org evaluates source code blocks in an Org file during export. I have just tried to export the following document: #+begin_src emacs-lisp :exports both (+ 1 1) #+end_src The exported HTML file contains the expression '(+ 1 1)' along with '2', its value. It follows that Emacs does evaluate source blocks on export. (Note that Org did not add RESULTS to the Org file during export, for no export should ever modify the source file in any way.) > why does '#+RESULTS:' show 'bar' and not 'foo'? By default, the Org mode captures the value of the last expression. In your case, the last expression has the value of 'bar'. If you want to capture something else for the result, such as standard output, you must tell Org Babel about it with the ':results' argument. It makes sense, if you think about it. The computer cannot possibly know what you want to capture. Rudy --=20 "The introduction of suitable abstractions is our only mental aid to organize and master complexity." -- Edsger Wybe Dijkstra, 1930-2002 Rudolf Adamkovi=C4=8D [he/him] Studenohorsk=C3=A1 25 84103 Bratislava Slovakia