From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id SOdcHp/sYmUblAAAG6o9tA:P1 (envelope-from ) for ; Sun, 26 Nov 2023 07:58:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SOdcHp/sYmUblAAAG6o9tA (envelope-from ) for ; Sun, 26 Nov 2023 07:58:39 +0100 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 0C5F24097A for ; Sun, 26 Nov 2023 07:58:38 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=nifty.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1700981919; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=vNX5cTN2La2d7MeyuE8HkfoPxTpCx2Lb4HlvmlHWoNU=; b=Hfm1TmaxNNBrJgvCSi59XFkYtgbD2AlMBO/zutsgcdaz1tjK1JpQRGEKDw5l30ym0xnXWT AoWIKf+XZtX03OzgJMyupnp4H/iiib4YuBGEI8gR7kqZ6wB0p4xH8vavXMizrHgesH2E+Y 0QSo99dW7WAhn44h6ePxVrv8Lp1J+Ij6WW8DWvhImoZrueVg011cm+bPYE1/aQwZmCucqx wgojBczKvBA8kIKdLLDAoJs0yKIp/foO9EA1R+qqWFd6qufEvlpETc9L0++gOlfVj53pOV kLHUZyv83kVG/RxsIfGD5K6+TuaZ6POLRvqU+GywhCUuBzBgO19+F9mSqqNtYA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=nifty.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1700981919; a=rsa-sha256; cv=none; b=kRS8ztk/flteFrf3Jy+3uv9Ez1HjVzDZDWxIVDvsH2RpcH8U9N4hGUlHrWlN/dAIgEUpam fo8H4Xwixl5EemBZD5ByezsRewfN3+VbqXfV29xRIdBiKaE7LvAA4PgSBIxWyFomo6Ctmk jkaIpaRlbnvdM60krlu4V4PJAarpI90BY0c1tsvbFLCFAhJJ/fKpPkOhbgedHMACYy6HYf xbR9sT8kWvHGgmfpB9VbF2voS45JaEHxnzSIpWcgbc/0nxmNrQwWMh+A8+ziMnuQoNrCpq ZwcQ9xRdEQS7pFEtT+Tk4vj+df3pff/Nb5aFxQc6HAIoNXhCFoTSMOIDh2iGmA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r795D-000417-Me; Sun, 26 Nov 2023 01:57:36 -0500 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 1r7959-00040z-WF for emacs-orgmode@gnu.org; Sun, 26 Nov 2023 01:57:33 -0500 Received: from mta-snd01007.nifty.com ([106.153.227.39] helo=dmta1020.nifty.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r7957-00089G-DH for emacs-orgmode@gnu.org; Sun, 26 Nov 2023 01:57:31 -0500 Received: from LAPTOP-89LTAUNV.yfb02119.nifty.com by dmta1020.nifty.com with ESMTP id <20231126065717777.GFOZ.131070.LAPTOP-89LTAUNV.yfb02119.nifty.com@nifty.com> for ; Sun, 26 Nov 2023 15:57:17 +0900 From: TAKAHASHI Yoshio To: emacs-orgmode@gnu.org Subject: [BUG] org-babel-load-file, org-babel-tangle-use-relative-file-links and :tangle header [9.6.11 (release_9.6.11 @ /opt/emacs/share/emacs/30.0.50/lisp/org/)] User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sun, 26 Nov 2023 15:57:16 +0900 Message-ID: <87il5phuib.fsf@yfb02119.nifty.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=106.153.227.39; envelope-from=yfb02119@nifty.com; helo=dmta1020.nifty.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_BL_SPAMCOP_NET=1.347, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.08 X-Spam-Score: -1.08 X-Migadu-Queue-Id: 0C5F24097A X-Migadu-Scanner: mx13.migadu.com X-TUID: l2JZO/7XfbcZ Hi emacs-orgmode developers, When org-babel-tangle-use-relative-file-links is t (default), org-babel-load-file ignores any source block that does not have `:tangle "yes"' or `:tangle filepath' header. Even if org-babel-default-header-args is changed like (setq org-babel-default-header-args (cons '(:tangle . "yes") (assq-delete-all :noweb org-babel-default-header-args))) , the result is same. When org-babel-tangle-use-relative-file-links is set to nil, it extracts blocks have not :tangle header, in addition to have `:tangle "yes"' or `:tangle filepath', and this is what I expect. It may be too early to remove direcoty part from buffer file name in org-babel-tangle-single-block. test org-mode file: # --start-- #+begin_src emacs-lisp (setq a 1) #+end_src #+begin_src emacs-lisp :tangle (if t "yes" "no") (setq b 2) #+end_src #+begin_src emacs-lisp (setq c 3) #+end_src #+begin_src emacs-lisp :tangle "yes" (setq d 4) #+end_src #+begin_src emacs-lisp (setq e 5) #+end_src # --end-- When invoke `(org-babel-load-file "ABOVEFILE.org")' with org-babel-tangle-use-relative-file-links is t, the result .el file is: # --start-- (setq b 2) (setq d 4) # --end-- With org-babel-tangle-use-relative-file-links is nil, the result is (as expected): # --start-- (setq a 1) (setq b 2) (setq c 3) (setq d 4) (setq e 5) # --end-- Emacs : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2023-11-19 Package: Org mode version 9.6.11 (release_9.6.11 @ /opt/emacs/share/emacs/30.0.50/lisp/org/) -- TAKAHASHI Yoshio