From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uHnIKEBiRmP+LgAAbAwnHQ (envelope-from ) for ; Wed, 12 Oct 2022 08:44:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id IHrTKEBiRmNB3AAAauVa8A (envelope-from ) for ; Wed, 12 Oct 2022 08:44:16 +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 701863CBC0 for ; Wed, 12 Oct 2022 08:44:16 +0200 (CEST) Received: from localhost ([::1]:43564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiVTT-0002Oq-2n for larch@yhetil.org; Wed, 12 Oct 2022 02:44:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiVIV-0005Uk-5V for emacs-orgmode@gnu.org; Wed, 12 Oct 2022 02:32:55 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:38751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiVIT-0002su-D8 for emacs-orgmode@gnu.org; Wed, 12 Oct 2022 02:32:54 -0400 Received: by mail-pf1-x436.google.com with SMTP id p14so11301603pfq.5 for ; Tue, 11 Oct 2022 23:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=hHsmEgvsCHAgDW6JqUnXIVMU6j+/eOEfbzHPkkaC0ac=; b=LNxxufUh6X4ajbM/8oDNAUvTtrbozG0RQrIp63YeTzWGgTSbfhj2miUTFuRC0BZekh eP4mM34rkLfjZF1t+ourL4xJEOvrRgDUrwBX9Cbdj/OFVbWEPdeTeSQjZughUJlCoFwh /CkgllKV/Vrp/gHJUAoy2C5ZF1DtyNphsMlx8ECMnz3ppwO6ReJBK0csSP+GdrZBeVdl SqHOYymycELyM/POHakcFzaSWJ2ATU1mzQjCXvw1eFHhBLS1aaPkOycPrC32sVDrJik7 hdrLQGEQqfgJrHM0uxzRDGpR45ndDCuyOD60sBEhPiqEL0+szYxQrlZd7B2CCQWHlZlS zc4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version: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=hHsmEgvsCHAgDW6JqUnXIVMU6j+/eOEfbzHPkkaC0ac=; b=yUKhlIIiFBHoQfPsJoeWz40LElliVb6jPrgH6X2UHYJ0kPDyB1PFjxOUwt761m2yDw WvKP3PkrU1VeVNaKhn4sXIrCVzeVD+k93D1K5gNFZoJZaQV6VdWwR5CMh0mHBVIeytL1 PuKT9Ny9eUUyrl/AmPShkeD2Wd74XB+UkgxG9ACbGfqeB+Gbdgam2XNAq+FeCIuUu0P7 6Q5gjSUSdcOjstYN4Zlz1+zgF3iXk+6QgCNz4YawPgL7EqH4TdOxQm00ODUOO39NLFB/ luUn5WPu8vNCuWjoR/XCDwVH/ts2V7qwyf68vBaCKTdQTnofOQ9tOb8cdeLWiSG00spK Q7fA== X-Gm-Message-State: ACrzQf2jHc7TWrVHkqw4VrIS1hDnNa2i9fZT12OiT3jTzCoUlV8ffpXH sXraap1rnC0TGvrg6RKwsqY= X-Google-Smtp-Source: AMsMyM47mq+ncFrbI/wQhmdjX5KB3ivobmQKKM6bXXRTMSHQ3oBmZSjK4HKf7LKIEbMTNJ7qGH2Hjw== X-Received: by 2002:a05:6a02:186:b0:439:49a3:479b with SMTP id bj6-20020a056a02018600b0043949a3479bmr24561354pgb.171.1665556371945; Tue, 11 Oct 2022 23:32:51 -0700 (PDT) Received: from localhost ([2409:8970:af2:32f:6c23:3ad5:f37d:541b]) by smtp.gmail.com with ESMTPSA id 84-20020a621657000000b005627b3788b8sm10211736pfw.181.2022.10.11.23.32.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 23:32:50 -0700 (PDT) From: Ihor Radchenko To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec 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: <87v8oq9nha.fsf@gmail.com> References: <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> <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> Date: Wed, 12 Oct 2022 14:33:39 +0800 Message-ID: <87ilkpsg8s.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=yantar92@gmail.com; helo=mail-pf1-x436.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.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=1665557056; 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=hHsmEgvsCHAgDW6JqUnXIVMU6j+/eOEfbzHPkkaC0ac=; b=mSdBFraXDci8/mwKXECAcax+2Oi8FaRxUfr/HyeApYJwXCnwGRsUB1K7t/EzPm91kEoD/c LSlwyejgAi4sPfovbgmyoRrdG1HunkS2nZ2hafzXDVaroJ6C7wsGnW4Idq3uIGYBPO+Jsv JRjtgHZtPUtjuwkqgEl+aAO8+ITuFe+p40hgJ37zvmG86mz6o8NKiruT7GsQG+PdlDXJtB mgCuySXqlIWyuDYnNG+o7fIKngVR+ibIXG3+3E9fwZYO7QJTGY279mh/bsujPj9pfY4IUF zDH6zgcYXljVutdL7frRcE+69gd1VexgfG0SdsRFIwrcUVCbaLCmqhF9jeq3fQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665557056; a=rsa-sha256; cv=none; b=KrYUiVXm+Kg5hsVRMFwEhfehfGqE9bNTseAa25pTwaQx5qy74jl9Dipy+4AWS6BC/kySkp tQX4JkeaCOu67NftmMYkblo9ByGHzZSOF0hcIS//ovc7yihuZVEpRd0ZYCKilUnkB0586B uaDIeAPypa5xLJiCF5YC2xN8H9fElE9NBs6NQvYRNfP02m5OYQEqllPXPEWgRISvnG+Fh+ jeNvRks08XuU/XFMijOmZD055ixARZ/etaa6/vXHxl3evB4PlIcuiseOA7lP+YkLyqvNxo zI9+o2tGPQDaOBLo7EuhWGVbIfxr3Zl9PPDXb5DL6VWn9tNHWUzUapl+bjosBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=LNxxufUh; 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: -1.90 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=LNxxufUh; 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: 701863CBC0 X-Spam-Score: -1.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: 3VW4A9XCt4/o 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 ext= ra > "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. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at