From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id mIfWMfgLEGaZfAEAqHPOHw:P1 (envelope-from ) for ; Fri, 05 Apr 2024 16:34:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id mIfWMfgLEGaZfAEAqHPOHw (envelope-from ) for ; Fri, 05 Apr 2024 16:34:32 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="W//RM24/"; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712327672; a=rsa-sha256; cv=none; b=uCdspHSLUSGJyCtHacvtscUutmcHA7zgPe/4PSFREEUbUjZ5rKY6TP+Jwquhw8k2344Ud6 Q8c9ps5g6H7vhAaaAaUBbG30bxiRKgowHF5fz8b8zrKpEBD/LRTuiUxi1HrvdvqGvlJTpm Oy9e8cUQJStgwhGnemkh13ZKJ9c0DPhg1ueOg29XARDrkWq0G5DOkdPs5a7rRxmzOTls2f gbS5lb6rVJHX44nvmoACgt30otY+fuXLj6FmpikqvyPZmJCKB6n6YLOXDk4ZBJIrQ+kG41 aX1sp45PeSQxI/f+p45e8ECkakeQ5S1ZD0Sp2k5D+p8lsnW9vVdCCdiWQFC7kA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="W//RM24/"; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712327672; 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=TjvAsmLvgGDOLh4gMRKUJlIkLuwqnoTOMhArgCa55N0=; b=gSzdNAtxGTJJ/uxI519x1UgQBMqbqoEd0XDWPTEt78/fkBZ+zOSapmI6cKE/Mo3x50f4J+ CcICz5LtdqoIW8AWsbqMjYaSzep5dNjIoFSy7TgJXX8h0tAFzYzb9gtzabUQFG8UT/7XBe /OGWAmq+74iUeVb5YohHiO/q7tue6pnIKF/xjtonKe8uNOw+skmBL9cyIMpEb23lubpJzR 1Zyo7d6gaZC1F3tLywOLfCzXXLG2iTAdNVqX/Y/bM5X0IckIS8oFpWQd35+bm/NHsZjm7+ PYwOB1IrkRHplUM9Ql1siXgwlQ7PPV38v6egpl5qX4rhzKt0o1x/XWYQ5xSQMA== 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 92C646DF79 for ; Fri, 5 Apr 2024 16:34:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rskdQ-0008U7-49; Fri, 05 Apr 2024 10:33:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rskdO-0008Tz-Sf for emacs-orgmode@gnu.org; Fri, 05 Apr 2024 10:33:39 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rskdM-0007uU-8x for emacs-orgmode@gnu.org; Fri, 05 Apr 2024 10:33:38 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8F0AB24002A for ; Fri, 5 Apr 2024 16:33:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1712327613; bh=EkoNN1eI7IBzrg1/7nQ1ZVU+2nntOHeagQYeW9W1rAw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=W//RM24/MBj5u7mpQP3wBgDIoKPpFA6TZDHTj8imEKOeczz2p3WOmivBNbk663Mq0 deQ1oLFVebMs4uSxfRQWC6kAotxqg4BMr0sQ0zcJdowhio+u+kVO+y3yUksm91RnMM 1zDlDWbBerraDfAsow4HG14fbg9y3pq+EocXabx6SZxSGB/uibL6Lsq4punjXczBsR DOMR8Ou37NEYLiGaHyTsfgwfoMGIjscRbQejzEZqR2UWl1H2n29CZgtvCT5sHO/MWb eaImhNJAsz0iO+9Zqi2iIkc2timV22w2LZXYKnErn6j6+ywAAHyj64RGOo+x5/8dRZ TeRb02L2O9HEg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VB1F83TzMz9rxN; Fri, 5 Apr 2024 16:33:32 +0200 (CEST) From: Ihor Radchenko To: Protesilaos Stavrou Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)] In-Reply-To: <877chcyz36.fsf@protesilaos.com> References: <877chcyz36.fsf@protesilaos.com> Date: Fri, 05 Apr 2024 14:33:49 +0000 Message-ID: <87o7anop4i.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -6.69 X-Migadu-Queue-Id: 92C646DF79 X-Migadu-Spam-Score: -6.69 X-Migadu-Scanner: mx10.migadu.com X-TUID: if+l0kPTqjIi Protesilaos Stavrou writes: > I have an Org file with contents like the following: > > This is a test 1 [fn:n24aa:These are the contents] and here is more. > > When I do an HTML export, the footnote's label (n24aa) is not preserved > in the exported HTML. Is this intended behaviour? I was expecting it to > keep the label as a user-defined unique identifier. Yes, this is indented behaviour, AFAIU. > I looked into the ox.el and noticed that the export data does include > the labels. But 'org-html-footnote-reference' does not have a call to > get the label: it assigns a number outright. To experiment with > retrieving the data, I tried this: > ... > (let* ((n (or > (org-export-get-footnote-label footnote-reference) > (org-export-get-footnote-number footnote-reference info))) > ... > Can we have footnotes with their label preserved? Or maybe is this going > to break a lot of functionality? I am aware the above not work for > footnote definitions, as those also get the number. The problem arises when only some footnotes have a label: This is a test 1 [fn:n24aa:These are the contents] and here is more[fn::another one]. What to do with the unlabelled ones? Assign a number? If yes, what kind of number? `org-export-get-footnote-number' counts all the footnotes, including labelled ones; so that returned number will be 2 in the above example, leading to awkward ^n24aa followed by ^2 footnote. But even without `org-export-get-footnote-number', ^n24aa ^1 mixture might be awkward. One way could be only using footnote labels when _all_ the footnotes are labelled. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at