* Strange Org <> OS interaction w/ bad ID
@ 2020-02-24 18:21 Ken Mankoff
2020-02-24 18:51 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Ken Mankoff @ 2020-02-24 18:21 UTC (permalink / raw)
To: Org-mode
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Strange Org <> OS interaction w/ bad ID
2020-02-24 18:21 Strange Org <> OS interaction w/ bad ID Ken Mankoff
@ 2020-02-24 18:51 ` Nicolas Goaziou
2020-02-24 19:41 ` Ken Mankoff
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2020-02-24 18:51 UTC (permalink / raw)
To: Ken Mankoff; +Cc: Org-mode
Hello,
Ken Mankoff <mankoff@gmail.com> writes:
> I thought named IDs were supposed to go into CUSTOM_ID properties
> rather than ID properties. Is this incorrect?
ID are meant to be automatically generated, and stored in a database.
They can work across documents. CUSTOM_ID, OTOH are use-defined values,
internal to the document.
> Does anyone know why Org is parsing files in random folders when
> I have a bad ID and a <<noweb>>?
I don't. You may want to check `org-id-files', or walk the hash table
`org-id-locations'.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-24 19:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-24 18:21 Strange Org <> OS interaction w/ bad ID Ken Mankoff
2020-02-24 18:51 ` Nicolas Goaziou
2020-02-24 19:41 ` Ken Mankoff
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.