From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MBliDhPsjmP8PgAAbAwnHQ (envelope-from ) for ; Tue, 06 Dec 2022 08:15:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gCNsDhPsjmOJTAEA9RJhRA (envelope-from ) for ; Tue, 06 Dec 2022 08:15:31 +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 D3D621B16F for ; Tue, 6 Dec 2022 08:15:30 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2SAM-0003G6-J8; Tue, 06 Dec 2022 02:14:58 -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 1p2SAK-0003Dt-H3 for emacs-orgmode@gnu.org; Tue, 06 Dec 2022 02:14:56 -0500 Received: from love.tolo.nu ([2a02:750:7::116]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2SAI-0001vS-2g for emacs-orgmode@gnu.org; Tue, 06 Dec 2022 02:14:56 -0500 Received: from nils.tolo.nu (unknown [172.18.0.3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by love.tolo.nu (Postfix) with ESMTPS id E3A904021887 for ; Tue, 6 Dec 2022 08:14:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=toloe.se; s=mail; t=1670310890; bh=8dv9oZmwzK6v5r/zbxvGsaGKY6mgP9130ZyODEjBBWc=; h=References:From:To:Subject:Date:In-reply-to:From; b=JDtVZRFBcZjtsnNOza3FKNr9I9eBLIIhQrnLd5Tmd9Pc7adReuMHQXNEkw3GWac6A 7lwH7edJiSb8hSffQeDrmgZnC0mK94t1jUD0+wUHg1s9IhKEsGWZBOhu6TPya1/v5V 6jeYzF6ghouCzFBHFeRZdaWRlMkwU3O6nzLI/SlQ= Received: by nils.tolo.nu (Postfix, from userid 1000) id 5561E4C166E; Tue, 6 Dec 2022 08:14:50 +0100 (CET) References: <875yesnia6.fsf@toloe.se> User-agent: mu4e 1.8.11; emacs 30.0.50 From: Johan =?utf-8?Q?Tol=C3=B6?= To: emacs-orgmode@gnu.org Subject: Re: [BUG] (org-babel-result-to-file) adds the relative path even if attachment link is generated [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)] Date: Tue, 06 Dec 2022 08:11:15 +0100 In-reply-to: <875yesnia6.fsf@toloe.se> Message-ID: <875yep2ec5.fsf@toloe.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a02:750:7::116; envelope-from=johan@toloe.se; helo=love.tolo.nu 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, SPF_HELO_PASS=-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-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670310931; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=8H173X18CkZfYiMqxCLzWVqMuchEXj3SjePI7ifk1hs=; b=Xd4lXshnjS4biNp/es0PklU1xCPS0RC35kDucfdoclcmC18W/KpWO7ZzbGkIncoU9a7EUS +f0t02Cq8wERE5/od4RVxJ1NWm9rPFDWbxNHGyh/28rAuhDK1qNzrpzuJo8O0lTEGgA19i qj3heRLy3Ma5rmUVJa4xUOosCh+c7KaPr+HkIpR6noncaF9SITW3/nHNYvRwIq/IfUaaTQ QH9HQ/iHyO+8eMzG+409lhuWZMu58xZSosA38+SZa1EsUm+HAqbpEM75/veBeSjCZBnqzX os2QG6s6yTxtxkXcTEneuXG/98Td8FKgHK1A+KJ1ZGVOCWcYijeyz9PcP8IwIw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670310931; a=rsa-sha256; cv=none; b=owwf6e+cUDL/OrHuoq6s2jwzOQGGqxcE2YyvgIaP1SsnNYzaukUeZeTeXrIEjDiBGO6B7l YuuHoYRE2+9HzOooJaPKSO1McZabLDXQbZhPgMPJy6N8hYXJYMwxe1/V1vXWmu+TlM8dzs pLp2TY46TZON3lvU1nJsiN93HOcB/ixirCV6zudd864k/BKxfVBPwT8kJoz9Ebw4meYKel H7wDqZAtWKNm21clPwD3UYABxJWk3vkBjK6m/s7iLtV4IgWsQb+vHF83lrSXTdNDcPfpzx llauD8jNyznK6UIKJM3sasZ/VLnOEHVB4gfdy1CIvZsLc7j51tRCZSxa46tJWQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=toloe.se header.s=mail header.b=JDtVZRFB; dmarc=fail reason="SPF not aligned (strict)" header.from=toloe.se (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: 6.44 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=toloe.se header.s=mail header.b=JDtVZRFB; dmarc=fail reason="SPF not aligned (strict)" header.from=toloe.se (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: D3D621B16F X-Spam-Score: 6.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: fWMl2p3SzUtK Johan Tol=C3=B6 writes: [snipped] > * Test > :PROPERTIES: > :DIR: build > :END: > > #+begin_src R :results output file graphics :file build/test.png > plot(1) > #+end_src > > #+RESULTS: > [[attachment:build/test.png]] > > The expected result is: > > #+RESULTS: > [[attachment:test.png]] > > My ob-core.el has in the org-babel-result-to-file function (on=20 > line 2712): > > (file-relative-name result-file-name) > > I changed it to: > > (file-relative-name result-file-name attach-dir) > > and got the expected result. [snipped] Adding a elisp example that produces the same unwanted behaviour: * Test :PROPERTIES: :DIR: build :END: #+begin_src emacs-lisp :results value file "build/test.png" #+end_src #+RESULTS: [[attachment:build/test.png]] --=20 Johan Tol=C3=B6