Hi Org List,
This is cross-posted here: https://www.reddit.com/r/emacs/comments/f8t50q/help_debugging_org_os_interaction/
I've run into a strange bug. This is reproducible on my machine with "emacs -Q", but not with with emacs-sandbox https://github.com/alphapapa/emacs-sandbox.sh/ so I don't know if you'll be able to recreate this...
Problem: When exporting an Org file that contains 1) <<noweb>> refs and 2) id:link links to CUSTOM_ID, then Org parses files all over my filesystem. Given that this happens with "emacs -Q", I don't know why it would be opening files in random folders!
The MWE Org file that I'm opening and exporting is:
=========================== BEGIN ===============================
#+BEGIN_SRC emacs-lisp :results value :noweb yes :eval no-export
<<bar>>
#+END_SRC
#+NAME: bar
#+BEGIN_SRC emacs-lisp :results value :noweb yes :eval no-export
(org-version)
#+END_SRC
* Bug: Export with IDs and links
:PROPERTIES:
:CUSTOM_ID: foo
:END:
+ Link to id:foo
=========================== END ===============================
The file is eventually exported correctly and the link works. I think I found the bug - when I run org-lint, I am told
> 18 high Unknown ID "foo"
And when I change "CUSTOM_ID" to "ID", then everything works. No bug. No random files parsed. With CUSTOM_ID I can see it parse files throughout my filesystem (how does it find them??) because I get this error message about 10x:
> The local variables in /path/to/folder
> contains values that may not be safe (*).
>
> Do you want to apply it? You can type
> [snip]
>
> * eval: (pyvenv-activate "/path/to/anaconda/envs/env")
The bug needs both the id: link to CUSTOM_ID *and* the <<noweb>> ref. If I comment out the <<noweb>> ref, then the bug does not appear.
I thought named IDs were supposed to go into CUSTOM_ID properties rather than ID properties. Is this incorrect?
Does anyone know why Org is parsing files in random folders when I have a bad ID and a <<noweb>>?
Thanks,
-k.