annotate lisp/org/org-id.el @ 100269:032aa24b2125

Checking in the correct versions of the files, sorry, I hade used the files from an experimental branch.....
author Carsten Dominik <dominik@science.uva.nl>
date Sun, 07 Dec 2008 18:45:03 +0000
parents c851df8e004e
children cea079b68b76
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
1 ;;; org-id.el --- Global identifier for Org-mode entries
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
2 ;; Copyright (C) 2008 Free Software Foundation, Inc.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
3 ;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
4 ;; Author: Carsten Dominik <carsten at orgmode dot org>
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
5 ;; Keywords: outlines, hypermedia, calendar, wp
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
6 ;; Homepage: http://orgmode.org
100267
c851df8e004e 2008-12-07 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 99866
diff changeset
7 ;; Version: 6.14
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
8 ;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
10 ;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
13 ;; the Free Software Foundation, either version 3 of the License, or
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
14 ;; (at your option) any later version.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
15
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
19 ;; GNU General Public License for more details.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
20
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
23 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
24 ;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
25 ;;; Commentary:
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
26
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
27 ;; This file implements globally unique identifiers for Org-mode entries.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
28 ;; Identifiers are stored in the entry as an :ID: property. Functions
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
29 ;; are provided that create and retrieve such identifiers, and that find
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
30 ;; entries based on the identifier.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
31
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
32 ;; Identifiers consist of a prefix (default "Org" given by the variable
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
33 ;; `org-id-prefix') and a unique part that can be created by a number
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
34 ;; of different methods, see the variable `org-id-method'.
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
35 ;; Org has a builtin method that uses a compact encoding of the creation
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
36 ;; time of the ID, with microsecond accuracy. This virtually
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
37 ;; guarantees globally unique identifiers, even if several people are
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
38 ;; creating ID's at the same time in files that will eventually be used
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
39 ;; together. As an exernal method `uuidgen' is supported, if installed
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
40 ;; on the system.
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
41 ;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
42 ;; This file defines the following API:
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
43 ;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
44 ;; org-id-get-create
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
45 ;; Create an ID for the entry at point if it does not yet have one.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
46 ;; Returns the ID (old or new). This function can be used
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
47 ;; interactively, with prefix argument the creation of a new ID is
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
48 ;; forced, even if there was an old one.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
49 ;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
50 ;; org-id-get
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
51 ;; Get the ID property of an entry. Using appropriate arguments
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
52 ;; to the function, it can also create the ID for this entry.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
53 ;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
54 ;; org-id-goto
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
55 ;; Command to go to a specific ID, this command can be used
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
56 ;; interactively.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
57 ;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
58 ;; org-id-get-with-outline-path-completion
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
59 ;; Retrieve the ID of an entry, using outline path completion.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
60 ;; This function can work for multiple files.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
61 ;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
62 ;; org-id-get-with-outline-drilling
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
63 ;; Retrieve the ID of an entry, using outline path completion.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
64 ;; This function only works for the current file.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
65 ;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
66 ;; org-id-find
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
67 ;; Find the location of an entry with specific id.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
68 ;;
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
69
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
70 (require 'org)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
71
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
72 (declare-function message-make-fqdn "message" ())
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
73
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
74 ;;; Customization
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
75
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
76 (defgroup org-id nil
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
77 "Options concerning global entry identifiers in Org-mode."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
78 :tag "Org ID"
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
79 :group 'org)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
80
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
81 (defcustom org-id-method 'org
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
82 "The method that should be used to create new ID's.
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
83
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
84 An ID will consist of the prefix specified in `org-id-prefix', and a unique
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
85 part created by the method this variable specifies.
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
86
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
87 Allowed values are:
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
88
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
89 org Org's own internal method, using an encoding of the current time,
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
90 and the current domain of the computer. This method will
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
91 honor the variable `org-id-include-domain'.
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
92
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
93 uuidgen Call the external command uuidgen."
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
94 :group 'org-id
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
95 :type '(choice
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
96 (const :tag "Org's internal method" org)
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
97 (const :tag "external: uuidgen" uuidgen)))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
98
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
99 (defcustom org-id-prefix nil
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
100 "The prefix for IDs.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
101
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
102 This may be a string, or it can be nil to indicate that no prefix is required.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
103 When a string, the string should have no space characters as IDs are expected
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
104 to have no space characters in them."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
105 :group 'org-id
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
106 :type '(choice
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
107 (const :tag "No prefix")
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
108 (string :tag "Prefix")))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
109
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
110 (defcustom org-id-include-domain t
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
111 "Non-nil means, add the domain name to new IDs.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
112 This ensures global uniqueness of ID's, and is also suggested by
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
113 RFC 2445 in combination with RFC 822. This is only relevant if
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
114 `org-id-method' is `org'. When uuidgen is used, the domain will never
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
115 be added."
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
116 :group 'org-id
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
117 :type 'boolean)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
118
99139
8fa7ef477c04 2008-10-26 Carsten Dominik <dominik@science.uva.nl>
Carsten Dominik <dominik@science.uva.nl>
parents: 98871
diff changeset
119 (defcustom org-id-locations-file (convert-standard-filename
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
120 "~/.org-id-locations")
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
121 "The file for remembering the last ID number generated."
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
122 :group 'org-id
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
123 :type 'file)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
124
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
125 (defvar org-id-locations nil
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
126 "List of files with ID's in those files.")
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
127
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
128 (defcustom org-id-extra-files 'org-agenda-text-search-extra-files
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
129 "Files to be searched for ID's, besides the agenda files."
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
130 :group 'org-id
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
131 :type
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
132 '(choice
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
133 (symbol :tag "Variable")
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
134 (repeat :tag "List of files"
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
135 (file))))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
136
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
137 ;;; The API functions
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
138
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
139 ;;;###autoload
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
140 (defun org-id-get-create (&optional force)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
141 "Create an ID for the current entry and return it.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
142 If the entry already has an ID, just return it.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
143 With optional argument FORCE, force the creation of a new ID."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
144 (interactive "P")
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
145 (when force
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
146 (org-entry-put (point) "ID" nil))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
147 (org-id-get (point) 'create))
100267
c851df8e004e 2008-12-07 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 99866
diff changeset
148
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
149 ;;;###autoload
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
150 (defun org-id-copy ()
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
151 "Copy the ID of the entry at point to the kill ring.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
152 Create an ID if necessary."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
153 (interactive)
100267
c851df8e004e 2008-12-07 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 99866
diff changeset
154 (kill-new (org-id-get nil 'create)))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
155
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
156 ;;;###autoload
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
157 (defun org-id-get (&optional pom create prefix)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
158 "Get the ID property of the entry at point-or-marker POM.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
159 If POM is nil, refer to the entry at point.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
160 If the entry does not have an ID, the function returns nil.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
161 However, when CREATE is non nil, create an ID if none is present already.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
162 PREFIX will be passed through to `org-id-new'.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
163 In any case, the ID of the entry is returned."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
164 (let ((id (org-entry-get pom "ID")))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
165 (cond
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
166 ((and id (stringp id) (string-match "\\S-" id))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
167 id)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
168 (create
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
169 (setq id (org-id-new prefix))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
170 (org-entry-put pom "ID" id)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
171 (org-id-add-location id (buffer-file-name (buffer-base-buffer)))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
172 id)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
173 (t nil))))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
174
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
175 ;;;###autoload
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
176 (defun org-id-get-with-outline-path-completion (&optional targets)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
177 "Use outline-path-completion to retrieve the ID of an entry.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
178 TARGETS may be a setting for `org-refile-targets' to define the eligible
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
179 headlines. When omitted, all headlines in all agenda files are
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
180 eligible.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
181 It returns the ID of the entry. If necessary, the ID is created."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
182 (let* ((org-refile-targets (or targets '((nil . (:maxlevel . 10)))))
100267
c851df8e004e 2008-12-07 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 99866
diff changeset
183 (org-refile-use-outline-path
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
184 (if (caar org-refile-targets) 'file t))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
185 (spos (org-refile-get-location "Entry: "))
100267
c851df8e004e 2008-12-07 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 99866
diff changeset
186 (pom (and spos (move-marker (make-marker) (nth 3 spos)
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
187 (get-file-buffer (nth 1 spos))))))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
188 (prog1 (org-id-get pom 'create)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
189 (move-marker pom nil))))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
190
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
191 ;;;###autoload
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
192 (defun org-id-get-with-outline-drilling (&optional targets)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
193 "Use an outline-cycling interface to retrieve the ID of an entry.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
194 This only finds entries in the current buffer, using `org-get-location'.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
195 It returns the ID of the entry. If necessary, the ID is created."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
196 (let* ((spos (org-get-location (current-buffer) org-goto-help))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
197 (pom (and spos (move-marker (make-marker) (car spos)))))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
198 (prog1 (org-id-get pom 'create)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
199 (move-marker pom nil))))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
200
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
201 ;;;###autoload
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
202 (defun org-id-goto (id)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
203 "Switch to the buffer containing the entry with id ID.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
204 Move the cursor to that entry in that buffer."
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
205 (interactive)
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
206 (let ((m (org-id-find id 'marker)))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
207 (unless m
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
208 (error "Cannot find entry with ID \"%s\"" id))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
209 (switch-to-buffer (marker-buffer m))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
210 (goto-char m)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
211 (move-marker m nil)
100267
c851df8e004e 2008-12-07 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 99866
diff changeset
212 (org-show-context)))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
213
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
214 ;;;###autoload
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
215 (defun org-id-find (id &optional markerp)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
216 "Return the location of the entry with the id ID.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
217 The return value is a cons cell (file-name . position), or nil
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
218 if there is no entry with that ID.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
219 With optional argument MARKERP, return the position as a new marker."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
220 (let ((file (org-id-find-id-file id))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
221 org-agenda-new-buffers where)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
222 (when file
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
223 (setq where (org-id-find-id-in-file id file markerp)))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
224 (unless where
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
225 (org-id-update-id-locations)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
226 (setq file (org-id-find-id-file id))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
227 (when file
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
228 (setq where (org-id-find-id-in-file id file markerp))))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
229 where))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
230
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
231 ;;; Internal functions
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
232
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
233 ;; Creating new IDs
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
234
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
235 (defun org-id-new (&optional prefix)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
236 "Create a new globally unique ID.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
237
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
238 An ID consists of two parts separated by a colon:
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
239 - a prefix
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
240 - a unique part that will be created according to `org-id-method'.
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
241
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
242 PREFIX can specify the prefix, the default is given by the variable
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
243 `org-id-prefix'. However, if PREFIX is the symbol `none', don't use any
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
244 prefix even if `org-id-prefix' specifies one.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
245
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
246 So a typical ID could look like \"Org:4nd91V40HI\"."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
247 (let* ((prefix (if (eq prefix 'none)
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
248 ""
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
249 (concat (or prefix org-id-prefix) ":")))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
250 unique)
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
251 (if (equal prefix ":") (setq prefix ""))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
252 (cond
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
253 ((eq org-id-method 'uuidgen)
99501
e3acb52d33e1 2008-11-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 99139
diff changeset
254 (setq unique (org-trim (shell-command-to-string "uuidgen"))))
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
255 ((eq org-id-method 'org)
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
256 (let* ((etime (org-id-reverse-string (org-id-time-to-b36)))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
257 (postfix (if org-id-include-domain
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
258 (progn
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
259 (require 'message)
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
260 (concat "@" (message-make-fqdn))))))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
261 (setq unique (concat etime postfix))))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
262 (t (error "Invalid `org-id-method'")))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
263 (concat prefix unique)))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
264
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
265 (defun org-id-reverse-string (s)
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
266 (mapconcat 'char-to-string (nreverse (string-to-list s)) ""))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
267
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
268 (defun org-id-int-to-b36-one-digit (i)
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
269 "Turn an integer between 0 and 61 into a single character 0..9, A..Z, a..z."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
270 (cond
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
271 ((< i 10) (+ ?0 i))
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
272 ((< i 36) (+ ?a i -10))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
273 (t (error "Larger that 35"))))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
274
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
275 (defun org-id-b36-to-int-one-digit (i)
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
276 "Turn a character 0..9, A..Z, a..z into a number 0..61.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
277 The input I may be a character, or a single-letter string."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
278 (and (stringp i) (setq i (string-to-char i)))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
279 (cond
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
280 ((and (>= i ?0) (<= i ?9)) (- i ?0))
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
281 ((and (>= i ?a) (<= i ?z)) (+ (- i ?a) 10))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
282 (t (error "Invalid b36 letter"))))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
283
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
284 (defun org-id-int-to-b36 (i &optional length)
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
285 "Convert an integer to a base-36 number represented as a string."
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
286 (let ((s ""))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
287 (while (> i 0)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
288 (setq s (concat (char-to-string
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
289 (org-id-int-to-b36-one-digit (mod i 36))) s)
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
290 i (/ i 36)))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
291 (setq length (max 1 (or length 1)))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
292 (if (< (length s) length)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
293 (setq s (concat (make-string (- length (length s)) ?0) s)))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
294 s))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
295
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
296 (defun org-id-b36-to-int (s)
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
297 "Convert a base-36 string into the corresponding integer."
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
298 (let ((r 0))
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
299 (mapc (lambda (i) (setq r (+ (* r 36) (org-id-b36-to-int-one-digit i))))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
300 s)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
301 r))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
302
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
303 (defun org-id-time-to-b36 (&optional time)
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
304 "Encode TIME as a 10-digit string.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
305 This string holds the time to micro-second accuracy, and can be decoded
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
306 using `org-id-decode'."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
307 (setq time (or time (current-time)))
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
308 (concat (org-id-int-to-b36 (nth 0 time) 4)
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
309 (org-id-int-to-b36 (nth 1 time) 4)
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
310 (org-id-int-to-b36 (or (nth 2 time) 0) 4)))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
311
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
312 (defun org-id-decode (id)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
313 "Split ID into the prefix and the time value that was used to create it.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
314 The return value is (prefix . time) where PREFIX is nil or a string,
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
315 and time is the usual three-integer representation of time."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
316 (let (prefix time parts)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
317 (setq parts (org-split-string id ":"))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
318 (if (= 2 (length parts))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
319 (setq prefix (car parts) time (nth 1 parts))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
320 (setq prefix nil time (nth 0 parts)))
98644
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
321 (setq time (org-id-reverse-string time))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
322 (setq time (list (org-id-b36-to-int (substring time 0 4))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
323 (org-id-b36-to-int (substring time 4 8))
e1cc41b9282d 2008-10-12 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 97027
diff changeset
324 (org-id-b36-to-int (substring time 8 12))))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
325 (cons prefix time)))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
326
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
327 ;; Storing ID locations (files)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
328
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
329 (defun org-id-update-id-locations ()
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
330 "Scan relevant files for ID's.
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
331 Store the relation between files and corresponding ID's."
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
332 (interactive)
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
333 (let ((files (append (org-agenda-files)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
334 (if (symbolp org-id-extra-files)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
335 (symbol-value org-id-extra-files)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
336 org-id-extra-files)))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
337 org-agenda-new-buffers
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
338 file ids reg found id)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
339 (while (setq file (pop files))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
340 (setq ids nil)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
341 (with-current-buffer (org-get-agenda-file-buffer file)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
342 (save-excursion
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
343 (save-restriction
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
344 (widen)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
345 (goto-char (point-min))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
346 (while (re-search-forward "^[ \t]*:ID:[ \t]+\\(\\S-+\\)[ \t]*$"
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
347 nil t)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
348 (setq id (org-match-string-no-properties 1))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
349 (if (member id found)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
350 (error "Duplicate ID \"%s\"" id))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
351 (push id found)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
352 (push id ids))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
353 (push (cons file ids) reg)))))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
354 (org-release-buffers org-agenda-new-buffers)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
355 (setq org-agenda-new-buffers nil)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
356 (setq org-id-locations reg)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
357 (org-id-locations-save)))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
358
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
359 (defun org-id-locations-save ()
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
360 "Save `org-id-locations' in `org-id-locations-file'."
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
361 (with-temp-file org-id-locations-file
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
362 (print org-id-locations (current-buffer))))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
363
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
364 (defun org-id-locations-load ()
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
365 "Read the data from `org-id-locations-file'."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
366 (setq org-id-locations nil)
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
367 (with-temp-buffer
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
368 (condition-case nil
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
369 (progn
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
370 (insert-file-contents-literally org-id-locations-file)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
371 (goto-char (point-min))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
372 (setq org-id-locations (read (current-buffer))))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
373 (error
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
374 (message "Could not read org-id-values from %s. Setting it to nil."
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
375 org-id-locations-file)))))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
376
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
377 (defun org-id-add-location (id file)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
378 "Add the ID with location FILE to the database of ID loations."
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
379 (when (and id file) ; don't error when called from a buffer with no file
99849
621e15919df0 2008-11-23 Carsten Dominik <carsten.dominik@gmail.com>
Carsten Dominik <dominik@science.uva.nl>
parents: 99501
diff changeset
380 (unless org-id-locations (org-id-locations-load))
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
381 (catch 'exit
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
382 (let ((locs org-id-locations) list)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
383 (while (setq list (pop locs))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
384 (when (equal (file-truename file) (file-truename (car list)))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
385 (setcdr list (cons id (cdr list)))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
386 (throw 'exit t))))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
387 (push (list file id) org-id-locations))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
388 (org-id-locations-save)))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
389
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
390 ;; Finding entries with specified id
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
391
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
392 (defun org-id-find-id-file (id)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
393 "Query the id database for the file in which this ID is located."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
394 (unless org-id-locations (org-id-locations-load))
100269
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
395 (catch 'found
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
396 (mapc (lambda (x) (if (member id (cdr x))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
397 (throw 'found (car x))))
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
398 org-id-locations)
032aa24b2125 Checking in the correct versions of the files, sorry, I hade used the files
Carsten Dominik <dominik@science.uva.nl>
parents: 100267
diff changeset
399 nil))
96045
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
400
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
401 (defun org-id-find-id-in-file (id file &optional markerp)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
402 "Return the position of the entry ID in FILE.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
403 If that files does not exist, or if it does not contain this ID,
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
404 return nil.
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
405 The position is returned as a cons cell (file-name . position). With
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
406 optional argument MARKERP, return the position as a new marker."
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
407 (let (org-agenda-new-buffers m buf pos)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
408 (cond
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
409 ((not file) nil)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
410 ((not (file-exists-p file)) nil)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
411 (t (with-current-buffer (setq buf (org-get-agenda-file-buffer file))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
412 (setq pos (org-find-entry-with-id id))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
413 (when pos
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
414 (if markerp
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
415 (move-marker (make-marker) pos buf)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
416 (cons file pos))))))))
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
417
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
418 (provide 'org-id)
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
419
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
420 ;;; org-id.el ends here
19a1d523548c New file: org-id.el.
Carsten Dominik <dominik@science.uva.nl>
parents:
diff changeset
421
96052
2d6e9cbc2d7f Add arch tagline
Miles Bader <miles@gnu.org>
parents: 96045
diff changeset
422 ;; arch-tag: e5abaca4-e16f-4b25-832a-540cfb63a712