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 oPvcNvx6U2OoGQEAbAwnHQ (envelope-from ) for ; Sat, 22 Oct 2022 07:09:16 +0200 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 oK3pNvx6U2NdAwAA9RJhRA (envelope-from ) for ; Sat, 22 Oct 2022 07:09:16 +0200 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 B33C51DB3 for ; Sat, 22 Oct 2022 07:09:16 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1om6fB-00029Q-HA; Sat, 22 Oct 2022 01:03:13 -0400 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 1om6f8-000295-QW for emacs-orgmode@gnu.org; Sat, 22 Oct 2022 01:03:11 -0400 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 1om6f6-0002XJ-B0 for emacs-orgmode@gnu.org; Sat, 22 Oct 2022 01:03:10 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3DD24240101 for ; Sat, 22 Oct 2022 07:03:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666414986; bh=ZHCWO3YaYj5QaKdNZIz6kdmvnc5KhNKQzft5mzGdTLA=; h=From:To:Cc:Subject:Date:From; b=i/FOuR4CZWfxVGu9KvMOLyUU3hoJ0r/Lv4b/Wyi9fVg+SVMHJz3bEFJiNtBAC2Z/H PnpYC++OaDQ5hov8VJRx7Hi6pJdhuUocU4Dkn1XO6mALtVwP0/msopdCOpj4AE+ps5 FH70BzsOBZveXsnF7d3kh0rZSnOZUYd29K16LuhLYF79ddrfZ51mxXBxDGKxoMoM6T AZEGzVB+Ltzr1q22fwRbWy9y1FMwo5j6X9FvVAix5Crfc/f5iL3/8FefmDuMdKPtkD Cm8vgRk5HD3K4v/+ovjMDf4VHR6Md8/keEHY1/zMOSJHC3lJFb+cwIu5DtBap33HWm t0Gin5xIYJwjQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MvTjx3LcMz9rxH; Sat, 22 Oct 2022 07:03:01 +0200 (CEST) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: [BUG] ox-odt file: links are not pointing to the real files (was: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)]) In-Reply-To: References: <877d0xfu9m.fsf@localhost> <877d0wayn8.fsf@localhost> <87lep97tnn.fsf@localhost> Date: Sat, 22 Oct 2022 05:03:46 +0000 Message-ID: <87ilkc30wd.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de 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, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Sender: "Emacs-orgmode" Errors-To: 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=1666415356; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4UCCtV/8NpLM0Lfw9JGvPki+bxgKh63BkfBCtvBgfK0=; b=nQp1uDFHOcSaFETkQRkzsJmnLZy+fbkomRLBEmaQusYwWAt76TV2NziEHuc53VDSU1+lPS AsWJE5aq5tJBxFD10zBX8boVaqo8TXoq20+fFmmVBZcdMdhB3URF7n654qdZBsuspiGoIQ yVO/WDhFbz6hI53nEM09ntODEqUy8aszMUzHenvkELyRI4BW7Mldh5mPWJUp1Z9b1Iq5nK TfBbPmahNc+j7Svrcun6mvbAI5U1M8xw75F4r/WP9uudn50x8t7jpNVMSLBFqF86BylGLD zYHbGHnmaWt6ev+dVamMaiKkJAglSiNPvzlUmDbwdjSABTKLFlO9dvLi+7T0OQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666415356; a=rsa-sha256; cv=none; b=j2my5VNRFcqcA6gQBD2T4bO0FRmSflV9C2u7heBZYT/bp3Lle0K1QlFVeHOVkUlMgM8oCD TJMl48YKovHyE5Bk9SNtsn08CALyGPw0niO3ddZ6vzOfaTpVXdQjadMp3hGltq8/C9ev9f fBJJST6BKu8M8sq5qUciSIabcYFwmxXqhzvSqczzyXBXIPG97miXJdoTdy0Bxhb5Yen5ks 5s+EJq4K0Kg/pfjPW0JcSdB/3Pxv2fEOAYeUtZSdHigHZuICt8QMhhXDNIPrEASqL9hpMf I8SNtKFY7KHwBJxWAwdPmY8CvrXyYBWt/NYKTsVhead5uNIQm0nYDL/T16jWEQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="i/FOuR4C"; 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: -2.71 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="i/FOuR4C"; 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: B33C51DB3 X-Spam-Score: -2.71 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9aF45A8E4sSq Max Nikulin writes: > I am sorry. I confused this thread with some other bug report. I agree > that the original post describes namely file links. When Moritz provided > an example in response to your request for more details I decided that > more similar problems are coming. Perhaps particular use case does not > include links to specific headings in files and I was wrong. On the > other hand if ox-odt code works with id links better than ox-html then > the former may be a source of inspiration how to fix the latter. I am not sure which bug you are referring to. >> Here, we at least fix the export error. So that people can at least get >> some exported .odt file. > > I have tried main HEAD (your fix should be applied) and I did not get an > error, but the result is quite strange. Consider a single file with an > internal link: > > :PROPERTIES: > :ID: 3c885843-13ad-4dd8-a57f-de8271403b85 > :END: > #+TITLE: Note A > > * H 1 > Some text > > * H 2 > [[id:3c885843-13ad-4dd8-a57f-de8271403b85][Link to Note A]] > > Link in the exported document: > > Link to Note > A > > I would expect a target withing the same .odt file. > > Properties as displayed in LibreOffice UI are even more peculiar: > Document path > file:///tmp/d/test-odt.odt/test-odt.org > Target in document is empty. > > My expectation for path is file:///tmp/d/test-odt.odt or at least > file:///tmp/d/test-odt.org, but certainly not their combination. I am > unsure if you consider this observation as relevant to this thread. I improved the code a bit, directly reusing file: link transcoder: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2f5e7103e59f06631e985d3dd39af21b5b7464ea However, it does not change your observed behaviour. I also tried the following Org file, and it looks like something is wrong about file: link export in ox-odt. Even file: links have the erroneous document path. Probably, href=file.org is treated as a link to resource packed inside .odt file. I tried to look through https://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators, but I cannot see any obvious correct way to link to external files from odt. May someone more familiar with ODT schema take a look? :PROPERTIES: :ID: 3c885843-13ad-4dd8-a57f-de8271403b85 :END: #+TITLE: Note A * H 1 Some text * H 2 [[id:3c885843-13ad-4dd8-a57f-de8271403b85][Link to Note A]] [[file:test.org]] -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at