From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 GEyRMg/8RmMrkQAAbAwnHQ (envelope-from ) for ; Wed, 12 Oct 2022 19:40:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kJ2VMg/8RmOOXgAA9RJhRA (envelope-from ) for ; Wed, 12 Oct 2022 19:40:31 +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 6BA5739101 for ; Wed, 12 Oct 2022 19:40:31 +0200 (CEST) Received: from localhost ([::1]:49044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oifiY-0001Zf-1v for larch@yhetil.org; Wed, 12 Oct 2022 13:40:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oifgw-0001Z1-FQ for emacs-orgmode@gnu.org; Wed, 12 Oct 2022 13:38:51 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:47065) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oifgq-0003Y7-PR for emacs-orgmode@gnu.org; Wed, 12 Oct 2022 13:38:47 -0400 Received: by mail-wr1-x429.google.com with SMTP id bk15so27246804wrb.13 for ; Wed, 12 Oct 2022 10:38:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fQg0A4dAKdKM2323TWMnAqYwsWK/zMkI+bfvFgsz/oA=; b=pleUz049aMWTSc3+VO5puplXoHZjsfT/sOt3Gw+HGceapo1LmD71hKjnIjlgHe0Br8 r/jgK/lO6h/uyTUixyFHFnM58a3m5tjRce9BrriU3vswWJcv6MOH3ot4WYCu9M2uIAly iIOBepPnALw4s8h7a9iRCYFiyfSdh1yj/wq3e/CXKPfrXwa2bsvGMVqxsXQGrPffxf16 HtejcBV6gbiK9Vf7fhfDol0fV8u+dGLEro60hk2pfZevbfwdENI1VLvT6tK1aGPLaTLd hGrsIt4XyOGh4H92Xs0MEkh5gK/t+Fd1cRrNOBCmuhNjTUuM33DoGS2CEfLZkjUfk/vH 7j6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fQg0A4dAKdKM2323TWMnAqYwsWK/zMkI+bfvFgsz/oA=; b=H8guFNrL3REYVVPzbwLheQ1ojbN+rAuzR5P4jyRwMwm9UbI7Fu+zVdxbr65xYspGzS ks2B2CQY+7OIlLZa4NldldJI7RWrk8o5hKZzE18hBySKJxY/W/UyyKoS+9zPqy4AjisS 8kctoXXI476/NCRiF8t2jtSHckj+obLQRN8WC7RkE4fgHA9NotkO903ulV9x7gqZUiD/ N49NC7dzAaxJGgNWfiJ3AV9/10RebAnmitLWHWLxBe7NJjiXhqneYqgLWNkQc5vWvPQQ 0zeeAqLc5WWRs0EV48kTvdN/qACFkOypPjAc+hbke/s+MbwxCMIvlMJ3Xjmp3RQPcuT5 9dRQ== X-Gm-Message-State: ACrzQf1Mq6z6q8+YFbXVHArYbtV6xzWJ8GVDKnz3ZSROXb7WugAEqG/l nuIVWls+QPyfWxQPG78058Y= X-Google-Smtp-Source: AMsMyM4XQRmR07KWgiHdj4vHFpORlSQeF3AVLAA58qpG9JhERtHjUFk42sSBIxYkev3mwlZC4DALug== X-Received: by 2002:a5d:4c4f:0:b0:22e:6c5b:a4b0 with SMTP id n15-20020a5d4c4f000000b0022e6c5ba4b0mr19404262wrt.574.1665596317377; Wed, 12 Oct 2022 10:38:37 -0700 (PDT) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id t9-20020a05600c198900b003b4fe03c881sm2447598wmq.48.2022.10.12.10.38.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 10:38:36 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Ihor Radchenko Cc: Timothy , Nicolas Goaziou , Tim Cross , emacs-orgmode@gnu.org, Samuel Loury Subject: Re: [FR] [Revived] Human readable / customizable link anchors during export In-Reply-To: <87ilkpsg8s.fsf@localhost> (Ihor Radchenko's message of "Wed, 12 Oct 2022 14:33:39 +0800") References: <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> <87czuabm6w.fsf@gmail.com> <871raqsfzp.fsf@nicolasgoaziou.fr> <87a6pebkk8.fsf@gmail.com> <875z019w0r.fsf@nicolasgoaziou.fr> <8735v4hoxl.fsf@gmail.com> <87fsfutwin.fsf@localhost> <87v8oq9nha.fsf@gmail.com> <87ilkpsg8s.fsf@localhost> Date: Wed, 12 Oct 2022 19:38:35 +0200 Message-ID: <87edvd54dg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=kevin.legouguec@gmail.com; helo=mail-wr1-x429.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.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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665596431; 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: 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=fQg0A4dAKdKM2323TWMnAqYwsWK/zMkI+bfvFgsz/oA=; b=nuexM79HkBznQy+Hm0bWVzehJJwQsNqsE58rcWvHrYhJpMvCyIeQLhVT/0fVjGNMCRSYS4 rugXir/CsGtTgDZZh2jH9f9MpCt0b216bdsq5YweTO/01A0fYRw1y4ikvZ+ZmpEWITLzcN 0feFzklA3GvMhDLwUIErTiNLRKFBaUTWFTZZ4iS3CRoNPmq9JqS18px592yUj8RSQWDgZ0 JvJALubQW54sHPAM8POcoPJlLluY1NLycvY8nu+4KmBTxjXQNvdJwZ0xpz/c5Y6GIxrSbi Aa7/VY4o7OBpggpkMR5yiaqVzgGLKD5q335d4y9TgSaLL67DJffxCNGd4RWy9w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665596431; a=rsa-sha256; cv=none; b=A8RF32VOAZT6zFbZOxrOv3qZlaJxwfbdZgL5Y8WnNV2vnjv0T2Zv0DwyTlP3xJiZgaEQf/ 78VpZTfyJG9BaUwNZo/BwaZNwiJKn7BRz4CeeFwg6gDv7xEIDIHNufWPfS/nucuSVClvi/ I8MMwWiNU0JtHct1fpTbFuncovFD9/iIckjvw5y/A4kfaEOxBc9ClDM4j5sKKOZAhpDTKw ZJO72LJ/bUfwsKI6NrswAi5BLcHSkqdKdFT+aYaA4IfLF7kPzfv1g1sn1CH+nB3LfEvhHK LKwufBwKo0JggvjOR5IQEmwXwkddaQv7F2igvZEUJbuoXb1IZhqJdXNQ5uHhNQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pleUz049; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.90 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pleUz049; dmarc=pass (policy=none) header.from=gmail.com; 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: 6BA5739101 X-Spam-Score: -3.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: knnoSPDcXfNQ Ihor Radchenko writes: > K=C3=A9vin Le Gouguec writes: > >>> 3. Instead of trying to find a silver bullet for human-readable anchor >>> generator, we allow users to customize it. The default will be >>> constant "org" yielding "org-Ajjq"-type anchors, just like we have >>> now. But we can also provide other generators, like the one Timothy >>> proposed, or better versions contributed in future if there is >>> demand. >> >> Personally, I'd be wholly satisfied with a customization option; the >> grail for me would be [pandoc's algorithm], which doesn't look too hard >> to reimplement in one's config. >> >> (Although the collision-handling logic could be tricky: since it >> revolves around appending a counter to the ID, it needs to keep track of >> how many times the same ID has been generated for the whole document. >> If the generator API is just {heading =E2=86=A6 ID}, i.e. there is no ex= tra >> "context" argument, one will need to do some bookkeeping "on the >> side"=E2=80=A6) > > The collision-handling should not concern the anchor generator code. If > an anchor generator returns a duplicate ID, we can just append some > symbols to make it unique. All the bookkeeping has to be made in > centralized way on ox.el side. Well, it depends on what "some symbols" are. Pandoc's counter-based suffixes, for example, are reproducible & stable for a given document outline. That's why I'd personally like to have those. Other suffix-generation schemes (e.g. hashing the section content) might produce something reproducible as well, but not necessarily so stable wrt the outline (e.g. hashing the section content will produce different results everytime I add or remove a comma).