From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id p39tLzdAkmD1PwEAgWs5BA (envelope-from ) for ; Wed, 05 May 2021 08:50:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id IGdiKjdAkmBVZwAAbx9fmQ (envelope-from ) for ; Wed, 05 May 2021 06:50:31 +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 14EE2259B7 for ; Wed, 5 May 2021 08:50:31 +0200 (CEST) Received: from localhost ([::1]:58342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leBMb-0004bf-TL for larch@yhetil.org; Wed, 05 May 2021 02:50:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leBMC-0004bU-IY for emacs-orgmode@gnu.org; Wed, 05 May 2021 02:50:04 -0400 Received: from mout02.posteo.de ([185.67.36.66]:41471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leBM9-000865-2o for emacs-orgmode@gnu.org; Wed, 05 May 2021 02:50:04 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 7CF1A2400FD for ; Wed, 5 May 2021 08:49:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.eu; s=2017; t=1620197398; bh=o8BOAdc8KYWQJCteKuVd25IH9FWn+jiIDvT1mBym7bE=; h=Subject:To:Cc:From:Date:From; b=kr6MBeNdbI85XmVTdqImK8bvzMYaNwnDR+MR+stc4mRNjRdThOMBlpAnOddEc0N/8 meYzZE/tZYBwfh8zf7u8uCBdtLS/cPPXgmwYkwdSBQdABR8Yw53GAhHYpoqIePex3U ZboS/t9Lb0ABGTP4iZJXlxfXuVtfLZUtAA4WrQeo8uZ07IzYNpvs1tAvYGQ8lhGlSa esHlzgKtmeiah4dsxf8ignxyKhjWyNWhIRBF8OU7JZi4csK7IFdMD2CU+D9T3x0APU NKtEnDZuqbrwi69r4a7hJHL15sP7GVgG3MjU5wuvaOIxAUj4BclVCWkMBbx8bWM6wG wwkqY4ACYABlQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FZnQF6V35z6tmn; Wed, 5 May 2021 08:49:57 +0200 (CEST) Subject: Re: Bug: [PATCH] org-babel-tangle: persmission denied when tangling [9.4.5 (9.4.5-gbc2659 @ /home/n/.emacs.d/straight/build/org/)] To: No Wayman References: <875yzy73k0.fsf@gmail.com> <1e5a447a-2453-09da-fa51-379c9187b210@posteo.eu> <8735v2706t.fsf@gmail.com> <87im3ys0ik.fsf@gnu.org> <28c262ba-7816-a38f-8d1d-c4d6d880d2e2@posteo.eu> <87y2ctlviu.fsf@gmail.com> From: =?UTF-8?Q?S=c3=a9bastien_Miquel?= Message-ID: Date: Wed, 5 May 2021 06:49:56 +0000 MIME-Version: 1.0 In-Reply-To: <87y2ctlviu.fsf@gmail.com> Content-Type: multipart/mixed; boundary="------------6F4A4961564FC1EF58B046D1" Content-Language: fr Received-SPF: pass client-ip=185.67.36.66; envelope-from=sebastien.miquel@posteo.eu; helo=mout02.posteo.de 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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: sebastien.miquel@posteo.eu Cc: Bastien , emacs-orgmode@gnu.org 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=1620197431; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MuWn2GN9CD+CZhjvpZievV3VnsEMSMiOvm7L3TLHVow=; b=dL9wWfjqEqxz0jtf9OwkyfjwnmihtS8soUqdaeCT5gW8P2xMgwT4ICA9i0ET00VwSVo8y1 k6X/dFd9ZFodarev44OavGWpT9RLH+6uSieRu6DNCNhjEtY8gG29pJVB7jjOvmZDRYfugp kJHJomC6lMhDXfvd9oUm4wUxQWSnCqBz+0/0kKWueE6bScUC4f5ovDKyZSKV2udSr1DUL4 rccuuB/vjUOBgREtuUT7RfFgy3r0iawjM5Af7jAkSQgCjmnGqPglch67QqbnGNsdD5nmJS ZCWnqimlr8uEGuoJhvcEeWhHA5fTT0EP4C+/R1Cwbh4qyIBFYvYaw0WHqwS2UA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620197431; a=rsa-sha256; cv=none; b=RLB0PrGn2NOs9BK50zE/YqgLExFD5rOc9wFTnig0ex+fkbayC22Q9cLeeCa4iczYp1G2EA Is3bgSkP+JCYmZVrHU5+8WSIgbWhUstiiQjFm0j4l7rmafaZ4aYsjVLbWZtU3avgsYvMUb LWpREcL/7t9Dy4vybaHbd9jky/iQc1GT9X/FzEGxk4kUwBU2Cp7iFAAzI+Zi2SeLlTSpwI vaHTMyUIHIBWuTBo73O0RhK1lXJ+jQoqGPkilSdLwWfuWb8wWWUAPy6oa2EFfEH5WpDwp2 nyO6caZcfEvkwbxRgZWlOw9M1aSyPrs5srmG8HsxrpTW297Kq+CIPmnKmgD5HA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.eu header.s=2017 header.b=kr6MBeNd; 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.16 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.eu header.s=2017 header.b=kr6MBeNd; dmarc=pass (policy=none) header.from=posteo.eu; 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: 14EE2259B7 X-Spam-Score: -3.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0+gnXFUAqa1X This is a multi-part message in MIME format. --------------6F4A4961564FC1EF58B046D1 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit No Wayman writes: > Another related bug to the changes: > > I have the :tangle header-arg set to evaluate some elisp to return the > file name: > > org-babel no longer interprets this elisp. It is being used literally > as the file name: > e.g. > > Wrote /home/n/.emacs.d/(concat (file-name-sans-extension > (buffer-file-name)) ".el") Here's another patch, to be applied on top of the previous one, that fixes this. The specific case you mention can also be achieved by setting the :tangle argument to `yes`: in this case, the tangled file name is computed using the buffer file name and changing the extension according to the src block language. Thank you again for the report, and sorry for breaking everything. -- Sébastien Miquel --------------6F4A4961564FC1EF58B046D1 Content-Type: text/x-patch; charset=UTF-8; name="0001-ob-tangle.el-org-babel-tangle-collect-blocks-Use-cor.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-ob-tangle.el-org-babel-tangle-collect-blocks-Use-cor.pa"; filename*1="tch" >From b7c5103fdd05c3d30805ebcc5084ef82c44cd8ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Wed, 5 May 2021 08:31:43 +0200 Subject: [PATCH] ob-tangle.el: (org-babel-tangle-collect-blocks): Use correct tangle name * lisp/ob-tangle.el: (org-babel-tangle-collect-blocks): Use correct tangle name. The :tangle header argument might be some elisp, to be evaluated. --- Range-diff: -: --------- > 1: b7c5103fd ob-tangle.el: (org-babel-tangle-collect-blocks): Use correct tangle name lisp/ob-tangle.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 96a4ef049..8af03b11a 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -377,6 +377,7 @@ be used to limit the collected code blocks by target file." ;; Add the spec for this block to blocks under its tangled ;; file name. (let* ((block (org-babel-tangle-single-block counter)) + (src-tfile (cdr (assq :tangle (nth 4 block)))) (base-name (cond ((string= "yes" src-tfile) ;; buffer name -- 2.31.1 --------------6F4A4961564FC1EF58B046D1--