From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iSvJLyV8jGCwGwEAgWs5BA (envelope-from ) for ; Fri, 30 Apr 2021 23:52:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id IDuTKiV8jGDvWwAA1q6Kng (envelope-from ) for ; Fri, 30 Apr 2021 21:52:37 +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 17E7E101FD for ; Fri, 30 Apr 2021 23:52:37 +0200 (CEST) Received: from localhost ([::1]:43032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcb3p-00014T-M6 for larch@yhetil.org; Fri, 30 Apr 2021 17:52:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcb3F-0000qx-Bs for emacs-orgmode@gnu.org; Fri, 30 Apr 2021 17:51:57 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:45644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcb37-0002dE-Vm for emacs-orgmode@gnu.org; Fri, 30 Apr 2021 17:51:56 -0400 Received: by mail-pf1-x42d.google.com with SMTP id i190so14713pfc.12 for ; Fri, 30 Apr 2021 14:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=jsIdUByLAma59Z8SnygEGBvzSzvdl3KlWSRU5x/LNVA=; b=YECmR8TfvbyyuAP+ntVtxnz18S+qRBmDpVJN2a8axN1HtuZV6Mdl4B2mMN1R1D1Z9g +lFlYGj/Lx9PsaVMMTvWsueRRY6JghJGXBYwTn2X4WMjWHKfi/ne8aTM2uSS5Xr/ucF2 DLqQqZj3q9CctB547M1qrXGAp2zBZ/hSvzr7FfqYi9n9USIfGfh1LctglKT3RuNWu22n iceCt8y+PxKn3/pKA4N3w4qY2icmFZPdQfW3nyDVm9u37Bc0Qp2umL92TnZay3BCpk/4 unjxg8P7rpZmsHEoEftmSg1JGmMXM4HRdbgUOMbqoees80OxRDLDV5bFhtWFUUqLI7hw XBVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=jsIdUByLAma59Z8SnygEGBvzSzvdl3KlWSRU5x/LNVA=; b=pyHYKCVP5ysentR9KhVbYfAJEekrOdJX/3JADxWh7zVw4mod/s+VzoeNXaibfxT01e AbwCioIfnfxOzZ3Z2tnNhhEztNF23Lmqy/x/55sqS4e/Hp1AnZYQ4RdLaPePUXMWETEz daHR+jzCWUM09DVrPIlJolB8D+ZWzXHB1DZ/NAiX+10yVEIz3DFbfKk9hLJ1H2rAlcju /MI39KZXj2LWpOs26ogovasW2u9GkZULkvxpiMDBOO/xGjD6mgNzzX96Qk4Q00IS7jJv LywtoCVSPzkp3uO4Pa3SMyby9xPR2t4T+aI5n6FolzqtfkcZcaksnalp2xZwIBA37u9A Jpjg== X-Gm-Message-State: AOAM531WBUsICTX93LI4TTNLNWMLenQFlyW6jlLNRMRzybKVvQecJC5J zUMXEaZJVSim7Q/lczf4gUpBtFd3kpc= X-Google-Smtp-Source: ABdhPJwrnqI250XTgWUHse/9cFuYmE8M4PbH2MdQKGo/hbT4K1S+PVQJ4pq3PgLp/CBqG58/gB0CEQ== X-Received: by 2002:a63:4652:: with SMTP id v18mr6658588pgk.386.1619819505542; Fri, 30 Apr 2021 14:51:45 -0700 (PDT) Received: from tim-desktop (106-69-97-3.dyn.iinet.net.au. [106.69.97.3]) by smtp.gmail.com with ESMTPSA id d22sm10138989pjr.2.2021.04.30.14.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Apr 2021 14:51:45 -0700 (PDT) References: <877dkzg9y2.fsf@nicolasgoaziou.fr> <87wnsx9rcj.fsf@nicolasgoaziou.fr> <87y2dc82ct.fsf@nicolasgoaziou.fr> <87sg3j4vbl.fsf@gmail.com> <33fd87ff1332b56114909973804df669@isnotmyreal.name> <87h7joibxc.fsf@gmail.com> <87pmycay41.fsf@gmail.com> <87h7jouiuk.fsf@nicolasgoaziou.fr> User-agent: mu4e 1.5.12; emacs 28.0.50 From: Tim Cross To: Nicolas Goaziou Subject: Re: stability of toc links Date: Sat, 01 May 2021 07:12:34 +1000 In-reply-to: <87h7jouiuk.fsf@nicolasgoaziou.fr> Message-ID: <875z03igpf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x42d.google.com 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, 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: , Cc: emacs-orgmode@gnu.org, Samuel Loury 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=1619819557; 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=jsIdUByLAma59Z8SnygEGBvzSzvdl3KlWSRU5x/LNVA=; b=pE02BjEcrbXmCqbe6nVMpIJujkUmaVhTvdHkXd7GeoBWFExSuiLv+T0HZWw3lBAYj3q0f1 /YQ0cpZH3gG5dN7F00eWNTg9Rwt2gBSU2AOYO/ECda2YkSvj2Y/rTWaJpRAvEUeM4WscQ8 gQ0YFpycuWxwJpVz24UAX2Hg7RzeVCZT0ct4KtxnOwyGe79QKwqx6umQEcdVD08Gy7Mimi 8tpWBDYq319MVtJnwYHomd0qkgUVdkF7C6r2WdltxuPYSOzUE1wAE9+2oEJe0bm1n4R5Qm 7VtOmkiDlpJT0K8hfRZBKpl0QbK2tgKSuDZjeVbEZ2i3ktbd2eBvZCc54p2R9g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619819557; a=rsa-sha256; cv=none; b=qE1Zc6jsIakVfksOb8sklP8EofDVz40rMfOUxIl+MDIlmwjrtxDZzr1ChlIBeZeZOspEgF lJq5EwVdLoBsjyefhbgnJ/CXRqxVU2yvJd1UnTzE0pnydhqKp3KbleXHMqpHjNiVmoUPM8 7VbM7e+gt3U+bHQH5yP1LTpw9jXL4jrE4IBkp79W//w9lNLjIBAqLUNkYSzFB6rrq5uRMN 7IziumyVnsySh35BnJVt+eAar9IBrlfcPCWqPI+nteqVy6CVDt8SPg+55xlMQLFbaoMD1h qYTDibXjGcAFL1HxxLrDutjwtmdgCtrboOIXrur35UDkUrKSQ5L9Te0/MMISCQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=YECmR8Tf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: -1.36 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=YECmR8Tf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 17E7E101FD X-Spam-Score: -1.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: swZnXQ5/NblU Nicolas Goaziou writes: > Hello, > > Samuel Loury writes: > >> The publish feature only means exporting several files at once. > > You can publish a single file, too. It makes sense when a file is always > exported to the same location, possibly with the same configuration. > >> IIUC, what was written was that when using the publish feature, the exported >> html pages will be coherent and a link in one document pointing to >> another document of the same publish call won't be broken. >> >> But IIUC, publishing the whole stuff again will result in totally >> different links. They will still be coherent and no broken link from one >> document of the whole to another. But a browser bookmark pointing the >> published lot the first time won't work with the same lot the second >> time. >> >> Did I understand correctly? > > That's correct. > > Org provides a mechanism, called `org-export-get-reference', for > creating internal references, which relies on randomness + cache. But it > explicitly removes internal references not actually used from there (see > `org-publish--store-crossrefs'). Keeping those references instead would > make all links stable, of course. > Given this is not the first time we have seen a similar discussion regarding link stability for external references, perhaps it would be good to summarise and put it on worg for reference? First attempt - let me know if I've got it close! - If you need stability in TOC links between generated versions, use Org's publish facility rather than plain HTML export. - Publish can be used to publish a single file. - 'something' in the published output needs to reference the TOC links to ensure consistency. HTML export lacks the internal caching/tracking necessary to have internal link consistency across exported versions. Adding such capability would significantly complicate the HTML export code base. This is hard to justify when this export facility is also used for things like HTML fragments and because internal link stability is only required in a sub-set of use cases. The org publish facility already includes the necessary internal facilities to support internal link consistency across published versions. You can use publish to publish a single file. Currently, the internal links need to be referenced/used in order to ensure consistency across published versions. If stability of TOC links across versions is required, using publish is the preferred mechanism. If we would want to make it easier for the user to create published pages with consistent internal TOC links, we would be better off enhancing the publish mechanism rather than trying to add such facilities to the HTML export function. -- Tim Cross