From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2L6FKUV2kGNxhQAAbAwnHQ (envelope-from ) for ; Wed, 07 Dec 2022 12:17:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mBubKUV2kGO30wAA9RJhRA (envelope-from ) for ; Wed, 07 Dec 2022 12:17:25 +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 392AAF484 for ; Wed, 7 Dec 2022 12:17:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2sPW-0006e0-OE; Wed, 07 Dec 2022 06:16:22 -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 1p2sPU-0006dH-CM for emacs-orgmode@gnu.org; Wed, 07 Dec 2022 06:16:21 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2sPQ-0001Ii-3z for emacs-orgmode@gnu.org; Wed, 07 Dec 2022 06:16:19 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2C964240103 for ; Wed, 7 Dec 2022 12:16:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1670411773; bh=SDRYhbdolr+Zm6ayW50HFUtrDY5rtWvxctP18XMH/Y0=; h=From:To:Cc:Subject:Date:From; b=qPmheo3AzF58tjXtB9tr2vTyPpZxDny6trQOmzY/iywQ0/O0hpLJ394ojhd1iNExz rx7tgHOfiybqxhUiTRLltFo/usQgcQIrSzojeYi1kgEpBTvIgzmee7km/iH9QenN/4 bIrDo8nJ/dFX566+rH0BpUJT9Ah5WIEhw/a/EyHBQF3QbGCfRvMyPX83eZseZy+7hr WAMb7LzB8/zutUGevLmsIGeLvcMzDeNk3ZlXG/O5+NVqSXKQSwLRZABsLGpGX3aw32 8k0zFVrqG5zA411LAHsRJqW+Mi9Ja2CEl5n6eGQ7cuyKCq24lnC4yFBhgoEQ7UF4/B 2ky5VtmsYi28w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NRvqJ1ML8z9rxS; Wed, 7 Dec 2022 12:16:11 +0100 (CET) From: Ihor Radchenko To: Johan =?utf-8?Q?Tol=C3=B6?= Cc: 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/)] In-Reply-To: <875yesnia6.fsf@toloe.se> References: <875yesnia6.fsf@toloe.se> Date: Wed, 07 Dec 2022 11:16:07 +0000 Message-ID: <87v8mnh3bc.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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=1670411845; 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: 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=RCVN21aIYbL0/iJNJsMKaKwtu3YyrNdrcsXqIL5Fxfc=; b=EwrFHRMJIAXBEgCuG9bIiQax3ol2/cSIJVTfqj/Cl6fFalxGZeoKZZtfBBUfMZSMbU2vwH q1ZrIOfWguGelkxZPYpDjLigdU8TAjseTIgXvKVOQEcQtJsoOVHOQF+VIL7WApqIKEjXcZ 25+pV00Yq/dtAJduVeZ+mrXSEAsUPhidj/e1jKImSS7igiZmHCDAhwR/F3Xn8jSy8Wt5AJ THiZZ+ny9YPJ2lM2n8hmdQpYAcFXxP4bsLYDyDvBQgXM+4b7Q2+K8wUQg1Dl5V+dROvmMh Qrjy9slCIZ4GJkDgeyUw/COfUWYvb6TppGbdqVDhNowr1tBltkvAzaOOJC4mDg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670411845; a=rsa-sha256; cv=none; b=fHG0VYb9mMruMKTPQZGYiLSf+DcKmibZgWjNWDu8aUzVdlNH8O64CT/A15AT1togAd8TvB cX8PceV+inSr/ZBQD2e7dvSh1YG1RvNd5C9HuWRpjKn/a72a55+DB6dYyrc211tZvQGJ6m YX76gaFZSMF4tJvV/1ReD9u3QcFFrWjnecyHKb4MFABdPXzDYFPkctamR/EFV9zwi9tbji MwB/dEQOx7uIL8ASFZcGQZsOgCTeZBO2YA8qUc3KfP6Ye9O/3zqccdDUfoqPuOhJwheF3J rrRsq6SWdr6XyNKY56172tXYTdIRDk0yA9FD/Sbr3kwIXnhqqs4JUSZCMSsz0Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=qPmheo3A; dmarc=pass (policy=none) header.from=posteo.net; 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.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=qPmheo3A; dmarc=pass (policy=none) header.from=posteo.net; 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: 392AAF484 X-Spam-Score: -5.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: aK+reF8UgWGD Johan Tol=C3=B6 writes: > With org 9.6 I am having an issue where the following generates a=20 > result with an attachment link that includes the original path to=20 > the file. I expect the link to be relative to the attachment=20 > directory. > > * 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) Thanks for reporting and catching the cause! Fixed on bugfix. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3Dcc5427b7e --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at