From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Lundin Subject: Re: footnote renumber bug Date: Thu, 02 Jul 2009 10:48:23 -0500 Message-ID: <87ab3ngk6w.fsf@fastmail.fm> References: <4A4C59EE.9020602@online.de> <4A4C9DA8.1010502@gmx.de> <4A4CB3B4.3010405@easy-emacs.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MMOUV-0004M6-VR for emacs-orgmode@gnu.org; Thu, 02 Jul 2009 11:46:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MMOUQ-0004KL-A6 for emacs-orgmode@gnu.org; Thu, 02 Jul 2009 11:46:26 -0400 Received: from [199.232.76.173] (port=35904 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMOUQ-0004KF-6B for emacs-orgmode@gnu.org; Thu, 02 Jul 2009 11:46:22 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:43992) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MMOUP-0001Sb-4d for emacs-orgmode@gnu.org; Thu, 02 Jul 2009 11:46:21 -0400 In-Reply-To: <4A4CB3B4.3010405@easy-emacs.de> ("Andreas =?utf-8?Q?R=C3=B6h?= =?utf-8?Q?ler=22's?= message of "Thu, 02 Jul 2009 15:18:44 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Andreas =?utf-8?Q?R=C3=B6hler?= Cc: emacs-orgmode Mailinglist Andreas R=C3=B6hler writes: > Karl Maihofer wrote: >> Andreas Roehler schrieb: >>=20=20=20 >>> after reopening a file with two footnotes inside, >>> inserting a third footnote between first and second, it >>> fails to renumber it. >>>=20=20=20=20=20 >> >> Did you try the new "C-u C-c C-x f S" feature of the latest git-version? >>=20=20=20 > > No. Just check this feature for curiosity, as I dealt with that bug > at common footnote.el >=20=20 >> Org does not renumber footnotes automatically when they are inserted. >> You have to use the command above to do that. >>=20=20=20 > > IMO a decent program should renumber automatically. > Patched footnote.el meanwhile does if called with footnote-init. > Unfortunately your footnote-machine is written fairly different from > footnote.el. > Otherwise I'd send a patch. > There is nothing preventing a user from using footnote.el (and your patch) within org mode instead of the built in org-footnote-action. Simply set up a hook to load footnote-mode for org files. But the lack of automatic renumbering in org-footnote is *not* a bug. Unlike footnote.el, org-mode views footnote notation primarily as markup, not as some form of "final output." The source text simply contains footnote markup, which can be exported as normalized footnotes. And of course, at any point, user has the option of normalizing footnotes in the source text if he/she so desires. Footnote.el, by contrast, was designed for short email messages in which there is no distinction between source text and exported text. Though it serves this limited purpose admirably, it offers only a very rudimentary numbering system rather than a complete markup solution. For any complex writing (e.g., a research paper with dozens of footnotes), footnote.el is well-nigh impossible to use. There are simply too many chances of broken or mixed up links. Org-mode's handling of footnotes is considerably more robust. Several different types of footnote styles are available: - numbered[1] - labeled[fn:label] - inline[fn::Here is an inline footnote.] Footnotes: [1] Numbered [fn:label] Here is a labeled footnote.=20 ------ All of these can be mixed together in the same document. Upon export to pdf, ascii, or html they will be properly sorted and numbered, but the labels in the source will remain the same, ensuring that the source text remains *exactly* as the user wants it to be.=20 At any point, however, the user can sort and/or renumber the footnotes in the source text. For instance, the footnotes above can very quickly and easily converted to the following: ,---- | | - numbered[1] |=20 | - labeled[2] |=20 | - inline[3] |=20 | Footnotes: |=20 | [1] Numbered |=20 | [2] Here is a labeled footnote. |=20 | [3] Here is an inline footnote. `---- The key here, however, is that the process is completely under the user's control. Footnotes will not be sorted or reorganized in the source text unless the user desires it. In my view, this is the proper behavior for a robust markup system. The whole point of markup is to avoid the sorts of automated, global alterations of the source text that are characteristic of word-processors. With labeled footnotes in org-footnote, I can rearrange my text and rest assured that none of my footnote links will be broken. And if I delete a footnote reference without deleting its corresponding definition (or vice-versa), org-mode will alert me to the problem when I export or sort the footnotes. All this is to explain why the lack of automatic renumbering is *not* a bug. And of course, anyone who prefers a different behavior can easily use footnote.el instead. Regards, Matt