From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Sharon Kimble Newsgroups: gmane.emacs.help Subject: Re: how to renumber footnotes? Date: Fri, 17 Apr 2020 11:16:06 +0100 Message-ID: <875zdyto2h.fsf@skimble.plus.com> References: <87v9lyvk3z.fsf@skimble.plus.com> <87mu7aycm5.fsf@ebih.ebihd> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="86144"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 17 12:16:52 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jPO3I-000MK1-Bi for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 17 Apr 2020 12:16:52 +0200 Original-Received: from localhost ([::1]:45010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPO3H-0008T5-D5 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 17 Apr 2020 06:16:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36719) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPO2p-0008Sv-3h for help-gnu-emacs@gnu.org; Fri, 17 Apr 2020 06:16:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPO2n-0000Ht-Ne for help-gnu-emacs@gnu.org; Fri, 17 Apr 2020 06:16:22 -0400 Original-Received: from avasout07.plus.net ([84.93.230.235]:49691) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jPO2n-0000GG-9b for help-gnu-emacs@gnu.org; Fri, 17 Apr 2020 06:16:21 -0400 Original-Received: from london.london ([147.147.30.144]) by smtp with ESMTPA id PO2cjJF1qsCJiPO2eju5g0; Fri, 17 Apr 2020 11:16:19 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1587118579; bh=hH3srG9z/JDWUUz0D0wEXca8W3FVxnFKlv9+M63VuQI=; h=From:To:Subject:References:Date:In-Reply-To; b=OsEO1H3lEwxrFwSd9T8DqLzZVT9Sp4cBCI6IXoJK8QKgJVdMXlx6H8ihNKamTCyfv keLxYfkS/lLMJhwk6UdSjZJea2yaU8llXRbPRg8wv/T1Gn+Fxv4ENquq6iF25OKOU4 WpZ7QR9230iWlgRJNfCBdgDkKa4vJ9pjQon5TumeDevzNP5yEsb8VnjUVGdKAE/1FS XonojrDOvJaY6UNfdf7wp3w7rhkxLgSefcqmEK+uZzVi83ePPorSS2ElGBNJ8m4I/U k6Ymkw/RHU5iVj7RYlt6byEJhFTvjHiHdy4nAlKdNxv+RJGxDV1JjFDovy0HCIyKS2 P58qEB4DbjHXw== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=BPIoUGYG c=1 sm=1 tr=0 a=mfde8XM5OSjOt+FlnmF8Qw==:117 a=mfde8XM5OSjOt+FlnmF8Qw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=mDV3o1hIAAAA:8 a=LlzXLoV6AAAA:8 a=iI7HsYTVAAAA:8 a=bAHfVwKlAAAA:8 a=fLv6pSRNe-irYUXBwioA:9 a=kXGyMC3DFeacjqLO:21 a=Bg4K5xlRkvAPHquU:21 a=_FVE-zBwftR9WsbkzFJk:22 a=diwpeB1DDhFXqWA7J4Up:22 a=KxyM1Xthmv57RbWRIpnN:22 a=fjrkRJ71zQ2jzMzczd-K:22 X-AUTH: skimble@:2500 In-Reply-To: <87mu7aycm5.fsf@ebih.ebihd> (Emanuel Berg via Users list for the's message of "Fri, 17 Apr 2020 06:12:18 +0200") X-CMAE-Envelope: MS4wfOXPHv5xJ43hiX+3pV1WzCHOPfWJcKi08+fFojEhiOjWE83nT/CfdmSk8fLiQW5fIqI8cdgR+e7ZWsCC6jB2qvvbepALQMwA9lc06EUZPE9IibaneKt1 uHRQY7lEyIeQDwHEKb4BC4CMJESBwrqUNN1vgL4i7bvqd8xr+D+tOgyyzdYsWC+4rJJ3jqhdZQzhhg== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 84.93.230.235 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122862 Archived-At: =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Emanuel Berg via Users list for the GNU Emacs text editor writes: > Sharon Kimble wrote: > >> I have 2 org-mode documents called 'file-a' and >> 'file-b', and both have got several hundred footnotes >> starting with 1. I'm adding file-b on to the end of >> file-a, and trying to renumber the footnotes, so that >> even if file-a has 354 footnotes, and file-b has 421 >> footnotes, the whole file renumbers the footnotes and >> continues on from 354 to 355, 356, 357, etc >> and onwards. >> >> But how can I do this please? The org-mode footnote >> program can't do it [...] > > Yes, all tho I'm not an org-mode user, I'm pretty sure > it can :) Else that would be plain horrible. You're right, it is horrible! org-mode cannot differentiate between [fn:1] at the beginning is different from [fn:1] halfway through! And so with all the other footnotes! =20=20 > How do you make a reference/footnote in org-mode? > Because if its all good in document A, and all good in > document B, you should be able to just merge A an B into > a new document AB and then get correct footnotes. (here, > merge =3D find-file AB, yank A, yank B, org-mode does its > thing -> correct footnotes) I copy file-b and paste it into file-a, and the renumbering of the footnotes does not take place, for the reason I explained earlier. Hence my request for someone to help programmatically. I believe that if the script looks back at say 3 previous footnotes, stores the numbers into a string/variable, and then commences footnote renumbering from the highest number in the string/variable. So the second footnote [fn:1] is changed to [fn:315] and onwards. But I'm not a programmer, hence my request for programming help. Thanks Sharon.=20=20 =2D --=20 A taste of linux =3D http://www.sharons.org.uk TGmeds =3D http://www.tgmeds.org.uk DrugFacts =3D https://www.drugfacts.org.uk Debian 10.2, fluxbox 1.3.7, emacs 27.0.90, org 9.3.6 =2D----BEGIN PGP SIGNATURE----- iQJPBAEBCgA5FiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAl6ZgeYbHGJvdWRpY2Nh c0Bza2ltYmxlLnBsdXMuY29tAAoJEDaBgBkK+INbyVMP/juI1jqvxpcYNo6GM3mW biyqJ7xBrr7mRA8EM6AQK1j+cyHmwE/jU3uzsYcoqnjdQ7UVqPk8xJPWhJ3NRn3O FERjxQLslFHAoKB/lZhjAw0SCuennayXXmUaeFm21yR26U7c/S1Z3xTTCH1fxPEC doQVnsT0E93g8QRHe9UsybI6+B0OEKBg8GQIQCP0++QBZ8fojxzHRjmKCfVTRQhs 4APOe6e3w+4ZRUaf3KgJX4NUNaXka/mXFQtBByZ3UtSUnKOAzoqJqk5kti2NLNUo zZ9wlQkbVr1iDv09IVVo6izRlmsQaTX5FDfP8t/2579mAPxgsAVWkByRotl6tjqd lBE1bcrYcVZLuYqo1CsKsVSFqzN76pbhNFqs0F5yEd/f1JE4UUxHiDAi4SuHCZn9 SlJYRAzXpF8z0GDbfPGYekKxRyOLI1oHF/2d4tN01vso/X2tlrwl6N+E/HMV6fXb gLl8ePet5kusJqDl4FU2namh0YZxa8RnPXww3e2bI+9R8FrWUQxqEC6WEvFWzND9 cKv01NnWV7BkcKdQ/A9h7CLo/iIDroL7qdbXD3pxKyjKH1lUtMvBBz5KMevZ3/rg gP3VjydyHhxA1U/r58tG9wDDwgGh2bhwi+WmDDC76yEkkKDVy009F1c026rnIWNG PT0FpU2jvLMXqjFyXCVhkqlO =3DAIv5 =2D----END PGP SIGNATURE-----