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 WIXbHg5cjWBhagAAgWs5BA (envelope-from ) for ; Sat, 01 May 2021 15:47:58 +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 KNp+Gg5cjWDZPwAAbx9fmQ (envelope-from ) for ; Sat, 01 May 2021 13:47:58 +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 BC6701270F for ; Sat, 1 May 2021 15:47:57 +0200 (CEST) Received: from localhost ([::1]:59478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcpyO-0001a3-Uz for larch@yhetil.org; Sat, 01 May 2021 09:47:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcpxu-0001Zf-Nd for emacs-orgmode@gnu.org; Sat, 01 May 2021 09:47:26 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:47071) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcpxt-0000B0-9A for emacs-orgmode@gnu.org; Sat, 01 May 2021 09:47:26 -0400 Received: by mail-pf1-x432.google.com with SMTP id q2so993139pfh.13 for ; Sat, 01 May 2021 06:47:24 -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:in-reply-to:message-id :date:mime-version; bh=8IWI1OFa1SgqRlS2kpUMUvGREujj3k0fzZ6GEH1UGmI=; b=lErZr6bcD1QEsy9PunmYEyXbUnzJ2jlXUMChQiTKorxTF3OeO7iku24GIWxo0jHZgf EtMWnaIOn+jPnGmoOewpRjUV5qJ0Afyokw+7wqnmTTCeINJvqu+aE36PKewH8sXocfmi KtUgfz6PzehIDJN68s9qKPAdptMXu2dOM8ZuL1Z44BXBy8rmDCLAw12fk0HTalETlEEv Osa4xNS3i4fGb3SqyhnbOZLN+0CLaPSUdCfZDNUBaGFMZsiyBvelKAfoF1z+s1Hgijqm 7dZHGpxtPPze6yOxggWv1hSLafkTYQULzI4r28sXht9vrD0yqUSXwHbBZCVTst8fOWBH G10w== 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 :in-reply-to:message-id:date:mime-version; bh=8IWI1OFa1SgqRlS2kpUMUvGREujj3k0fzZ6GEH1UGmI=; b=J/fJAxEAuwdmXXiZ/P0sXp8Kvo+zol9xipCSTqF+xuGGeNpZjpLpQsPmCZVn/1kIjs Wg1ofnBzSk8FYU0PqKmxbA8GgpFsxXLJcdZAp7erNFwnfzLNWdxbCr544pbgdq3O76N/ 625Gz12kDPMItR0DGtyiLJGSPrlXvCFPi8RslWl3yE1vG+jhulvEAHUHVrfWW/JRyQj2 GzJkA2MC6qagiuzO8MwZHb/1VpWBua/ZW84SbmckeXNtJjDzrghURUMNDiIm3qlPovHc SI0pDe4LAOL1QCVGVQ4t1ADOLvE1AJMcaDIlgdtj6Wqh2c7EHmHL2BJxspy1ZIp2EFCE L9qg== X-Gm-Message-State: AOAM533lxNJ72ncrm5FlPQ5IivKqHUt7Z4HKjRMM8AJxwfOoTEpaAYZv IH47jg1xaFsJ47W5SYBUcFM= X-Google-Smtp-Source: ABdhPJyPwDEzC9kufUOUW+rJs8Y65O1EIImKEpc/Ih66ZRMFDUJItlEn1YpuiUdvGqKTsYcTjWe3Pg== X-Received: by 2002:a63:4a23:: with SMTP id x35mr9326008pga.270.1619876843445; Sat, 01 May 2021 06:47:23 -0700 (PDT) Received: from localhost (180-150-91-8.b4965b.per.nbn.aussiebb.net. [180.150.91.8]) by smtp.gmail.com with ESMTPSA id n3sm5279176pga.92.2021.05.01.06.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 06:47:23 -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> <875z03igpf.fsf@gmail.com> <87tunmskap.fsf@nicolasgoaziou.fr> <87fsz6boxa.fsf@gmail.com> <87fsz6sik0.fsf@nicolasgoaziou.fr> User-agent: mu4e 1.4.15; emacs 28.0.50 From: Timothy To: Nicolas Goaziou Subject: Re: stability of toc links In-reply-to: <87fsz6sik0.fsf@nicolasgoaziou.fr> Message-ID: <87czuabm6w.fsf@gmail.com> Date: Sat, 01 May 2021 21:47:19 +0800 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=tecosaur@gmail.com; helo=mail-pf1-x432.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: Tim Cross , 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=1619876878; 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=8IWI1OFa1SgqRlS2kpUMUvGREujj3k0fzZ6GEH1UGmI=; b=u6Trhq6+wNtUFNwbSXO3fuVZpw/cPy6QO1yCdlKoNtMgPwLy5H9KcKZDxENzXfisyBK8Oy 1W+QaXzaTUTfC0BTOYxhWVSxiioEMICAZGJGgKUI4Hdz25MtWubUlWtEwce2pBo8rzkTrb 41Eoe3pIbBVumR+hWqFdCt81eCXCunW4HOaEMW8r/zFUYcMYW/VYT+dfIKLWgpvRgsoxnO 0hffB7HMgtqGzw+NKVNXVPa1sj2LyjWeeGd6H33DLwRFpBTz8gr66VC3v8nyQnl6k+jvcm Gzq544VdggYv37F7Hc0QMLOfNns2lX/RSWBsPwDni0gz5yxxtnjxO1wURZIkdg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619876878; a=rsa-sha256; cv=none; b=N7T46O+KHfdFnE8amPu0m7aC+N/D5OfTCdR0uRCQRF/w0dHyjv7MYecqbGeE5zdJ617x5T P+0hlPdK/Us1g3SQEc+QdRd1lcNWIbGScFAiMT08UHn7hMdip/flIVsZb0MUtOcaEH4HGq eugXQqjcaG4xzoEx8PtZKFxtdinfpcDhah5vwwy3WT78bTwGllHEmhrBECbXx4QLRnneT0 XZwqx3xLksSJEUynqitADsW12Lc3Q1RDxgOE2FLtu1ux4zqdquNS/TXZyKRs1NNIVqZwOk lbXqGprezXKcvc++f9mOsxTw/YHZS0+ZuYsc9GfCzwd06iMFZP1QBE9IXZlG7Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=lErZr6bc; 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=lErZr6bc; 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: BC6701270F X-Spam-Score: -3.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3mytHRsSwwF8 Nicolas Goaziou writes: > I don't think such a system would preserve properties offered by > `org-export-get-reference', for example in non-latin languages. Also, > header content is not stable enough: when you're linking to the custom > ID, you may be able to change the title and yet preserve the link. > > However, your proposal may be an improvement over > `org-export-get-reference' in the context of "ox-html.el", that I don't > know. That's the second way I wrote about. My proposal basically replaces the random hex generating function in `org-export-get-reference' with a call to a function `org-reference-contraction' which takes a header and outputs a string like "some-header-string" and then has digits appended should it be non-unique (i.e. "some-header-string-2", "some-header-string-3"). For certain recognised blocks (e.g. src and example blocks) it appends ",{block}--{n}", for example: "some-header-string,code--1". I consider this to be quite a nice improvement. -- Timothy