From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CygnKxaGsmBnHwEAgWs5BA (envelope-from ) for ; Sat, 29 May 2021 20:21:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oOfyJRaGsmDzZQAAB5/wlQ (envelope-from ) for ; Sat, 29 May 2021 18:21:10 +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 5EE6A1DFB9 for ; Sat, 29 May 2021 20:21:09 +0200 (CEST) Received: from localhost ([::1]:58966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln3a8-0004TP-7x for larch@yhetil.org; Sat, 29 May 2021 14:21:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln3Z9-0004T3-7f for emacs-orgmode@gnu.org; Sat, 29 May 2021 14:20:07 -0400 Received: from ciao.gmane.io ([116.202.254.214]:49714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln3Z7-00089t-SV for emacs-orgmode@gnu.org; Sat, 29 May 2021 14:20:06 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1ln3Z4-0000bF-Gs for emacs-orgmode@gnu.org; Sat, 29 May 2021 20:20:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: sbaugh@catern.com Subject: HTML export uses anchor ids which change on every export Date: Sat, 29 May 2021 14:18:04 -0400 Message-ID: <87wnrhl7z7.fsf@catern.com> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:QQHSXSrAPQX6vJqFRnvB/E5z9B8= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , 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=1622312469; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=LYiX7PrkucsmyRcjizohhRkLGmYHW1IxlRyCwLJehrs=; b=RLALufJV/IWCtSCDHaPF9xB2CXu3FVot/+O5QJ0vybeo+zQ0DYlJ3rhg9JLVL3AGO7lLU1 xPnwpssuqoP0H4ua1k0iTREEpIOXR84jtKq1g/xA6p0FhawKIIAf6g3bN22vljUE0PYzdt 70Kw2iV4ALerNumR+XQxcuvh6FqPN7Jk4xh4oTGjYuJfypYCsthQBHbUydg9JvwJ56IxSj 7t1GWbm38Ru/qqrWmskua2yynud4EJz8ZiNquV/EPEMPleuiZAVQNmZz3O8+3M6n4+ozUl bkUw6McuVNCbgQd14ynQi9V1Qw9jOCM3aO+pAMG0X6rNA+enz7GON85vcTI6Gw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622312469; a=rsa-sha256; cv=none; b=RIgBHQN4Hfod2CkaOEYdvwFEIuNqhL4EJlUhXBEBXwTczQi4z7fzoAy75l1OPLs3hOtrbV F34Ns8W2MnDhAfmkyViBNGd57cBxPBp4ZAMC/7T15DpX/nDVZKAj8GN6zl639Tl450eJCi RPGqxzFeKuZGKtAhLamANJXTBpkWibZCTUtGreRRlKIMBl99gCoA0DROuRpf3ZwqS6l9wh ZBpj3KVdAVJ1w6HZJ+TLK4EHhGVrWfxqZaxJipj0kdazep8ewp7Yw6eQK0fZWIl1Bw3Y8e COmcDhx7jdmn2gcAk4csaBKyaxZt4q/LDZZRNel1xD1Fadnoe/pQYZTkAIzBWg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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.83 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=catern.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: 5EE6A1DFB9 X-Spam-Score: -1.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: C23pzpX37GfX HTML export wraps headlines in anchor tags with IDs, so that they can be linked by suffixing #[anchor-tag-ID] to the URL. HTML export used to use anchor IDs like "sec-2" for the second headline, but at some point it switched to generated IDs like "org7ffb324", which change on every re-export. This means anchor-links on external sites (that is, links which link to a specific section of an org file) break every time an org file is re-exported to HTML. The old style of anchor IDs would break URLs when sections moved around, but at least it wouldn't break on every re-export! This makes org much less useful for typical web publishing use cases. This can be worked around by setting CUSTOM_ID for every headline, which will override the anchor id used, but I think it was much better when it just worked by default... It looks like this was changed in commit 459033265295723cbfb0fccb3577acbfdc9d0285 "Export back-ends: Use `org-export-get-reference'" Perhaps this functionality (of generating anchor IDs based on the section number) could be added back in?