all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Jorge <jorge13515@gmail.com>
Cc: org mode <emacs-orgmode@gnu.org>
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	[thread overview]
Message-ID: <87pongp2y5.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAJR3Qne6hr_dkDT58V-ouG=70VXtXhsFA3K1xfN_YOuZx6NRuw@mail.gmail.com> (Jorge's message of "Wed, 28 Sep 2016 13:13:51 -0300")

Hello,

Jorge <jorge13515@gmail.com> 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/ <RET>
> 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

  reply	other threads:[~2016-10-04 15:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28 16:13 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/)] Jorge
2016-10-04 15:08 ` Nicolas Goaziou [this message]
2016-10-04 18:05   ` Jorge
2016-10-05  9:44     ` Nicolas Goaziou
2016-10-05 11:24       ` Jorge Morais Neto
2016-10-05 22:24         ` Nicolas Goaziou
2016-10-05 23:51           ` Jorge Morais Neto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pongp2y5.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=jorge13515@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.