From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 kCEVL0zAeGI9AAAAbAwnHQ (envelope-from ) for ; Mon, 09 May 2022 09:18:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ABHyLkzAeGKrdgAAauVa8A (envelope-from ) for ; Mon, 09 May 2022 09:18:36 +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 6A3AB9EF9 for ; Mon, 9 May 2022 09:18:35 +0200 (CEST) Received: from localhost ([::1]:45958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnxf3-0001Fs-8y for larch@yhetil.org; Mon, 09 May 2022 03:18:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnloj-0003kA-7K for emacs-orgmode@gnu.org; Sun, 08 May 2022 14:39:41 -0400 Received: from mail-lf1-f41.google.com ([209.85.167.41]:36797) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnloh-0004nP-EE for emacs-orgmode@gnu.org; Sun, 08 May 2022 14:39:40 -0400 Received: by mail-lf1-f41.google.com with SMTP id bq30so20464315lfb.3 for ; Sun, 08 May 2022 11:39:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=HcoIi610wdkMXW3Dm2j2TzBO/Kdk1MmI5qGwGR42Lxs=; b=i5skXIcJOGgtAVFtZg08jPPJWQIMPpxQFrZ5OQCsURpFasdJP4lrSQNjgbJDDcujdj QiZkC2o7FHz/WeEmzEGcGZW9jMBNvcJbOVPk94BxOnQB1F4ZpWYIvZQny7kV9CmjkMgw zfFWMzYofjVoaEhPLALbGvJB1lMVMBuH1mGlqxaVCQozNRnSqMPXXP+Mf0L2Z8N41/kV 5gweUV+cFn2u9/fHCexze2IYLNOguDZDZopz1M5ebvRzHuqOiM240AmZgBdQ8INnxQ9o rvci60aCE7W4ESskeSn6Muwa4/9kr/1qCWUMKYsjNH7OPYPc3qZ3q7+UUbEEPDjseFte 0FKQ== X-Gm-Message-State: AOAM5300tru/XrCOUABV41/4iR+6cUg6BYcJZBDGNuWlHP0SQMaNUpQ0 /C9zYRTsa1gomPt5NfSIm+fqcAUyvjpsRQyZGfEz2bWsfuwdUg== X-Google-Smtp-Source: ABdhPJzSRxjKXc4SiSxeqfWqg7lapfLGm1kATz9cVfVZwIrzQoAOak+KshpF+gboPjf2so7cI+F+/cEkwSGjJK8wRnI= X-Received: by 2002:a05:6512:e9e:b0:473:be54:ba7b with SMTP id bi30-20020a0565120e9e00b00473be54ba7bmr10072619lfb.419.1652035176481; Sun, 08 May 2022 11:39:36 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?Q?Moritz_Sch=C3=A4fer?= Date: Sun, 8 May 2022 20:39:20 +0200 Message-ID: Subject: [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/)] To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000d9c86d05de8469e5" Received-SPF: pass client-ip=209.85.167.41; envelope-from=mollitz@gmail.com; helo=mail-lf1-f41.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 09 May 2022 03:17:05 -0400 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652080715; 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=HcoIi610wdkMXW3Dm2j2TzBO/Kdk1MmI5qGwGR42Lxs=; b=fczdBAiOImaLdua8oRTlvJAlFfHuTC+7kfMvVmQs0WpfUg/ME8MVBwu7eE36b8OmjPyDcf NdnT4zC6qa/zB3k+ve2FvUku+gMpXPYWF1UYNxwWDc60uHEedfnUiH3FIRvg1syzFUjOeI zLnsRs1243uc6JdDpMflYENN1UDPAkFUZ5lfXoiNF3UzCv5RbuTf0Bl+1WkMNZjNCoyb9Q 7NFQCr5B9sJFLW3HRLJT5E3/fdLOyD0WOcsp1s6aOlkkGpqbexvRN1Ao2SqvcxK3QaANiT F6C16R72cPCYAhXp4dZJjshDv4owMI17TGo4DorXGTeicgejGmPURoMkfb4B1g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652080715; a=rsa-sha256; cv=none; b=uCrcadKWP5MgDPfV5gQ0A2EHiGXx3ncnkHJwkLCWf/4sduOgdBeCPDGAj3PG8Gv/i+o8do aZnXgAuUiRDj/77/MnjWm555rxvduZH4QfHO3DyZYB8N2ohG7mvkuReP7xhwLnPamnpuxV jNdBCkpJN89UD42rdFH2CqutCrjB212Lx+OdNQRxkBF1brtMvYfWaknDU2B2EHiEgMCfoC g2wFEP9y9JryPPhdD0JMhi9pUQa9gm6olNfm25xlt11S18YbvpeqBaN2W14A7WTArt0YAl TUGfQQPUo30GHelA3KA8QKU2kR7kyEAxxW1Ihs3LWm3XONMMMVaLIOaX4iNGOQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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: -1.30 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: 6A3AB9EF9 X-Spam-Score: -1.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: o1SCwtiLE17O --000000000000d9c86d05de8469e5 Content-Type: text/plain; charset="UTF-8" Dear mailing list, When exporting an org-file with org-id based links to odt, I get the error error "FIXME: Unable to resolve ", where is the filename, the org-id-link was pointing to. Org-id links (example below) are the default for org-roam (v2). [[id:5222a0dd-5084-41bd-b61d-21dcb3290187][Note title]] The issue lies within ox-odt.el in the org-odt-link function. There, ' destination' takes the value of the file name of the id-link target. Therefore, (org-element-type destination) gets evaluated to 'plain-text, which is not resolvable by 'org-odt-link--infer-description', thus it raises the error. I worked around this issue by adding a check for plain-text, but would like to raise this issue here to find proper ideas on how to fix this. (cond ;; workaround ((eq (org-element-type destination) 'plain-text) (format "%s" destination desc )) ;; workaround end ((not label-reference) (org-odt-link--infer-description destination info)) Thank you, Moritz Emacs : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) Package: Org mode version 9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/) --000000000000d9c86d05de8469e5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear mailing list,

When exporting an or= g-file with org-id based links=C2=A0 to odt, I get the error=C2=A0error &qu= ot;FIXME: Unable to resolve <filename>", where <filename> = is the filename, the org-id-link was pointing to.

= Org-id links (example below) are the default for org-roam (v2).
<= br>
[[id:5222a0dd-5084-41bd-b61d-21dcb3290187][Note title]]

The issue lies within ox-odt.el in the org-odt-link= function. There, 'destination' tak= es the value of the file name of the id-link target. Therefore, (org-element-type destination) gets evaluated to = 9;plain-text, which is not resolvable by 'org-= odt-link--infer-description', th= us it raises the error.=C2=A0

I worked around this= issue by adding a check for plain-text, but would like to raise this issue= here to find proper ideas on how to fix this.

=C2=A0 =C2=A0 =C2=A0 (cond
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; workaround
=C2=A0 =C2=A0 =C2=A0((eq (or= g-element-type destination) 'plain-text)
=C2=A0 =C2=A0 =C2=A0 (for= mat "<text:a xlink:type=3D\"simple\" xlink:href=3D\"= #%s\">%s</text:a>"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0destination
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0desc
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; workaround end
=C2=A0 =C2=A0 =C2=A0(= (not label-reference)
=C2=A0 =C2=A0 =C2=A0 (org-odt-link--infer-descri= ption destination info))



Thank you,
Moritz


Emacs =C2=A0: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version = 3.24.30, cairo version 1.16.0)
Package: Org mode version 9.5.2 (9.5.2-gf= bff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)
<= br>
--000000000000d9c86d05de8469e5--