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 ms11 with LMTPS id mKnGEG1yjl7SYAAA0tVLHw (envelope-from ) for ; Thu, 09 Apr 2020 00:55:09 +0000 Received: from aspmx2.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oN6BBG5yjl4qdAAAB5/wlQ (envelope-from ) for ; Thu, 09 Apr 2020 00:55: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 aspmx2.migadu.com (Postfix) with ESMTPS id A57D66870D6 for ; Thu, 9 Apr 2020 00:55:07 +0000 (UTC) Received: from localhost ([::1]:42108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMLTF-0005Li-Ny for larch@yhetil.org; Wed, 08 Apr 2020 20:55:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38274) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMLSp-0005LY-L8 for emacs-orgmode@gnu.org; Wed, 08 Apr 2020 20:54:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMLSl-0005qR-CY for emacs-orgmode@gnu.org; Wed, 08 Apr 2020 20:54:39 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:63128) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jMLSk-0005nj-VA for emacs-orgmode@gnu.org; Wed, 08 Apr 2020 20:54:35 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 7B622B4243; Wed, 8 Apr 2020 20:54:33 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=sI6C2ZCCDaW9svPsU2AEPduaaEc=; b=fsmeup x6vhN2h51OMjLQCNoJaAKbuR62lvH1Jt51D1HIHloTaiOJehL3xTIBQCVMTUGMZ2 P/WqvgJUkKF8l0uO++ISCIzlDn/IYiYW4OoS1G6va36SqHnBMTe0cNI+CEHydIyj MveXbf9+3BLuQAMGEIkJDrfz4nDJpPV5hsFLU= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 73AEBB4241; Wed, 8 Apr 2020 20:54:33 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=OjCmSlvK8PEx1jHW1wF4aRYo5f/7geWh6iXgMTegh+U=; b=r3gYAB1YODQ2zsyKm/65HD9bol1eCs7ChPpOhP6zhr1w1MNiMLkOLe6nAGptTzMzNEAyZT6v6S3Bj0S+95JGAaWCEhejAO6KOgu+o74b2tbK+t3kmBFU3X0/s2mrxgPo6PADedGY8GbhV3DvIKUis3SznXK3tkmcut2aW6bJxyA= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id E940EB423D; Wed, 8 Apr 2020 20:54:30 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: Sharon Kimble Subject: Re: org-footnote renumbering In-Reply-To: <87o8s2xrdk.fsf@skimble.plus.com> References: <87y2r71ibd.fsf@skimble.plus.com> <87a73nj7eg.fsf@kyleam.com> <87o8s2xrdk.fsf@skimble.plus.com> Date: Thu, 09 Apr 2020 00:54:28 +0000 Message-ID: <87imi9iim3.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: ABD310D6-79FC-11EA-901A-B0405B776F7B-24757444!pb-smtp20.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 173.228.157.52 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=default; t=1586393709; 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=+MfAIZCktWjIDe7ac5hexiKs0yheZpKkj8Pp5h6mujk=; b=EIscRBFbH+djUIfdFwGz6Oli0M3h0HD061mjMysooKcMzUDIH36oimgxS1IC0E8gVXWByx TKt57XVnXYLXAFbSLEhWgcv0mkx1tXN44aHM4Y+csVWjTyX3miNC//8CU5ogwVfvmL9pCP Zaaag5Mtwv4p4gojZNn/zafo3fV4sXw= ARC-Seal: i=1; s=default; d=yhetil.org; t=1586393709; a=rsa-sha256; cv=none; b=A5C3PMcQXj9Gxpcf4yrIJcwh4C4I/xykIo7LE3OMBJh7UxPpsEUDaNVyJln91RySMOE/6N COWYALkY6AorWqad8HNeCPSkklvwHsa14yY2gue0tpp014RHlSW7hBWnSXQK4LeKSKQ7hS 9bl/rWth51SboO7VMsGohV7YSXiorVE= ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=fsmeup x; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=r3gYAB1Y; dmarc=none; spf=pass (aspmx2.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-Scanner: scn0 X-Spam-Score: -1.21 Authentication-Results: aspmx2.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=fsmeup x; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=r3gYAB1Y; dmarc=none; spf=pass (aspmx2.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-Scan-Result: default: False [-1.21 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.58127001000368]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.31), country: US(-0.01), ip: 209.51.188.17(-0.58)]; ARC_SIGNED(0.00)[i=1]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; RCPT_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[pobox.com:+,kyleam.com:+]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[kyle@kyleam.com,emacs-orgmode-bounces@gnu.org]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[pobox.com:s=sasl,kyleam.com:s=mesmtp]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[kyleam.com]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: meiz6NLIdaIP Sharon Kimble writes: > I'm using 'C-u C-c C-x f r' and it isn't changing the footnote > numbering! I am adding file-2 to file-1 and then using the key mantra, > but the footnotes are not changing. In file-1 the last footnote is 756, > and in file-2 the first footnote is 670 (I've no idea why it suddenly > starts at 670, but it does.) Hopefully someone will correct me if I'm mistaken, but I don't think renumbering will help in the situation you describe. If you're concatenating two files with overlapping footnotes, I don't see how Org would know which reference belongs to which definition. My understanding is that renumbering is useful in cases where the references are no longer an ordered, unbroken sequence. Say you have this file: --8<---------------cut here---------------start------------->8--- Pellentesque dapibus. Aliquam feugiat [fn:1] tellus. Nulla facilisis. Phasellus in [fn:2]. * Footnotes [fn:1] Vel tortor sodales tellus ultricies commodo. [fn:2] Proin quam nisl, tincidunt. --8<---------------cut here---------------end--------------->8--- With point after "Nulla", you insert a footnote ('C-c C-x f'): --8<---------------cut here---------------start------------->8--- Pellentesque dapibus. Aliquam feugiat [fn:1] tellus. Nulla [fn:3] facilisis. Phasellus in [fn:2]. * Footnotes [fn:3] Nullam libero mauris. [fn:1] Vel tortor sodales tellus ultricies commodo. [fn:2] Proin quam nisl, tincidunt. --8<---------------cut here---------------end--------------->8--- By default, the numbering isn't auto-adjusted. This is where renumbering with 'C-u C-c C-x f r' comes in. Calling that gives: --8<---------------cut here---------------start------------->8--- Pellentesque dapibus. Aliquam feugiat [fn:1] tellus. Nulla [fn:2] facilisis. Phasellus in [fn:3]. * Footnotes [fn:2] Nullam libero mauris. [fn:1] Vel tortor sodales tellus ultricies commodo. [fn:3] Proin quam nisl, tincidunt. --8<---------------cut here---------------end--------------->8--- Back to your problem of combining files. My approach would be * Do a regexp search in file A and replace all "[fn:N]" with "[fn:aN]", making them named references. Repeat with file B, creating "[fn:bN]" references. * Combine file A and file B. Then convert the references into numbers by normalizing with 'C-c C-x f n'. But perhaps others can suggest a better solution.