From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?Q?G=C4=B3s_Hillenius?= Newsgroups: gmane.emacs.help Subject: Re: how to renumber footnotes? Date: Fri, 17 Apr 2020 14:10:33 +0200 Organization: Using Emacs' Org Mode Message-ID: <87y2qu8g92.fsf@hillenius.net> References: <87v9lyvk3z.fsf@skimble.plus.com> <87mu7aycm5.fsf@ebih.ebihd> <87a73aaar5.fsf@hillenius.net> <87a73av34s.fsf@skimble.plus.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="72400"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Sharon Kimble Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 17 14:11:13 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 1jPPpx-000Ijv-6Q for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 17 Apr 2020 14:11:13 +0200 Original-Received: from localhost ([::1]:46420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPPpw-0005Nv-8R for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 17 Apr 2020 08:11:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52558) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPPpT-0005Nl-6c for help-gnu-emacs@gnu.org; Fri, 17 Apr 2020 08:10:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPPpR-0007bs-OQ for help-gnu-emacs@gnu.org; Fri, 17 Apr 2020 08:10:42 -0400 Original-Received: from hillenius.com ([2a01:4f8:200:546b::9e15:1]:49748 helo=hillenius.net) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jPPpR-0007Yl-Ej for help-gnu-emacs@gnu.org; Fri, 17 Apr 2020 08:10:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hillenius.net; s=hillenius; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=P7CSj7W5+IvKuGrgxjOakH/CQRQ6esHD95mvvZAviA0=; b=KfBYpqVACfCRFhU4fPHIRvxlj NyUL6+ZDo/Fms1A9q79NYv4PV4rSIAgVt8Pp5ice+fEtpU3vH7PjoJ7ga3s0ITAPgEVAV2ashI+Om C1UjjakvfjRQS2dkk/lQlzthJTR8G/X6CHwPdxB4fFflYVNakgpXwtMK1mF5Piw81T/j8=; Original-Received: from [2a02:a03f:6b2c:3b00:9947:8bde:e7c7:8a82] (helo=inauditus) by hillenius.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jPPpM-0007dL-JB; Fri, 17 Apr 2020 14:10:38 +0200 In-Reply-To: <87a73av34s.fsf@skimble.plus.com> (Sharon Kimble's message of "Fri, 17 Apr 2020 11:05:23 +0100") X-Operating-System: Debian GNU/Linux Sid X-Homepage: http://www.hillenius.net/ X-GPG-Fingerprint: 340F F9A4 8F6C 18FD D032 0C33 ABA1 CB30 E997 A3AF X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:4f8:200:546b::9e15:1 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:122863 Archived-At: [...] > org-footnote can't tell that footnote 1 ([fn:1]) at the beginning is in > the right place when confronted with footnote 1 ([fn:1]) half-way > through! Which is why I'm looking for some other solution, and I believe > that it might be able to be achieved programmatically. Unfortunately my > lisp skills are almost nil, hence my request for someone to help. Ah! Suppose file A has 372 footnotes, and B has another x. I would create a macro that I start just ahead of the second [fn:1], and that adds 372 to [fn:1] so it becomes [fn:373] and repeat that to x. It might take you a few tries, but something like put point at the second [fn:1] c-X ( to start recording the macro, search for [fn: copy the 1 (+ "yank" 273) paste (<-- I'm missing a step here, I bet), and then end the macro-recording with C-x ).