emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Justin Vallon <justinvallon@gmail.com>
To: emacs-orgmode@gnu.org
Subject: infinite recursion org-update-id-locations / org-entry-properties / org-entry-blocked-p / org-edna / org-id-find / org-id-update-locations
Date: Thu, 30 Jul 2020 16:21:31 -0400	[thread overview]
Message-ID: <b3cd9a2b-fe03-3b30-26a4-e27d821cb63a@gmail.com> (raw)

I copy by org files between 2 machines.  Thus, my .org-id-locations file
gets stale when I archive on one machine, then sync the org files.

I also use org-edna.

Sometimes, org-agenda will go into an infinite loop (recursion depth,
etc) when scanning.

I believe what is happening is:

- org-agenda / org-edna builds the agenda, and hits a "missing" id(X)
- org-update-id-locations starts scanning files/nodes to refresh
- org-cached-entry-get tries to get all properties
- org-entry-blocked-p is called
- org-edna then tries to parse the BLOCKER property
- the property mentions "id(Y)", which has not been found (yet)
- cache miss, rescan files

The X and Y could be different, but once id(Y) is missing and the
cache-miss happens during id-scanning, it will repeat.

I suppose it also might be sensitive to the order of files in the list,
since scanning the archive first would scan the older IDs, then the
active file would reference those older IDs.  However, I would imagine
there would be trouble if an "earlier" node in the active file
referenced an ID that appeared "later" in the file, since the file is
being scanned in-order.

I haven't tried this, but the simplest case to reproduce might be to
delete the .org-id-locations file, then feed it:

* Second
  BLOCKER: id(first)
* First
  ID: first

I can try to build a (simple) reproducible test case if this is unclear.

My work-around is to disable org-edna, run org-id-update-id-locations,
then reenable org-edna.

-- 
-Justin
JustinVallon@gmail.com


             reply	other threads:[~2020-07-30 20:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 20:21 Justin Vallon [this message]
2020-07-31 18:31 ` Justin Vallon

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=b3cd9a2b-fe03-3b30-26a4-e27d821cb63a@gmail.com \
    --to=justinvallon@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: infinite recursion org-update-id-locations / org-entry-properties / org-entry-blocked-p / org-edna / org-id-find / org-id-update-locations' \
    /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

Code repositories for project(s) associated with this inbox:

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).