From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id mBzUHErOLGZsFgEA62LTzQ:P1 (envelope-from ) for ; Sat, 27 Apr 2024 12:07:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id mBzUHErOLGZsFgEA62LTzQ (envelope-from ) for ; Sat, 27 Apr 2024 12:07:06 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=umich.edu header.s=relay-2018-08-29 header.b=RzFwX9Q2; dmarc=pass (policy=none) header.from=umich.edu; 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-Seal: i=1; s=key1; d=yhetil.org; t=1714212426; a=rsa-sha256; cv=none; b=iwQMuakW0+5Ea6SKWEwcY6I8Y1O6uQa0zt5Pchl162GhTrdqOeqrTuTKis78lcbxajErwk g/zw3cSohhdT7JdHMckvOAcwRQf4YTdWPv3BOE6Jf2pN9CqaZ8CQu4Hj8dKPhc7JxhX4x8 lLW735PL728WYaGDVb6F7Y0FY/A4YP4b0hFYor8I/pA5JcDuOqiXZYXpXv0D0ift1rEWkd NOkrRDGWkbqeZp3Cc1KSCy2bRpjJvenbT5paeLsiHWbSwecIT3m8DF1Nf4yMXiuPjE2vm0 iST0XalEeai0LVlASNzyW/9sHAV/+SoQ0C6S26xsJNtnpYbQdxtayGj+fH0p6Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=umich.edu header.s=relay-2018-08-29 header.b=RzFwX9Q2; dmarc=pass (policy=none) header.from=umich.edu; 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=1714212426; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=05BuvWwMf1Nlz/8Xj9X7eDKK8QFp/CM1pCmXqTDlC3E=; b=KePUS+OkwqPETDspP6Tiemjxv8C4uTJjeVxdnDef4nmSsFaF1bmbhdmU8t2eRHYLutxlGt j5soYty9ZT2SLmNBy6wIBGGfpb0TGUEWkx/TaXqkSCjKGnmF4ZmhprRPHsMOkeOb8m1hlq 1bmgDGj4Lx9+ayWQMdTJto67peygj4ZHszlmSl3JdA/5W/iJGiBy07uWFWeDvzxFcT50Wb 3axZXvoPwS86d4ai/bUw3mtxcazGbObMM0qn1qPPjKKWgZzNHLBLZbImdAL/zDYTino9uW b+UeQIxUmdgUCqkSXgqVT0t2WTqNudxZmGJBK5HdB+wUZ5xs1fPh/OYMRwGfvw== 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 5A4A11708D for ; Sat, 27 Apr 2024 12:07:05 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0ewd-00070W-Nz; Sat, 27 Apr 2024 06:06:11 -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 1s0ewb-00070I-Fl for emacs-orgmode@gnu.org; Sat, 27 Apr 2024 06:06:09 -0400 Received: from relay-egress-host.us-east-2.a.mail.umich.edu ([13.59.128.245] helo=tan-culhwch.relay-egress.a.mail.umich.edu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1s0ewX-00030Y-2k for emacs-orgmode@gnu.org; Sat, 27 Apr 2024 06:06:09 -0400 Received: from growing-hellhound.authn-relay.a.mail.umich.edu (ip-10-0-72-78.us-east-2.compute.internal [10.0.72.78]) by tan-culhwch.relay-egress.a.mail.umich.edu with ESMTPS id 662CCE06.8984BB7.427EA2D7.2288036; Sat, 27 Apr 2024 06:05:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=relay-2018-08-29; t=1714212357; bh=05BuvWwMf1Nlz/8Xj9X7eDKK8QFp/CM1pCmXqTDlC3E=; h=From:To:Subject:Date; b=RzFwX9Q240/MplKIqidIL0VM1ZwZiSl6YRBl5XRNkoiGmUsZF/RR66VvUrODZgP21 rGXJib63W2xXMYqqzwy49doC2qOnPwuqGwKN26cGsbiqVWx/dcWox7R4NwKHDikOVH Ee6lQcCeEKG0L6M3ekAfKM4LagtbyiEAS2Ijgket9cM1XDHDRl5ncS+AkJGRqfVoY3 jiaWSMyGXraba1AdXX4wawI7dqn/VeAhM1Z0ukPpT0CrRA7Cq9YSYOUNhe1tggMudP XDSV+i0YYkemgIRTJKiVOdbrZ7kpSkN01G1P1UstTM4sQYyaeNGrdBXeFLHb1GMlbg Nspr6IIDsg22A== Received: from localhost (Mismatch [85.108.168.244]) by growing-hellhound.authn-relay.a.mail.umich.edu with ESMTPSA id 662CCE04.3278D674.5E07A4DA.1293011; Sat, 27 Apr 2024 06:05:57 -0400 From: Greg Minshall To: emacs-orgmode@gnu.org Subject: [BUG] oddity tangling src_blk with :var [9.7-pre (release_9.6.26-1368-g1ae978 @ /home/minshall/.emacs.d/straight/build/org/)] X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 30.0.50 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <139511.1714212352.1@archlinux> Content-Transfer-Encoding: quoted-printable Date: Sat, 27 Apr 2024 13:05:52 +0300 Message-ID: <139512.1714212352@archlinux> Received-SPF: pass client-ip=13.59.128.245; envelope-from=minshall@umich.edu; helo=tan-culhwch.relay-egress.a.mail.umich.edu 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 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 X-Migadu-Queue-Id: 5A4A11708D X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -11.49 X-Spam-Score: -11.49 X-TUID: lF96lwb+sKlA Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ hi. the following org block describes a problem i noticed. possibly the fix is simply issuing an appropriate error message (and aborting the process of tangling. thanks for looking at this when you have a chance. and, apologies if this is a FAQ. cheers, Greg #+begin_src org ,** introduction this is to show an oddity -- a bug, or a security feature? -- in tangling a source code block that has a variable (=3D:var=3D) header argument. if the variable =3Dorg-babel-load-languages=3D includes the source type = of the code block (e.g., "shell", "python", etc.), the variable will be set in the tangled file. if =3Dorg-babel-load-languages=3D does *not* include that source type, the variable will be unset in the tangled file. without any error message. (note that in a running emacs, *removing* elements from =3Dorg-babel-load-languages=3D doesn't seem to cause this problem to appear. maybe this is because the relevant "ob-..." files have already been loaded?) to see this, first *tangle* this file, to get works.el, fails.el, and variable.sh, and then evaluate this code block: ,#+name: DemonstrateBehavior ,#+begin_src sh :results output ./works.el echo -n "works.el: " ./variable.sh ./fails.el echo -n "fails.el: " ./variable.sh ,#+end_src ,#+RESULTS: DemonstrateBehavior : works.el: 2.4 : fails.el: = notice that after running fails.el, the 2.4 disappears. ,** this is the test code and blocks here is the variable to be included. ,#+name: variable | 2.4 | and, the code block that includes that variable ,#+begin_src sh :var variable=3Dvariable :shebang #!/bin/sh :tangle vari= able.sh echo "${variable}" ,#+end_src tangling with this works ,#+begin_src elisp :tangle works.el :shebang "#!/usr/bin/env -S emacs --= script" (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (shell . t))) (org-babel-tangle-file "maybe.org") ,#+end_src tangling with this fails (notice the absence of =3D(shell . t)=3D) ,#+begin_src elisp :tangle fails.el :shebang "#!/usr/bin/env -S emacs --= script" (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t))) (org-babel-tangle-file "maybe.org") ,#+end_src #+end_src Emacs : GNU Emacs 30.0.50 (build 14, x86_64-pc-linux-gnu, GTK+ Version 3.= 24.38, cairo version 1.18.0) of 2023-11-20 Package: Org mode version 9.7-pre (release_9.6.26-1368-g1ae978 @ /home/min= shall/.emacs.d/straight/build/org/)