From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: org-refile, org-archive-subtree and footnotes [8.3.6 (8.3.6-4-g4835be-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160926/)] Date: Tue, 04 Oct 2016 17:08:02 +0200 Message-ID: <87pongp2y5.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brRKL-0003k8-8f for emacs-orgmode@gnu.org; Tue, 04 Oct 2016 11:08:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brRKF-0005Hn-OV for emacs-orgmode@gnu.org; Tue, 04 Oct 2016 11:08:16 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:57143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brRKF-0005Gk-Hs for emacs-orgmode@gnu.org; Tue, 04 Oct 2016 11:08:11 -0400 In-Reply-To: (Jorge's message of "Wed, 28 Sep 2016 13:13:51 -0300") 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" To: Jorge Cc: org mode Hello, Jorge writes: > Start Emacs with an empty init file and make the following customizations: > > - org-log-refile :: 'time > - org-refile-targets :: (("/tmp/b.org" :maxlevel . 1)) > - org-refile-use-outline-path :: 'file > > Create an Org buffer named a.org with the following content: > > * My pets > ** Rex > Given to me by Theresa.[fn:1] > * Footnotes > > [fn:1] A work colleague. > > > Create an Org file named /tmp/b.org with the following content: > > * Her pets > > In buffer a.org, with point in Rex, type: > C-c C-w b.org/Her pets/ > M-x org-lint > > org-lint complains: > 4 high No reference for footnote definition [fn:1] > > A similar problem occurs if the entry is archived with org-archive-subtree. I > expected Org to automatically detect the footnote inconsistency, without me > manually invoking org-lint. Even better would be to fix it, e.g. offer to move > the footnote definition if there are no other references in the > current buffer. Indeed, this is annoying. I do not like much automation, but, in this case, the problem is difficult to detect, and solve, manually. Therefore, we should do better. Besides, we already do something similar when including files in a document prior to exporting it (we collect included footnotes and make sure they do not conflict with existing ones in the target document). So, it may be only a matter of refactoring code. However, I'd like to keep for after Org 9.0 release. BTW, would you want to provide a patch? > Now move to the Footnotes section and refile it to b.org (top level). > Then on b.org invoke M-x org-lint. It complains: > 5 high Extraneous elements in footnote section > I expected either org-refile to omit the timestamp when refiling the footnotes > section (to placate org-lint) or org-lint not to complain about the > timestamp. This is a minor issue we shouldn't bother about. Lint just tells you some parts of the Footnotes section will not be exported. Just ignore it. Regards, -- Nicolas Goaziou