Org API
Table of Contents
- Org-ID API functions (org-id.el)
- org-id-add-location
id file - org-id-alist-to-hash
list - org-id-b36-to-int
s - org-id-b36-to-int-one-digit
i - org-id-copy
- org-id-decode
id - org-id-find
id &optional markerp - org-id-find-id-file
id - org-id-find-id-in-file
id file &optional markerp - org-id-get
&optional pom create prefix - org-id-get-create
&optional force - org-id-get-with-outline-drilling
&optional targets - org-id-get-with-outline-path-completion
&optional targets - org-id-goto
id - org-id-hash-to-alist
hash - org-id-int-to-b36
i &optional length - org-id-int-to-b36-one-digit
i - org-id-locations-load
- org-id-locations-save
- org-id-new
&optional prefix - org-id-open
id - org-id-paste-tracker
txt &optional buffer-or-file - org-id-store-link
- org-id-time-to-b36
&optional time - org-id-update-id-locations
&optional files silent - org-id-uuid
- org-ido-switchb
&optional arg
- org-id-add-location
Org-ID API functions (org-id.el)
org-id-add-location id file
Add the id with location file to the database of id locations.
org-id-alist-to-hash list
Turn an org-id location list into a hash table.
org-id-b36-to-int s
Convert a base-36 string into the corresponding integer.
org-id-b36-to-int-one-digit i
Turn a character 0..9, A..Z, a..z into a number 0..61.
The input i may be a character, or a single-letter string.
org-id-copy
Copy the ID of the entry at point to the kill ring. Create an ID if necessary.
org-id-decode id
Split id into the prefix and the time value that was used to create it.
The return value is (prefix . time) where PREFIX is nil or a string,
and time is the usual three-integer representation of time.
org-id-find id &optional markerp
Return the location of the entry with the id id.
The return value is a cons cell (file-name . position), or nil
if there is no entry with that id.
With optional argument markerp, return the position as a new marker.
org-id-find-id-file id
Query the id database for the file in which this id is located.
org-id-find-id-in-file id file &optional markerp
Return the position of the entry id in file.
If that files does not exist, or if it does not contain this id,
return nil.
The position is returned as a cons cell (file-name . position). With
optional argument markerp, return the position as a new marker.
org-id-get &optional pom create prefix
Get the ID property of the entry at point-or-marker pom.
If pom is nil, refer to the entry at point.
If the entry does not have an ID, the function returns nil.
However, when create is non nil, create an ID if none is present already.
prefix will be passed through to org-id-new.
In any case, the ID of the entry is returned.
org-id-get-create &optional force
Create an ID for the current entry and return it.
If the entry already has an ID, just return it.
With optional argument force, force the creation of a new ID.
org-id-get-with-outline-drilling &optional targets
Use an outline-cycling interface to retrieve the ID of an entry. This only finds entries in the current buffer, using org-get-location. It returns the ID of the entry. If necessary, the ID is created.
org-id-get-with-outline-path-completion &optional targets
Use outline-path-completion to retrieve the ID of an entry.
targets may be a setting for org-refile-targets to define the eligible
headlines. When omitted, all headlines in all agenda files are
eligible.
It returns the ID of the entry. If necessary, the ID is created.
org-id-goto id
Switch to the buffer containing the entry with id id.
Move the cursor to that entry in that buffer.
org-id-hash-to-alist hash
Turn an org-id hash into an alist, so that it can be written to a file.
org-id-int-to-b36 i &optional length
Convert an integer to a base-36 number represented as a string.
org-id-int-to-b36-one-digit i
Turn an integer between 0 and 61 into a single character 0..9, A..Z, a..z.
org-id-locations-load
Read the data from org-id-locations-file.
org-id-locations-save
Save org-id-locations in org-id-locations-file.
org-id-new &optional prefix
Create a new globally unique ID.
An ID consists of two parts separated by a colon:
- a prefix
- a unique part that will be created according to org-id-method.
prefix can specify the prefix, the default is given by the variable
org-id-prefix. However, if prefix is the symbol none, don't use any
prefix even if org-id-prefix specifies one.
So a typical ID could look like "Org:4nd91V40HI".
org-id-open id
Go to the entry with id id.
org-id-paste-tracker txt &optional buffer-or-file
Update any IDs in txt and assign buffer-or-file to them.
org-id-store-link
Store a link to the current entry, using its ID.
org-id-time-to-b36 &optional time
Encode time as a 10-digit string.
This string holds the time to micro-second accuracy, and can be decoded
using org-id-decode.
org-id-update-id-locations &optional files silent
Scan relevant files for IDs.
Store the relation between files and corresponding IDs.
This will scan all agenda files, all associated archives, and all
files currently mentioned in org-id-locations.
When files is given, scan these files instead.
When CHECK is given, prepare detailed information about duplicate IDs.
org-id-uuid
Return string with random (version 4) UUID.
org-ido-switchb &optional arg
Switch between Org buffers. With one prefix argument, restrict available buffers to files. With two prefix arguments, restrict available buffers to agenda files.
Defaults to iswitchb for buffer name completion. Set org-completion-use-ido to make it use ido instead.