From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 WGinJAhKTWMpkQAAbAwnHQ (envelope-from ) for ; Mon, 17 Oct 2022 14:26:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YOZ8IwhKTWPxCwAAG6o9tA (envelope-from ) for ; Mon, 17 Oct 2022 14:26:48 +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 4C29BF793 for ; Mon, 17 Oct 2022 14:26:48 +0200 (CEST) Received: from localhost ([::1]:46378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okPCh-0003Bv-Fn for larch@yhetil.org; Mon, 17 Oct 2022 08:26:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okPA2-0003Au-PC for emacs-orgmode@gnu.org; Mon, 17 Oct 2022 08:24:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48624) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okPA2-0007Ha-49 for emacs-orgmode@gnu.org; Mon, 17 Oct 2022 08:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okPA1-0006u9-Ug for emacs-orgmode@gnu.org; Mon, 17 Oct 2022 08:24:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#50218: 28.0.50; org-babel-tangle-file tangles code blocks starting with #+begin_src :tangle no Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: emacs-orgmode@gnu.org Resent-Date: Mon, 17 Oct 2022 12:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50218 X-GNU-PR-Package: org-mode X-GNU-PR-Keywords: To: Tassilo Neubauer Cc: 50218@debbugs.gnu.org Received: via spool by 50218-submit@debbugs.gnu.org id=B50218.166600943226508 (code B ref 50218); Mon, 17 Oct 2022 12:24:01 +0000 Received: (at 50218) by debbugs.gnu.org; 17 Oct 2022 12:23:52 +0000 Received: from localhost ([127.0.0.1]:47699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okP9s-0006tU-F0 for submit@debbugs.gnu.org; Mon, 17 Oct 2022 08:23:52 -0400 Received: from mout02.posteo.de ([185.67.36.66]:57263) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okP9q-0006tF-4O for 50218@debbugs.gnu.org; Mon, 17 Oct 2022 08:23:51 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 26491240101 for <50218@debbugs.gnu.org>; Mon, 17 Oct 2022 14:23:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666009424; bh=yMEs5a6AaQU38pOQdOHxHM/gaW2hqxCqjv+ZDmWio50=; h=From:To:Cc:Subject:Date:From; b=JkKbT7Toow7u8Bcbf9zJieWaTM7Bf3ZxNVMth1wM8YJiQC/yD8fmQqmRE5cJox3Xw tTd5XXtyBPHp5vPSHQsYuWRBMXTZ+a1Cu2xlDXBADwfGtBOKFwSr1OIUdngvzeX1j0 QFaJgBhToyIJdu915Tw1nio/JivYX6dlsTi5dkMflRe76vkYVjtkdESikxcauETUYh wmGqcgAAsc7AiGJInf2At+7EKvgLvLJxneqCtRBDibj7rhPVwgpxMpPYcDvnANpqqq Le3NUsOOb2K/MkyVSnfRuTKGKTVfRiv+ZiULz+iWMHbfZrLVm7fsELRnjlRr3GNcpd 8byNhgBxWgpEA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mrbkh299Pz9rxB; Mon, 17 Oct 2022 14:23:39 +0200 (CEST) From: Ihor Radchenko In-Reply-To: <9d143449-d2db-179b-24da-b4e4d6a33319@gmail.com> References: <9d143449-d2db-179b-24da-b4e4d6a33319@gmail.com> Date: Mon, 17 Oct 2022 12:24:15 +0000 Message-ID: <87mt9uprio.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: emacs-orgmode@gnu.org 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666009608; 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:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=XR9X0Sdk0bxohP3U6sL0sk9m8aTWoTWlH66I7DQ+UCQ=; b=IWp1tLRuNwzQ3aYKUW8xDvj+wJAxzdRAXe/uXkb7cMsMcstczPslexyo9UvVG5ILwR2F8S 1M8/1CL18lb+juBqWMT63aGgmtWH0+pKAOpgfNd/uypT4KUiwYeOyappr0OLnB7kzTcmAf OFPbUR526nwqOYUTEsJ7gugWmCythbfwl4tGTo+Hqzp1rImUkcp8yJ0roXIPsD/aVFlP2O Ekhp6HFdOdEzPM9zGMn5PV+AYviAymNIc0zaxirTjXVX0/JqT2y9tvdlKjpY5pfXfVAIu3 57dJdBtmM0COiXrgGSIFFB6BoV987tQbAQTWIy3EFnLfH1dsEqOG2BIquuagpQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666009608; a=rsa-sha256; cv=none; b=bdPFZHXp6sFSx+Ik2LxZp+0nFgdsVQIGWJab8p6ZHH/F4GgjqkS2ulq4qJg/kUqLdtEoE1 Pc6aN7k708hoK5VOVUTHhDLIFDS4lyd2ORTV+1LgRLoSSFrh4gzkskV5GaQgKo36/gA/HM XUUZBrh4ZEPK4zLqlyQSBU2QdQVl8GutKlzJMgsPcDtbzjcr/H9SnA9NUGJTfewyUJbFgE a1qHK5M7AvgZ7FC+DjUrH1JwBJJ6//bN0Vg0PRM00SVAjPqzAISyNVOPWyYXZi5Eu9oxYx lu2F8PLfOR4Ua6RVY4Lqz7EkNzr3hjvPkG2xhsGUlJwoBepXw2I1i5t+Zpw/bw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=JkKbT7To; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=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.78 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=JkKbT7To; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=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: 4C29BF793 X-Spam-Score: 5.78 X-Migadu-Scanner: scn0.migadu.com X-TUID: gKSdMxPFegcM Tassilo Neubauer writes: > Here are the steps that led to code blocks being tangled I did not > expect to: > > emacs -Q > C-x C-h: ~/org-roam/example.org > content of example.org (excluding "): > " > #+begin_src emacs-lisp > (setq some-emacs-lisp-variable t) > #+end_src > > #+begin_src :tangle no > ;;This line should not be in the elisp code > #+end_src > " > > open scratch buffer through menu. > type into scratch buffer: > (org-bable-tangle-file "/home/tassilo/org-roam/example.org" > "/home/tassilo/org-roam/example.el") > M-x:emacs-lisp-mode > Select (with mouse) the above line and evaluate region through menu. > I see in the minibuffer: "Tangled 2 code blocks from example.org" > After typing C-h C-f: ~/org-roam/example.el > I see the file content of "example.el" (excluding "): > " > (setq some-emacs-lisp-variable t) > > ;;This line should not be in the elisp code > > " Well. I can see why you did not expect this, but the real cause is a typo in your code block. #+begin_src :tangle no ;;This line should not be in the elisp code #+end_src is viewed by Org mode as src block written in ":tangle" programming language :) That's because you forgot to put language in the block and Org takes the first word after #+begin_src and the language name. This block does not have :tangle attribute and thus "example.el" supplied in your function call is being used :) On Org side, we may catch such scenarios in org-lint. M-x org-lint currently reports no problem with the above block. Not urgent fix. Patches are welcome :) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at