From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aMIkLhApG2EN9AAAgWs5BA (envelope-from ) for ; Tue, 17 Aug 2021 05:12:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WBmrKRApG2GkdgAAbx9fmQ (envelope-from ) for ; Tue, 17 Aug 2021 03:12:16 +0000 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 09EB614C9A for ; Tue, 17 Aug 2021 05:12:16 +0200 (CEST) Received: from localhost ([::1]:42176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFpWQ-0000g0-Bd for larch@yhetil.org; Mon, 16 Aug 2021 23:12:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFpVt-0000eY-F2 for emacs-orgmode@gnu.org; Mon, 16 Aug 2021 23:11:41 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:43002) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFpVr-0003OV-9A for emacs-orgmode@gnu.org; Mon, 16 Aug 2021 23:11:41 -0400 Received: by mail-wr1-x434.google.com with SMTP id q11so26394021wrr.9 for ; Mon, 16 Aug 2021 20:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=1+g+28o/VIG/UGuPmAQFzouIbLomr+U67v6H7LmH0Kc=; b=bX5jI2bCTCN3TkOuh1PwJt4vFJnwHy41AHJioMXZy5B8r23BTjf1dxENFOT+Ho71xE bp5pIbT8YQKkM4Cnn5Cvd9wqHCx+NBMjhRbeOU3U0tEz7WISXp7bRfZDjO2ERGrDLufN gp4iVhF7g4N0i0Dlf0VHmTVmXt8TfCUaDtSpyIVJqW6j12SfLbEsW4zXx8YqmaReipi8 iQj8ObvSZn/5Z76+mAGm3nThLb0FbCauYS9fSiBdvmLO/VoDTctG1kwzY087xIp0O1gi Y+FK6if7iRYLxjMGz6JuXzhZRoLHAKkZf110VjeLS/y65+JYpE/Km+ZBpigTJBMrXu6A +pHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1+g+28o/VIG/UGuPmAQFzouIbLomr+U67v6H7LmH0Kc=; b=O0JvFjqV/71UQLX/UxVciVPKYes1jGPbiWmd/J7tbgouw27pzrjR6Jq5kD7G70KLW9 /n5VUq/PUFnVEOEI+rkfv77VfF5i+nM9IwxR7+te0AxecUVXPJjxI94LBLPWdClDVBxX cF8jow8vzEO9NzHY6K13ygICDZ21vCD4K5Z3E7f28kjBoz6o/XnPiUqWLlq747taUzo7 s3CJLCRMqkeipmJP21yzszkEYncr1mAOy7GLnFSSj04a1ciYnDMWYtcubIgEnTunNt/Y mQqInsY9wjrqMR8QhlnVAEfkO241lv7D+d2Np3RA+VZI8GhVTfRbGX31gxAP2ofVTKTl vyuA== X-Gm-Message-State: AOAM532ZPZYaL2YEJQ++O3euLc98YCgG1DcE7HLbobQXTnObcL1CLkSl Yskq8RASjJSd+RPBjQ+94Iq698ZhbvM= X-Google-Smtp-Source: ABdhPJym4yst7hEMT2jSmE/9x8NxQzwDnAlPkT8csLuT38K7YRruehGPMmOKRpc86c3OBhBFuAFPcA== X-Received: by 2002:a5d:668f:: with SMTP id l15mr1224939wru.390.1629169896849; Mon, 16 Aug 2021 20:11:36 -0700 (PDT) Received: from pluto.localnet (aaubervilliers-654-1-87-245.w86-212.abo.wanadoo.fr. [86.212.175.245]) by smtp.gmail.com with ESMTPSA id o34sm577545wms.10.2021.08.16.20.11.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 20:11:36 -0700 (PDT) From: inkbottle To: emacs-orgmode@gnu.org Subject: Internal link broken when publishing (was org-id with ox-html) Date: Tue, 17 Aug 2021 05:11:35 +0200 Message-ID: <3332691.axgivObTmJ@pluto> In-Reply-To: <1689837.tl16BRLKSx@pluto> References: <4617246.m1MCmUpgFQ@pluto> <125302989.LfU6mLQhtn@pluto> <1689837.tl16BRLKSx@pluto> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=inkbottle007@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629169936; 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=1+g+28o/VIG/UGuPmAQFzouIbLomr+U67v6H7LmH0Kc=; b=SRScRJAsaqRGuKp24OYEjPiE4HU4EZ8aGKyNrXxRdQWbr2eEAAR9m6Uw8tLGY/RpRZbRmU L0uVCpNa6G3zBpyYkHfG18t0cwB6cm6ZATmlw/0enIAg8FII6gpxEhavZrgmmn2TKV2cXs rPkGbgrdvStTHtT7yY5rDQqXIKGIdNnz2ShW8cmJHMVIDxuXGarSmft80fbJVzrtukXNNI ES/jESRJCKZgl+tZ7MyDaqg4wRugGWanZCZLUYBtti314vk7sH9G0KdVSEK1W4NymHMRF0 sD8F6hfiI6F0e557baGivM3bD6uY7Ip3te0nBHTMu39d3DSWZAGsZ0KkCDtXFQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629169936; a=rsa-sha256; cv=none; b=khOd9tdNgbSdiv2LpIkjtXMVr8X5xiGB6cYr/kVybV8vMQ8oqEgCzBQzD1PPbMAdGULGwW i/fn+Ah7FmC6BSSwoSgefYFSDmkxU/CfA8LWmsNYckuQHWDjH5cVnWwAFjByTwoL54xMKw p2FpKSa6dT1CujXL+C6EF5I2KJ3OcLaR8I6v+5Cju3dLtHXadXqD4o6D6fs8/YfT+Wppep 4tIZfnAEkeB9zUGLLQNGVz95eB2W/6YvyuW5kkjv1vMnez4/uq0s4Bq5RCgirpqmX1d4gR WkFu9RRRRgs+oufeBZrG5TLJMpxV3Ey6rbXZ1QmAnvQIAbPaQ6bFH31vUflJqA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=bX5jI2bC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=bX5jI2bC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 09EB614C9A X-Spam-Score: -2.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: dBeom+CsRhiy I've done a lot of investigation. I totally agree with internal links not being stable through publishing: `3c5997f1-205a-437e-8722-d5f52239a207` => `"bye.org#orgfa9c151"` I totally agree with what Nicolas Goaziou says there: https://lists.gnu.org/archive/html/emacs-orgmode/2021-05/msg01254.html However, I do have an _internal link_ in the form: `[[id:3c5997f1-205a-437e-8722-d5f52239a207][bye]]` (This link is not hand made at all, it is the result of: `org-id-get-create` `org-store-link` `org-insert-link`.) Which is translated into: `bye` But no target of the corresponding form is created, and that somewhat in accordance with the cited post above. But it breaks the link. As I understand it, in accordance with the cited post, the internal link should be "interpreted" as: `bye` (from: `[[id:3c5997f1-205a-437e-8722-d5f52239a207][bye]]`). For that, there should be some "translation table": `3c5997f1-205a-437e-8722-d5f52239a207 => bye.org#orgfa9c151` (there might already such translation table somewhere). (Actually it is `cache`, in https://github.com/emacsmirror/org/blob/master/lisp/ox.el#L4442) The obvious workaround would be to use `CUSTOM_ID`, which is stable through publishing. But it's not at all a functionality I'm looking for. I've thought of a function using `org-map-entries`, creating a `:CUSTOM_ID:` as a duplicate of `:ID:` everywhere, creating the `:ID:` if necessary. Always using `org-id-get-create`. But maybe there is an _obvious way_ to have it working out of the box. Here is a minimal example: ## file: hello.org * hello :PROPERTIES: :ID: e54113f9-2ad7-4a86-94be-68ffc696de0b :END: [[id:3c5997f1-205a-437e-8722-d5f52239a207][bye]] ## file: bye.org * bye :PROPERTIES: :ID: 3c5997f1-205a-437e-8722-d5f52239a207 :END: Thanks, Chris P.S. I'm pretty sure the minimal example above can work right out of the box with someone, who unlike me, knows how to correctly configure the publishing. However, I mention two other leads, the first one I prefer by far: (to be honest this first one it is not about internal links not breaking at publishing time, which was a "given", but to form more "meaningful" publishing id) 1. Suggestions have been made by Nicolas Goaziou to look in the direction of `org-export-get-reference` (at the level of the "translation table"?) https://github.com/emacsmirror/org/blob/master/lisp/ox.el#L4443 2. Another suggestion is from org-roam https://github.com/org-roam/org-roam/wiki/Hitchhiker's-Rough-Guide-to-Org-roam-V2#export https://gist.github.com/jethrokuan/d6f80caaec7f49dedffac7c4fe41d132