From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2OpQACqbOmPilwAAbAwnHQ (envelope-from ) for ; Mon, 03 Oct 2022 10:19:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KCRoACqbOmN0DQAA9RJhRA (envelope-from ) for ; Mon, 03 Oct 2022 10:19:54 +0200 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 952672ECC5 for ; Mon, 3 Oct 2022 10:19:53 +0200 (CEST) Received: from localhost ([::1]:50964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofGg4-0002JB-8y for larch@yhetil.org; Mon, 03 Oct 2022 04:19:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofGdz-0002J2-SX for emacs-orgmode@gnu.org; Mon, 03 Oct 2022 04:17:45 -0400 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]:43695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofGdx-0007ZE-2w; Mon, 03 Oct 2022 04:17:43 -0400 Received: by mail-pg1-x536.google.com with SMTP id a23so1379153pgi.10; Mon, 03 Oct 2022 01:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=cZ0g5wZ9SwMglDPkpAxi43qz4YKXwg2Nuzw20VpOLcA=; b=Ul40v18NXmxxy5CFy7fjXSWSKBjA3+DEQUyAgEpftB3AOHcWaWGD7SKeVJGCOaWtcK v1FiBkm/qvCry4CO+6Ht0tXcsjA2cd9wIZ5Jsi05/+vWSXGvBovkkn0UB/UoT4rnyx77 QlZocIyaN42drjikH1sRaGnXJKibhCFJQfoZhhR3rcObcDDmw39SaWyPWzSuIAuzyfBV yAaJa3sSWaAMkp6HF3T0AycffDwFvdJ4jblEaG/EI93kRUQUGCaY2+I0fFDnpQt6TTzI 1bRmgW92mPA+Z5y4C4SY5tg6bAA3eav6crqeoah2WzlZQB22DHtrrVsBfnvCkl7d1+2z 24ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=cZ0g5wZ9SwMglDPkpAxi43qz4YKXwg2Nuzw20VpOLcA=; b=j9gtB4gmCsSznR4sNSU8jpGBSzlhpfisVUrJOn9hqhkk4+k4jHTtKcjiAOggzCCiFL beAVBzoUhSOpxpoQOioh29asj267LeejbBEnYWBqKX7H/TcT9ukX4lGWsPRaFF6AmdjA dMJvHRHIoElzlZ46wQ19AgM/xYwrWRiMLSJSVrdSuSt2S51blCxugs5GNNrkp8CsrmMK ZSRuFkS7ISJqS2Ut5PecYYBxDcQv8ujNEKmVQm54ksmvdfjKtXoA2I1giE2YP1Gc81O0 8IKqNqHG/DJYwgNAk2FWm65mxrfZv8Q2lXPrADSEs0hAWR5/Hhhsljha+xUfZEszVzaC GdXA== X-Gm-Message-State: ACrzQf33Z1ySs2reOAalIqv3wG8ftlvCQMV1o1x7KatbLiKz9Bd5jxmq 0jr+Kl+1TRCFoPsZUdC0WcmaBMSKz1Z1QSY8 X-Google-Smtp-Source: AMsMyM7FOOoMVu7whWWnMFIVI04p/Zias/FnetcWRdHmwJL+r+quAm8IGawEpEKOsEc4ckboRU2Xmw== X-Received: by 2002:a63:4a1e:0:b0:438:fa59:c0f3 with SMTP id x30-20020a634a1e000000b00438fa59c0f3mr17403128pga.107.1664785058627; Mon, 03 Oct 2022 01:17:38 -0700 (PDT) Received: from localhost ([1.83.154.214]) by smtp.gmail.com with ESMTPSA id a28-20020aa7971c000000b00560cdb3784bsm2754078pfg.60.2022.10.03.01.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Oct 2022 01:17:37 -0700 (PDT) From: Ihor Radchenko To: Bastien Cc: Ypo , samologist@gmail.com, Org-mode Subject: Re: Numbered footnotes in the manual interfere with diff In-Reply-To: <871qrzj0tc.fsf@gnu.org> References: <87bksgpye7.fsf@localhost> <877d1rsuza.fsf@localhost> <871qrzj0tc.fsf@gnu.org> Date: Mon, 03 Oct 2022 16:18:30 +0800 Message-ID: <87sfk5wca1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=yantar92@gmail.com; helo=mail-pg1-x536.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664785193; 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=cZ0g5wZ9SwMglDPkpAxi43qz4YKXwg2Nuzw20VpOLcA=; b=SjfvUDfs4yoOdaDxggStbDxcwezZVPm19pKZj5uZCgwC16hUlTUAAghyRFSckJvhYqUl16 3muLsf1YVBKdnGDnUTO8HaOTt3PkQo2dA+pJMlCRCBlQvXRQq6qLrhWNj60Yu22a3uDlgG nUhSpaDLDqXO2hxBpkngB7lzj4d+4G+dwCXb1yTrGxQiJ2t1pUJpZy1qUe75UFT4fElZ/C SZkSpZi3DeDYsoLtILcM1ZMwYmKAZtNfsp5VOPDWezB4QF9ism4EmH8wm31b6jTuNa+M0o AZWX9vsCdrM4D3wZgEtPRbMNhTku3T6ZNux4AlGcHoVbhBGbQe4DGKZqT/WpQQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664785193; a=rsa-sha256; cv=none; b=SOZC5vy4CDvXjRPejxCZT9zdpukMBC1ynp44zlI5kOotCYJYr162IXPap2oKD+tyr4dpVx vakE2W3lHvjNndjHNaIqHuE3dHOCOvwZELoYUexH7j4DPmgSdU28TBZGzPJN4EkYStfcre RtHfZ2KmeN/f3ipmx3kRxBHnMNxvsA5Dv0LEeAu4yL9M5H9OP457KCW5b5R7I/uWhJvNmN 93+YtUD4CTaYOPwTf9VcQOLY+ytw4EcZS6SYPZk+8ZNlaC0CUXr5K3svE0MBmp/GpSu7GB sN1C3ObGK1g7VePvvvLkGefCqfAWhalXmNluevsSQIrrtm/yaE+g8biRxLq9dQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Ul40v18N; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -3.35 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Ul40v18N; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: 952672ECC5 X-Spam-Score: -3.35 X-Migadu-Scanner: scn1.migadu.com X-TUID: liz5Fx4qFDGF Bastien writes: > Ihor Radchenko writes: > >> Do you have any suggestion on how to deal with changing footnotes in the >> manual? When I delete this footnote, all the footnotes must be >> re-numbered creating a lot of garbage in the diff. Is it ok? Or should >> we prefer inline footnote definitions in the manual to avoid such >> situations? > > I propose to use inline footnotes for notes of one paragraph and to > use regular footnotes for notes spanning over more than one paragraph. > This will enhance both diffs readability and that of the manual's .org > source. > > WDYT? All the footnotes only span a single paragraph. However, multiple footnotes span several sentences and thus look cumbersome when inlined. Should we just inline the one-sentence footnotes? Also, there is one footnote that is indexed (does it even work?): #+findex: org-date #+findex: org-anniversary #+findex: org-cyclic #+findex: org-block [fn:60] When working with the standard diary expression functions, you I am not attaching the patch. Instead, you can run M-: (yant/replace-all-footnotes) inside doc/org-manual.org (defun yant/replace-footnote-with-def (fn) "Replace FN footnote-reference with inline footnote. Move point to the end of the FN." (goto-char (org-element-property :end fn)) (when (and (org-element-property :label fn) (eq (org-element-type fn) 'footnote-reference)) (let ((definition (save-excursion (org-footnote-goto-definition (org-element-property :label fn)) (let ((def (org-element-context))) (org-wrap (org-trim (buffer-substring-no-properties (org-element-property :contents-begin def) (org-element-property :contents-end def))) nil 1))))) (when definition (replace-region-contents (org-element-property :begin fn) (org-element-property :end fn) (lambda () (format "[fn:: %s]%s" definition (make-string (or (org-element-property :post-blank fn) 0) ?\s)))) (org-fill-paragraph))))) (defun yant/replace-all-footnotes () "Replace all footnotes in buffer with their definition." (org-with-wide-buffer (goto-char (point-min)) (while (re-search-forward org-footnote-re nil t) (backward-char) (let ((fn (org-element-context))) (yant/replace-footnote-with-def fn))))) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at