From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Adventures with org-footnote-auto-adjust Date: Mon, 25 Feb 2013 11:54:14 +0100 Message-ID: <87wqtwslyh.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9vrW-0002IQ-GP for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 06:04:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9vhW-0007C2-0L for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 05:54:49 -0500 Received: from mail-wg0-f50.google.com ([74.125.82.50]:49510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9vhV-0007Bh-LJ for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 05:54:29 -0500 Received: by mail-wg0-f50.google.com with SMTP id es5so2325172wgb.29 for ; Mon, 25 Feb 2013 02:54:28 -0800 (PST) In-Reply-To: (Thomas S. Dye's message of "Sat, 23 Feb 2013 08:09:34 -1000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: Org-mode Hello, tsd@tsdye.com (Thomas S. Dye) writes: > In the document I'm editing, I have sentences like this: > > If you want a list to start with a different value (e.g., 20),[fn:17] > start the text of the item with ~[@20]~. > > As a matter of style, I prefer the footnote (which contains qualifying > text, rather than a reference) be at the end of the sentence, and that > it immediately follow the period. So, I cut and paste to get this: > > If you want a list to start with a different value (e.g., 20), > start the text of the item with ~[@20]~.[fn:17] > > Now, the next time I insert a footnote, with C-c C-x f, I get something > like this: > > If you want a list to start with a different value (e.g., 20),[fn:17] > start the text of the item with ~[@20]~.[fn:17] > > The text of the original footnote, [fn:17], is lost, though the mark > remains in the text. If the new [fn:17] is some distance away, then the > problem of duplicate numbers isn't readily apparent in the midst of > other work. Of course, I subsequently discovered that `~.[fn:17]' > wasn't working and put the space back in. Now, the footnote refers to > the wrong text. > > I've learned that there are certain conditions (I don't know how many) > where the space after a sentence won't accept a footnote insertion. There shouldn't be any of such conditions. > The example sentence is one of these. Apparently, it is the `~.' > combination that triggers the condition. Org is good enough to > prohibit inserting a new footnote into one of these "black holes" > (which is how I discovered them), but it doesn't mind if I cut and > paste a footnote into one. I fixed it. Footnote references should be allowed there. > I'm not certain how much mischief this might have caused. I discovered > the problem when the text of *both* footnotes in a section of the > document were incorrect. > > In my case, org-footnote-auto-adjust doesn't perform any crucial > function--it just makes the Org mode buffer seem more orderly. Given > that there are "black holes" in the buffer, whose presence have the > ability to confuse org-footnote-auto-adjust so that data are lost, > should org-footnote-auto-adjust be deprecated? `org-footnote-auto-adjust' still does its job when, for example, a new footnote is created or a footnote is deleted. It is fragile when copy-pasting a footnote reference across some text. Anyway, it should be possible to fix most of these "black holes", if only we are aware of them. Thanks for your report. Regards, -- Nicolas Goaziou