* Q: setting/changing search path for links by id
@ 2018-05-02 9:27 Julius Dittmar
2018-05-02 13:58 ` John Kitchin
2018-05-02 19:53 ` Samuel Wales
0 siblings, 2 replies; 3+ messages in thread
From: Julius Dittmar @ 2018-05-02 9:27 UTC (permalink / raw)
To: Org Mode
Hi,
I'd like to use links for cross referencing. As filenames are very prone
to change in my system, I'd like to use IDs for those links.
What I could not fathom yet is how the search path for those IDs is created.
Is there a way of (session-globally) setting that search path, in a
specialized init file for example?
Is there a way of adding a directory to this search path from inside an
org file?
Thanks for any hints,
Julius
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Q: setting/changing search path for links by id
2018-05-02 9:27 Q: setting/changing search path for links by id Julius Dittmar
@ 2018-05-02 13:58 ` John Kitchin
2018-05-02 19:53 ` Samuel Wales
1 sibling, 0 replies; 3+ messages in thread
From: John Kitchin @ 2018-05-02 13:58 UTC (permalink / raw)
To: Julius Dittmar; +Cc: Org Mode
I think you are looking for the variable org-id-locations-file. This
file contains entries like ("~/vc/journal/2018/03/29/2018-03-29.org"
"A6509542-9C85-46ED-BFE3-715CE44BAA70") and is used to create a hash
table that provides a way to search for Ids. You can see it still holds
information to a file name, so if these change, then at some point the
location file will be out of date and need to be updated.
I think the function org-id-find is used to search for ids.
You can add files with the function org-id-update-id-locations.
I hope that helps.
Julius Dittmar writes:
> Hi,
>
> I'd like to use links for cross referencing. As filenames are very prone
> to change in my system, I'd like to use IDs for those links.
>
> What I could not fathom yet is how the search path for those IDs is created.
>
> Is there a way of (session-globally) setting that search path, in a
> specialized init file for example?
>
> Is there a way of adding a directory to this search path from inside an
> org file?
>
> Thanks for any hints,
>
> Julius
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Q: setting/changing search path for links by id
2018-05-02 9:27 Q: setting/changing search path for links by id Julius Dittmar
2018-05-02 13:58 ` John Kitchin
@ 2018-05-02 19:53 ` Samuel Wales
1 sibling, 0 replies; 3+ messages in thread
From: Samuel Wales @ 2018-05-02 19:53 UTC (permalink / raw)
To: Julius Dittmar; +Cc: Org Mode
there is org-id-extra-files. you will need to code around it to set it right.
by default it is set to text search extra files, as a symbol.
however, that symbol probably cannot be put in as a pseudo-file. i.e.
part of a list with files. [it seems that perhaps 'agenda-archives
/can/ be put in as a pseudo-file, but this is not seem to be
documented in the docstring or the manual. and there is also a
separate variable controlling whether agenda files are searched.] so
it's slightly confusing.
if you want the default, plus some files of your own, which is what
most people want to do with the variable, i think you need to get the
value of text search extra files, append or concatenate your own,
remove duplicates, and set it. [*org feature suggestion*] perhaps org
could do the remove duplicates step for the user, and maybe allow text
search extra files as a pseudo-file, so that the user need only set
the variable to a list. org already does a remove duplicates for the
user for org-agenda-files.
On 5/2/18, Julius Dittmar <Julius.Dittmar@gmx.de> wrote:
> Is there a way of adding a directory to this search path from inside an
> org file?
i'm not sure, but i don't think it searches directories either
recursively or at top level. you will need to do that yourself in
lisp using something like (directory-files (getenv "dorg") t regexp)).
exercise caution if any files are compressed or you changed org or org
archive extensions.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-02 19:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-02 9:27 Q: setting/changing search path for links by id Julius Dittmar
2018-05-02 13:58 ` John Kitchin
2018-05-02 19:53 ` Samuel Wales
Code repositories for project(s) associated with this public 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).