From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UKFYFWCT3WCgWAEAgWs5BA (envelope-from ) for ; Thu, 01 Jul 2021 12:05:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8DIIEWCT3WDfRwAA1q6Kng (envelope-from ) for ; Thu, 01 Jul 2021 10:05:20 +0000 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 8F70C2C185 for ; Thu, 1 Jul 2021 12:05:19 +0200 (CEST) Received: from localhost ([::1]:43758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lytZO-00016L-Ku for larch@yhetil.org; Thu, 01 Jul 2021 06:05:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lynie-0002Gb-M2 for emacs-orgmode@gnu.org; Wed, 30 Jun 2021 23:50:28 -0400 Received: from mail-0201.mail-europe.com ([51.77.79.158]:57003) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lynib-0006ua-Bb for emacs-orgmode@gnu.org; Wed, 30 Jun 2021 23:50:28 -0400 Date: Thu, 01 Jul 2021 03:50:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1625111416; bh=luNI17yZy6YYERD5w/uQ6pSP6b5MUa7oGPNgGYU6l/Y=; h=Date:To:From:Reply-To:Subject:From; b=Vmevr8wgkYYxWx8uzwbRu4nKskU+iu2IHjF9vdp6CdoMA2adLEAPSPNbIYWuJvLhw 2G2tNtFbrAvmbzGL377HKlx0NBFik96KaXi67LlBkAZ2kxtlJFAtetOSPRQEB5tX83 dkjmtRXRm56T7/9YuUCWNKtz2SK2XWNqpDhJ/mqw= To: emacs-orgmode@gnu.org From: Jacopo De Simoi Subject: [PATCH] Fix erroneous tangling of blocks Message-ID: <2077251.irdbgypaU6@bl4ckspoons> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_UK2vglrFfbtilPkqmLGbxBzXlpUiuVeSHKYOwxciOs" Received-SPF: pass client-ip=51.77.79.158; envelope-from=jacopods@protonmail.com; helo=mail-0201.mail-europe.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 01 Jul 2021 06:00:27 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jacopo De Simoi Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625133919; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=luNI17yZy6YYERD5w/uQ6pSP6b5MUa7oGPNgGYU6l/Y=; b=eH16IA8J4Qr3BizcdjiTsStYnRPR2DrSNOn4lDIrwLVQ9+POIrJ5RSnOobiRYt1RGrtDCI TKuru66o49Pocz/lehpF+oJOq/p7Aqy0Nz67dPgDI/PIHVS0uo1mwLemTgb7K+3Ue8xS2P T5uj/o9g/JyxwJV4ASQrgBpEeBMcYyvCL87jNdF63zC4xEb3AQ0hHhUBnUoqR0H1LKVWFK azjstSBhhJWHpBTAk+ziXD/p8oGZyph/6dJ4LWMYeWEjaPWCAcXB8SSdHVzI7p6RRIfDMZ tv1lI+VtO/SO6hIyF8HU9cLtTwYhhQX8Rc89OzVwWTKXDLilspfZTRNlGN2K5A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625133919; a=rsa-sha256; cv=none; b=XCoPh1OkVcoSmO4UkJLRWrxpPsil/o2iBtIik09gDGINTtpEqxyu2Rc3osHRmcs4dwiZPj kjANCqyYj2wY3PqGSDbKaF2xR5zTDNtmziZgztNQO4I3ydCLj53HC282fIoGtf2UcgD7lu uNTk4zI7UE7m6ADqKDENBb0rEDEQpgo4SEophmByzGGKgpp2rahghIUEvQMzVctQ8/bGB9 9vSVgeHgnq+61CLwexSFG0FeVGm15O+iwlRsEGkZ1rLv3CCE0gf+aWkMUndmMjwbJ+vpo7 NR0MJyXpWGzhMZH0CzynE2UQYddP7G+0urlmVFD2TUf7xc35zKNCAtLV5Ksohg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b=Vmevr8wg; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.52 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b=Vmevr8wg; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 8F70C2C185 X-Spam-Score: -3.52 X-Migadu-Scanner: scn1.migadu.com X-TUID: Mi8Lz5KAQhFb This is a multi-part message in MIME format. --b1_UK2vglrFfbtilPkqmLGbxBzXlpUiuVeSHKYOwxciOs Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dear All, Please find attached a patch (against master) which takes care of the following issue. Assume I have a block like this #+begin_src sh :tangle no This should not be tangled #+end_src Then the block is correctly ignored when tangling the whole file, but erroneously tangled (to a file named "no") when tangling is run with the universal argument (so that only the current block should be tangled) This happens because the check for the "no" option is not performed when tangling a single block. In the proposed patch I address this issue by checking for the "no" option in the function org-babel-effective-tangled- filename --b1_UK2vglrFfbtilPkqmLGbxBzXlpUiuVeSHKYOwxciOs Content-Type: text/x-patch; name=0002-ob-tangle.el-Parse-correctly-tangle-options.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0002-ob-tangle.el-Parse-correctly-tangle-options.patch RnJvbSA0YWUzYjMyNjc1MGUwOTRiMzU5ZGU1YzkyMGNjOTY5NWVkYmVhMTZkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQ0KRnJvbTogSmFjb3BvIERlIFNpbW9pIDxqYWNvcG9kc0Bwcm90b25tYWls LmNvbT4NCkRhdGU6IFdlZCwgMzAgSnVuIDIwMjEgMjM6MzM6NTYgLTA0MDANClN1YmplY3Q6IFtQ QVRDSCAyLzJdIG9iLXRhbmdsZS5lbDogUGFyc2UgY29ycmVjdGx5IHRhbmdsZSBvcHRpb25zDQoN CiogbGlzcC9vYi10YW5nbGUuZWwgKG9yZy1iYWJlbC1lZmZlY3RpdmUtdGFuZ2xlZC1maWxlbmFt ZSk6IENoZWNrIGZvcg0KICB0aGUgIm5vIiBwYXJhbWV0ZXIgaW4gdGhpcyBmdW5jdGlvbiB0byBh dm9pZCBlcnJvbmVvdXMgdGFuZ2xpbmcgb2YgYQ0KICBzaW5nbGUgYmxvY2sgKGUuZy4gd2l0aCBD LXUgQy1jIEMtdiB0KSBldmVuIHdpdGggdGhlIHBhcmFtZXRlcg0KICA6dGFuZ2xlIG5vDQoNClRJ TllDSEFOR0UNCi0tLQ0KIGxpc3Avb2ItdGFuZ2xlLmVsIHwgMSArDQogMSBmaWxlIGNoYW5nZWQs IDEgaW5zZXJ0aW9uKCspDQoNCmRpZmYgLS1naXQgYS9saXNwL29iLXRhbmdsZS5lbCBiL2xpc3Av b2ItdGFuZ2xlLmVsDQppbmRleCAwMjM3OWQ0NGUuLjU4NTAyMDM2NCAxMDA2NDQNCi0tLSBhL2xp c3Avb2ItdGFuZ2xlLmVsDQorKysgYi9saXNwL29iLXRhbmdsZS5lbA0KQEAgLTM1OSw2ICszNTks NyBAQCBhcyBjb21wdXRlZCBieSBgb3JnLWJhYmVsLXRhbmdsZS1zaW5nbGUtYmxvY2snLiINCiAg ICAgICAgICAgICAgICAgICAgICgoc3RyaW5nPSAieWVzIiBzcmMtdGZpbGUpDQogICAgICAgICAg ICAgICAgICAgICAgOzsgVXNlIHRoZSBidWZmZXIgbmFtZQ0KICAgICAgICAgICAgICAgICAgICAg IChmaWxlLW5hbWUtc2Fucy1leHRlbnNpb24gYnVmZmVyLWZuKSkNCisgICAgICAgICAgICAgICAg ICAgICgoc3RyaW5nPSAibm8iIHNyYy10ZmlsZSkgbmlsKQ0KICAgICAgICAgICAgICAgICAgICAg KCg+IChsZW5ndGggc3JjLXRmaWxlKSAwKSBzcmMtdGZpbGUpKSkNCiAgICAgICAgIChleHQgKG9y IChjZHIgKGFzc29jIHNyYy1sYW5nIG9yZy1iYWJlbC10YW5nbGUtbGFuZy1leHRzKSkgc3JjLWxh bmcpKSkNCiAgICAgKHdoZW4gYmFzZS1uYW1lDQotLSANCjIuMzEuMQ0KDQo= --b1_UK2vglrFfbtilPkqmLGbxBzXlpUiuVeSHKYOwxciOs Content-Type: application/pgp-signature; name=attachment.asc Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=attachment.asc LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0NCg0KaVFFekJBQUJDQUFkRmlFRVc1cXU2aWtQ VHNub0lyQlNzUUFqc0hYek9pTUZBbURkTzJFQUNna1FzUUFqc0hYeg0KT2lORVlRZi9jMmZxTGRK VzcxNzZRNVkyZ1E1YkprRTY5MjcraXlLc3pvS2RXMWhtaUU2bXoyNVZEMU1yU2VzNw0KOWpkaHlT N2hJcXlyby9LUjNiRXBlejdmWkZlZnRkSmFhdUtKT2lLMXFZUGwxeU9YUU5pR3l6SUZjdy8wL24y NQ0KSklYZk5nU2JrS3E1K0E5TzBkbGxBZlhzQmlENlJhWWRpQUlYdGZVQnpUSWZCRHBrU0pGcCtB ZlBWWjVSdjQ2ZQ0Kd1pkU294ajY0eDlmQzlWc0xoRlprRFhrTVN4RnZ2VVRzM0dTS0VIaXQwVmgw T1N4OWI3dEpCSHU5Wm9CSDdxcg0KWjlndVNPNXdwTVkzdDJJeE81UHRNRkxWSjc0T0o4N0cwMTZP VzVDNnRmSUNTWXNSRkVmZ3lpNXJiSU9JU3VybQ0KMzlQeUx2RnUwYkFmZllyUWE4WGdLWEVPU01l S2FRPT0NCj04eVhiDQotLS0tLUVORCBQR1AgU0lHTkFUVVJFLS0tLS0NCg== --b1_UK2vglrFfbtilPkqmLGbxBzXlpUiuVeSHKYOwxciOs--