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 tywsI9swi2DQYwEAgWs5BA (envelope-from ) for ; Fri, 30 Apr 2021 00:19:07 +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 ADDBHdswi2B4GgAA1q6Kng (envelope-from ) for ; Thu, 29 Apr 2021 22:19:07 +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 BC81D14E98 for ; Fri, 30 Apr 2021 00:19:06 +0200 (CEST) Received: from localhost ([::1]:54570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcEzx-00061L-TN for larch@yhetil.org; Thu, 29 Apr 2021 18:19:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcEzM-000612-Qv for emacs-orgmode@gnu.org; Thu, 29 Apr 2021 18:18:28 -0400 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:45795) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcEzK-0006rj-Ud for emacs-orgmode@gnu.org; Thu, 29 Apr 2021 18:18:28 -0400 Received: by mail-lj1-x22e.google.com with SMTP id d15so27108185ljo.12 for ; Thu, 29 Apr 2021 15:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+Iefdr+H0NJtxLakSkfk2JFm0oc9qrAKeCnm4CP12us=; b=B4RIWLCg03R8W7/oSMBRHtgQuEfJc6TVxJIHp8ybMTZus8Yqtgq3/+E+6gAn1X9XGJ 3Z0Fvtb+2Ra5pQLs5AsnAuiKi6XCMVwWy1fu/O1iqlR4PRBVrjOMoc0YHualus6hh17J jVztF/Mnu0cGBASHzeQ+uOhYKt9hiiSuWG1sVW6u6lMPfwDU2pCTKIqNsIoNMmUray/n 3NGxcB94mFp8nrgs8KODNDTm8R2DEkQ50vSZCFRDnsfEajdOBIeJ7spqry4u+6KgW6A6 o0CKDhhMRHdNUwvpzvJLxMq/wqa5PaTrsQkNO7938yfA2WYh4gWmite9qocc47m9IkQK xL/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+Iefdr+H0NJtxLakSkfk2JFm0oc9qrAKeCnm4CP12us=; b=WVxvMYEBIbBXZoW6A6ULMGotXiiTF08G6CahEhiPqXzP4arco9b+ysrvO7wdO8LIBD owVhYCBlgXDd8oP6AdAiVLtRyGOQ5dn2//fLRHlUwA3FpBw2H1Ea8RxLZJn+Txfcoh0U BoZowKYv6ldF8WPh9M10e6PlUT2NWnN16ni5wQx0VhCCgXPmqEtQD6joLVg0IYmwLf3m sZy/5bUBquOMP8+eCAYreFsFZMpA5UJOlK2MEsu1xVEtae2wEBuKXnz5pV5mUKO/y4k0 kdvFq1QSaQFbSv20LTb8fxXxtAPU6HyG6/H0yN7okwHNtOB6VXciWBei9BQTNeR3y8zR d4Tg== X-Gm-Message-State: AOAM533HsEFQKwmDe243WH5WKvaFR8QwKAnBEkXQ3LJAiCjoEoRBEkqs dMcKFKCIv2ebk8ihM86nxTCX6egO4NBD8lbNleecnfaTgsrUrA== X-Google-Smtp-Source: ABdhPJyOmJl1lDBzhpNf0X4vLBXQjvxOb24Gqyw4eUHnFH0eQjuHLa+z+JW0aEsPIJZ/AecQssIcZEIjKP3hUKYvkUg= X-Received: by 2002:a2e:b04d:: with SMTP id d13mr1387364ljl.448.1619734704921; Thu, 29 Apr 2021 15:18:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6504:312f:0:0:0:0 with HTTP; Thu, 29 Apr 2021 15:18:24 -0700 (PDT) In-Reply-To: <33fd87ff1332b56114909973804df669@isnotmyreal.name> References: <877dkzg9y2.fsf@nicolasgoaziou.fr> <87wnsx9rcj.fsf@nicolasgoaziou.fr> <87y2dc82ct.fsf@nicolasgoaziou.fr> <87sg3j4vbl.fsf@gmail.com> <33fd87ff1332b56114909973804df669@isnotmyreal.name> From: Samuel Wales Date: Thu, 29 Apr 2021 15:18:24 -0700 Message-ID: Subject: Re: stability of toc links To: TRS-80 Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::22e; envelope-from=samologist@gmail.com; helo=mail-lj1-x22e.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 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=1619734746; 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=+Iefdr+H0NJtxLakSkfk2JFm0oc9qrAKeCnm4CP12us=; b=YVJfXEPDa/BQdMkb5ngpdMxyyqABJbNtHDDezJUWmpibeu+bAhe/hqm+Zgfs1HUOgS7n0k +bunE14Yee7LxGwkkBfI5P5jA5AvG69lRzaOLzXipfMWJoPKRhd6MTtDaEJtcKSbKU5Au+ I8wSrtWALmms2ST72cOFHWmgVjQ3Q6xl8rSKEvLYtk4LXHMWwlOF6L4KAe5JrGpaDxtQKt 2mqkY1DfdxI0koTqu8gIE5Q7Kk434zTxhD4s/rf+/96Q75BsTs6SoQkt67S3EJf8AX+ge0 JTKWdziwZXi1FEjTtTuIfG0QT6O6RTLLyFUoANYg/fPpM3I88RrB9ekGnXOb2Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619734746; a=rsa-sha256; cv=none; b=ctZOeokvFqFepftb+J4HTbG5pqHnHZ1ZVdnOw7ZA9GRBL1sUsp/N7SuQ7i+RLnvStHlPA+ Okf1TQIK7oDV1aimSfoiT83HJSakM1QUfTd2mW8LAIXfemV+sB1EBQtXII9HN7oSfmrQam 4hLwIwWAVu2qAVJRoq9Lrii+t7+RHgnYxiCrmVPzrHyO0rAhu9mQ9XZ6qr6jJCjiTBxuJc I1lGMOnksATZSI1NTMURSOAqx6NgXLpFnDY5z8YotP745wQRR7u0StyqbpgAsPIjxkHl6u i8nbkjBxojwShURb/3m0ptZCj+BtXmj0/3KwS7FJXHEbyD4OTHD3fNeX9wsxvA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=B4RIWLCg; 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: -3.16 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=B4RIWLCg; 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: BC81D14E98 X-Spam-Score: -3.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: u1UEKntjz/dQ hi trs, thank you. i can imagine that could be useful for a lot of users, but for me, as i said in my op, "short of adding custom id or id to everything" --- i didn't want to add custom id. i will try to clarify why in case it is useful. in addition to performance, and clutter, there is a semantic issue in my case. typically, if i see that there is a properties drawer, i know that it is there because of an org id or a manual custom id or a special purpose of my own. if i know it, i don't need to open it. however, adding custom id automatically for so many links means that there is a new meaning for properties drawers [namely, for stable linking done automatically]. i would have to open the drawer to determine if i personally wanted something there. and thus, the extra properties drawers would cause effort and distraction in this semantic sense, where i would be opening them because i would be thinking "did i really have a reason to add a properties drawer here? i don't recall so... better check" also, there is the issue that if i decide not to include something in the toc, it will still have a properties drawer lying around. in the op, i was not looking for a solution for one blog post, but thought a general solution for all org users might be possible. and this would likely be at the html level, probably by using e.g. header text, fuzzy or strict hashes, or a combination. when tec posted his html level code, it looked like the right type of solution to the problem. i have not tried it, however. i hope that clarifies. tec said he originally did not get much interest. then there was interest on this thread. then nothing. On 4/29/21, TRS-80 wrote: > On 2021-04-21 19:30, Samuel Wales wrote: >> as it has been a long time my original post is >> >> Message >> ID >> >> and the content is >> >> === >> when you link to a section using toc, you get a link like >> >> >> https://thekafkapandemic.blogspot.com/2020/02/crimes-against-humanity_3.html#org080f0ab >> >> will these links break if somebody copies them and pastes them >> elsewhere? what if you add a section? >> >> there doesn't seem to be a perfect solution, short of adding custom id >> or id to everything, but perhaps a fuzzy hash of the header and >> contents of the section could be used? or a strict hash of the >> header? is anything like this being done? just curious. > > My "quick and dirty" solution was to make a function to map over each > heading and assign a custom ID based on the text of the heading. It > only assigned one if one did not exist already (so in case you had > done any manual adjustments they would not be overwritten). > > I had posted it very early in the thread, but it did not seem to gain > much interest. It was not posted as a "long term and proper solution > to be included into Orgmode" but rather a quick and easy workaround in > the meantime. > > Cheers, > TRS-80 > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html