Re: [O] Q: setting/changing search path for links by id

2018-05-02 Thread Samuel Wales
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  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.



Re: [O] Q: setting/changing search path for links by id

2018-05-02 Thread John Kitchin
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



[O] Q: setting/changing search path for links by id

2018-05-02 Thread Julius Dittmar
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