mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-18 76bbd07de7add0f9d13c6914f158d19630fe2f62
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
;ELC
;;; Compiled
;;; in Emacs version 26.1
;;; with all optimizations.
 
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
 
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 
(byte-code "\300\301!\210\302\303\304\305\306\307\310\301&\210\311\312\313\314\315DD\316\310\317\310\303\320\321\322\323& \210\311\324\313\314\325DD\326\310\303\322\327&\210\311\330\313\314\331DD\332\310\303\322\333&\210\311\334\313\314\335DD\336\310\303\322\337&\210\311\340\313\314\341DD\342\310\303\322\343&\210\311\344\313\314\345DD\346\310\303\322\343&\210\311\347\313\314\350DD\351\310\303\322\352&\207" [require org custom-declare-group org-id nil "Options concerning global entry identifiers in Org mode." :tag "Org ID" :group custom-declare-variable org-id-link-to-org-use-id funcall function #[0 "\300\207" [nil] 1] "Non-nil means storing a link to an Org file will use entry IDs.\n\\<org-mode-map>\nThe variable can have the following values:\n\nt     Create an ID if needed to make a link to the current entry.\n\ncreate-if-interactive\n      If `org-store-link' is called directly (interactively, as a user\n      command), do create an ID to support the link.  But when doing the\n      job for capture, only use the ID if it already exists.  The\n      purpose of this setting is to avoid proliferation of unwanted\n      IDs, just because you happen to be in an Org file when you\n      call `org-capture' that automatically and preemptively creates a\n      link.  If you do want to get an ID link in a capture template to\n      an entry not having an ID, create it first by explicitly creating\n      a link to it, using `\\[org-store-link]' first.\n\ncreate-if-interactive-and-no-custom-id\n      Like create-if-interactive, but do not create an ID if there is\n      a CUSTOM_ID property defined in the entry.\n\nuse-existing\n      Use existing ID, do not create one.\n\nnil   Never use an ID to make a link, instead link using a text search for\n      the headline text." org-link-store :version "24.3" :type (choice (const :tag "Create ID to make link" t) (const :tag "Create if storing link interactively" create-if-interactive) (const :tag "Create if storing link interactively and no CUSTOM_ID is present" create-if-interactive-and-no-custom-id) (const :tag "Only use existing" use-existing) (const :tag "Do not use ID to create link" nil)) org-id-uuid-program #[0 "\300\207" [#1="uuidgen"] 1 #1#] "The uuidgen program." string org-id-method #[0 "\300\207" [uuid] 1] "The method that should be used to create new IDs.\n\nAn ID will consist of the optional prefix specified in `org-id-prefix',\nand a unique part created by the method this variable specifies.\n\nAllowed values are:\n\norg        Org's own internal method, using an encoding of the current time to\n           microsecond accuracy, and optionally the current domain of the\n           computer.  See the variable `org-id-include-domain'.\n\nuuid       Create random (version 4) UUIDs.  If the program defined in\n           `org-id-uuid-program' is available it is used to create the ID.\n           Otherwise an internal functions is used." (choice (const :tag "Org's internal method" org) (const :tag "external: uuidgen" uuid)) org-id-prefix #[0 "\300\207" [nil] 1] "The prefix for IDs.\n\nThis may be a string, or it can be nil to indicate that no prefix is required.\nWhen a string, the string should have no space characters as IDs are expected\nto have no space characters in them." (choice (const :tag "No prefix") (string :tag "Prefix")) org-id-include-domain #[0 "\300\207" [nil] 1] "Non-nil means add the domain name to new IDs.\nThis ensures global uniqueness of IDs, and is also suggested by\nRFC 2445 in combination with RFC 822.  This is only relevant if\n`org-id-method' is `org'.  When uuidgen is used, the domain will never\nbe added.\nThe default is to not use this because we have no really good way to get\nthe true domain, and Org entries will normally not be shared with enough\npeople to make this necessary." boolean org-id-track-globally #[0 "\300\207" [t] 1] "Non-nil means track IDs through files, so that links work globally.\nThis work by maintaining a hash table for IDs and writing this table\nto disk when exiting Emacs.  Because of this, it works best if you use\na single Emacs process, not many.\n\nWhen nil, IDs are not tracked.  Links to IDs will still work within\na buffer, but not if the entry is located in another file.\nIDs can still be used if the entry with the id is in the same file as\nthe link." org-id-locations-file #[0 "\301\302P!\207" [user-emacs-directory convert-standard-filename ".org-id-locations"] 3] "The file for remembering in which file an ID was defined.\nThis variable is only relevant when `org-id-track-globally' is set." file] 12)
#@40 List of files with IDs in those files.
(defvar org-id-locations nil (#$ . 5008))
#@33 List of files that contain IDs.
(defvar org-id-files nil (#$ . 5095))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\310\315&\207" [custom-declare-variable org-id-extra-files funcall function #[0 "\300\207" [org-agenda-text-search-extra-files] 1] "Files to be searched for IDs, besides the agenda files.\nWhen Org reparses files to remake the list of files and IDs it is tracking,\nit will normally scan the agenda files, the archives related to agenda files,\nany files that are listed as ID containing in the current register, and\nany Org file currently visited by Emacs.\nYou can list additional files here.\nThis variable is only relevant when `org-id-track-globally' is set." :group org-id :type (choice (symbol :tag "Variable") (repeat :tag "List of files" (file))) org-id-search-archives #[0 "\300\207" [t] 1] "Non-nil means search also the archive files of agenda files for entries.\nThis is a possibility to reduce overhead, but it means that entries moved\nto the archives can no longer be found by ID.\nThis variable is only relevant when `org-id-track-globally' is set." boolean] 8)
#@183 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.
 
(fn &optional FORCE)
(defalias 'org-id-get-create #[256 "\211\203\n\300`\301\302#\210\303`\304\"\207" [org-entry-put "ID" nil org-id-get create] 5 (#$ . 6247) "P"])
#@80 Copy the ID of the entry at point to the kill ring.
Create an ID if necessary.
(defalias 'org-id-copy #[0 "\300\301\302\303\"!\207" [org-kill-new org-id-get nil create] 4 (#$ . 6580) nil])
#@363 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.
 
(fn &optional POM CREATE PREFIX)
(defalias 'org-id-get #[768 "\212\300!\203 \301!q\210\212\214~\210\211\206`b\210\302\303\304\"\211\2030\211;\2030\305\306\"\2030\211\202H\205H\307!\262\310\304#\210\311\312\313 !\"\210\211\262+\207" [markerp marker-buffer org-entry-get nil "ID" string-match "\\S-" org-id-new org-entry-put org-id-add-location buffer-file-name buffer-base-buffer] 9 (#$ . 6776)])
#@307 Use `outline-path-completion' to retrieve the ID of an entry.
TARGETS may be a setting for `org-refile-targets' to define
eligible headlines.  When omitted, all headlines in the current
file are eligible.  This function returns the ID of the entry.
If necessary, the ID is created.
 
(fn &optional TARGETS)
(defalias 'org-id-get-with-outline-path-completion #[256 "\211\206\303\211@@\203\304\202\305\306\307\310!\211\205&\311 \3128\313A@!\223\314\315\"\306\211\223\210+\207" [org-refile-targets org-refile-use-outline-path org-refile-target-verify-function ((nil :maxlevel . 10)) file t nil org-refile-get-location "Entry" make-marker 3 get-file-buffer org-id-get create] 8 (#$ . 7527)])
#@205 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.
(defalias 'org-id-get-with-outline-drilling #[0 "\301p\"\211\205\302 @\303\223\304\305\"\303\211\223\210\207" [org-goto-help org-get-location make-marker nil org-id-get create] 6 (#$ . 8235)])
#@110 Switch to the buffer containing the entry with id ID.
Move the cursor to that entry in that buffer.
 
(fn ID)
(defalias 'org-id-goto #[257 "\300\301\"\211\204 \302\303\"\210\304\305!!\210\211b\210\211\306\211\223\210\307 \207" [org-id-find marker error "Cannot find entry with ID \"%s\"" pop-to-buffer-same-window marker-buffer nil org-show-context] 5 (#$ . 8645) "sID: "])
#@244 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.
 
(fn ID &optional MARKERP)
(defalias 'org-id-find #[513 "9\203 \301!\262\202\247\203\302!\262\303!\304\211\203*\305#\262\211\204D\306\304\307\"\210\303!\262\203D\305#\262)\207" [org-agenda-new-buffers symbol-name number-to-string org-id-find-id-file nil org-id-find-id-in-file org-id-update-id-locations t] 9 (#$ . 9029)])
#@425 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".
 
(fn &optional PREFIX)
(defalias 'org-id-new #[256 "\211\304=\203\n\305\202\211\206\306P\307\306\232\203\305\262    \310>\203H\311\n!\307\312\203.\313\202/\314\305\312\315\305##\266\202\262\316!\204j\317 \262\202j    \320=\203f\321\322 ! \205^\323\324!\210\325\326 PP\266\203\202j\327\330!\210P\207" [org-id-prefix org-id-method org-id-uuid-program org-id-include-domain none "" ":" nil (uuidgen uuid) shell-command-to-string replace-regexp-in-string "\\`\\([     ]*\n\\)+" "\\`[     \n ]+" "[     \n ]+\\'" org-uuidgen-p org-id-uuid org org-reverse-string org-id-time-to-b36 require message "@" message-make-fqdn error "Invalid `org-id-method'"] 12 (#$ . 9606)])
#@45 Return string with random (version 4) UUID.
(defalias 'org-id-uuid #[0 "\301\302\303\304 \305 \306 \307 \310 \311 &!\302\312\313\314O\314\315O\316\317O\302\320\321\322\323\n\317\324O\317\"\325\"\326\"\"\324\327O\327\330O&\207" [user-mail-address md5 format "%s%s%s%s%s%s%s" random current-time user-uid emacs-pid user-full-name recent-keys "%s-%s-4%s-%s%s-%s" 0 8 12 13 16 "%x" logior logand string-to-number 18 191 128 20 32] 14 (#$ . 10690)])
#@84 Turn an integer between 0 and 61 into a single character 0..9, A..Z, a..z.
 
(fn I)
(defalias 'org-id-int-to-b36-one-digit #[257 "\211\300W\203\n\301\\\207\211\302W\203\303\304\305#\207\306\307!\207" [10 48 36 + 97 -10 error "Larger that 35"] 5 (#$ . 11152)])
#@123 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.
 
(fn I)
(defalias 'org-id-b36-to-int-one-digit #[257 "\211;\203\n\300!\262\211\301Y\203\211\302X\203\211\301Z\207\211\303Y\203,\211\304X\203,\211\303Z\305\\\207\306\307!\207" [string-to-char 48 57 97 122 10 error "Invalid b36 letter"] 3 (#$ . 11423)])
#@90 Convert an integer to a base-36 number represented as a string.
 
(fn I &optional LENGTH)
(defalias 'org-id-int-to-b36 #[513 "\300\301V\203\302\303\304\305\"!!P\262\305\245\262\202\306\206!\306]\262\211GW\2036\307GZ\310\"P\262\211\207" ["" 0 char-to-string org-id-int-to-b36-one-digit mod 36 1 make-string 48] 8 (#$ . 11804)])
#@66 Convert a base-36 string into the corresponding integer.
 
(fn S)
(defalias 'org-id-b36-to-int #[257 "\300C\301\302\303\304\305\306!\307\"\310\311%\"\210\211\242\207" [0 mapc make-byte-code 257 "\300\211\242\301_\302!\\\240\207" vconcat vector [36 org-id-b36-to-int-one-digit] 5 "\n\n(fn I)"] 9 (#$ . 12155)])
#@151 Encode TIME as a 10-digit string.
This string holds the time to micro-second accuracy, and can be decoded
using `org-id-decode'.
 
(fn &optional TIME)
(defalias 'org-id-time-to-b36 #[256 "\211\206\300 \262\301@\302\"\301A@\302\"\301\3038\206\304\302\"Q\207" [current-time org-id-int-to-b36 4 2 0] 6 (#$ . 12475)])
#@211 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.
 
(fn ID)
(defalias 'org-id-decode #[257 "\300\211\211\301\302\"\262\211G\303U\203\211@\262\211A@\262\202#\300\262\211@\262\304!\262\305\306\307O!\305\307\310O!\305\310\311O!E\262B\207" [nil org-split-string ":" 2 org-reverse-string org-id-b36-to-int 0 4 8 12] 10 (#$ . 12803)])
#@277 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.
 
(fn &optional FILES SILENT)
(defalias 'org-id-update-id-locations #[512 "\204\306\307!\207    \206\n9\205\nJ\205\310\n\235\2068\311\312\313    \"\n9\203-\nJ\202.\n\314\315\316\317\320 \"\" $\315\211\315\211\211\211\211\211C\315\321\310\n\235\203T\314\310\322\f!\"\262\n    G\262    \211A\262 \242\211\262\n\203\f\n\204y\323\324    \fGZ\n\f$\210\325    !\262\326    !\203Y\235\204YB\262\315\262r\327    !q\210\212\214~\210eb\210\330\331\315\313#\203\375\332\333!\240\210\242\235\203\355\323\334\242\314\315\316\335\336\337\340\341 !\342\"\343\344% \"\"@\206\327\345 #\210\211\321U\203\346\346 \210\347\350!\210\211T\262\202\244\242B\262\242B\262\202\244\351    !BB\262+\202Y\352\f!\210\315\316\353 \"\354 \210\355 !\211\321V\203.\323\356\"\210\2024\323\357 G\"\210 *\207" [org-id-track-globally org-id-search-archives org-id-extra-files org-id-files org-agenda-new-buffers org-id-locations error "Please turn on `org-id-track-globally' if you want to track IDs" agenda-archives append org-agenda-files t delq nil mapcar #[257 "r\211q\210\300\301!\205\f\302 )\207" [derived-mode-p org-mode buffer-file-name] 3 "\n\n(fn B)"] buffer-list 0 copy-sequence message "Finding ID locations (%d/%d files): %s" file-truename file-exists-p org-get-agenda-file-buffer re-search-forward "^[     ]*:ID:[     ]+\\(\\S-+\\)[     ]*$" match-string-no-properties 1 "Duplicate ID \"%s\", also in file %s" make-byte-code 257 "\300\242A\235\205\n\211@\207" vconcat vector [] 3 "\n\n(fn X)" buffer-file-name ding sit-for 2 abbreviate-file-name org-release-buffers car org-id-locations-save org-id-alist-to-hash "WARNING: %d duplicate IDs found, check *Messages* buffer" "%d unique files scanned for IDs"] 25 (#$ . 13306) nil])
#@53 Save `org-id-locations' in `org-id-locations-file'.
(defalias 'org-id-locations-save #[0 "\205E    \205E\305    !\203\306    !\202    \n\307\310\311!!\312\313\314\315\316!\317\"\320$\216r\211q\210\321\211\322p\"+rq\210\323\321\211\321\313%\210*\266\202\262\207" [org-id-track-globally org-id-locations org-id-locations-file print-length print-level hash-table-p org-id-hash-to-alist get-buffer-create generate-new-buffer-name " *temp file*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 nil print write-region] 10 (#$ . 15306)])
#@45 Read the data from `org-id-locations-file'.
(defalias 'org-id-locations-load #[0 "\304    \205<\305\306!r\211q\210\307\310\311\312\313!\314\"\315$\216\3161*\317\n!\210\320p!\2110\202/\210\321\322\n\"\210*\210\323\324\"\325!\211\207" [org-id-locations org-id-track-globally org-id-locations-file org-id-files nil generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 (error) insert-file-contents read message "Could not read org-id-values from %s.  Setting it to nil." mapcar car org-id-alist-to-hash] 7 (#$ . 15888)])
#@78 Add the ID with location FILE to the database of ID locations.
 
(fn ID FILE)
(defalias 'org-id-add-location #[514 "\205!\205!\211\205!    \204\302 \210\303\304!    #\210\305\306\304!\"\207" [org-id-track-globally org-id-locations org-id-locations-load puthash abbreviate-file-name add-to-list org-id-files] 6 (#$ . 16486)])
(byte-code "\204    \301\302\303\"\210\301\207" [noninteractive add-hook kill-emacs-hook org-id-locations-save] 3)
#@84 Turn an org-id hash into an alist, so that it can be written to a file.
 
(fn HASH)
(defalias 'org-id-hash-to-alist #[257 "\300C\300C\301\302\303\304\305\306\"\307\"\310\311%\"\210\242\207" [nil maphash make-byte-code 514 "\301\300\242\235\240\203\301\242\301\242AB\241\207\300D\300\242B\240\207" vconcat vector [] 5 "\n\n(fn K V)"] 11 (#$ . 16934)])
#@60 Turn an org-id location list into a hash table.
 
(fn LIST)
(defalias 'org-id-alist-to-hash #[257 "\300\301\302\303\304\305\306\307\"\"$\310C\311\312\313\314\315\316\"\317\"\320\321%\"\210\207" [make-hash-table :test equal :size apply + mapcar length nil mapc make-byte-code 257 "\301@\240\210\302\303\304\305\306\307\300\301\"\310\"\311\312%A\"\207" vconcat vector [mapc make-byte-code 257 "\302\301\242\300#\207" vconcat vector [puthash] 5 "\n\n(fn I)"] 9 "\n\n(fn X)"] 11 (#$ . 17302)])
#@93 Update any IDs in TXT and assign BUFFER-OR-FILE to them.
 
(fn TXT &optional BUFFER-OR-FILE)
(defalias 'org-id-paste-tracker #[513 "\205S\301 \302\303\304\305\306!\307\"\310$\216\206p\262\311!\203-\312!\206&\262\313!\262\205P\314!\303\315\316#\205N\303\225\262\317\320\321\"\"\210\2025\266\202)\262\207" [org-id-track-globally match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 bufferp buffer-base-buffer buffer-file-name abbreviate-file-name string-match "^[     ]*:ID:[     ]+\\([^     \n ]+\\)" org-id-add-location match-string 1] 9 (#$ . 17808)])
#@74 Query the id database for the file in which this ID is located.
 
(fn ID)
(defalias 'org-id-find-id-file #[257 "\204\301 \210\203\302!\203\303\"\206!\304\305p!\206 p!\207" [org-id-locations org-id-locations-load hash-table-p gethash buffer-file-name buffer-base-buffer] 4 (#$ . 18425)])
#@289 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.
 
(fn ID FILE &optional MARKERP)
(defalias 'org-id-find-id-in-file #[770 "\301\211\211\204 \301\202:\302!\204\301\202:r\303!\211\262q\210\304!\262\211\2059\2036\305 \223\2029B))\207" [org-agenda-new-buffers nil file-exists-p org-get-agenda-file-buffer org-find-entry-with-id make-marker] 9 (#$ . 18731)])
#@50 Store a link to the current entry, using its ID.
(defalias 'org-id-store-link #[0 "\302\303 !\205?\304\305!\205?\306\307 P\310\212\311\312!\210\313    !\203/\314\225\203)\315\314!\202,\315\316!\2060\211)\317\320\321\322\323&\210)\266\202\207" [case-fold-search org-complex-heading-regexp buffer-file-name buffer-base-buffer derived-mode-p org-mode "id:" org-id-get-create nil org-back-to-heading t looking-at 4 match-string 0 org-store-link-props :link :description :type "id"] 9 (#$ . 19319) nil])
#@38 Go to the entry with id ID.
 
(fn ID)
(defalias 'org-id-open #[257 "\301 \210\302\303\"\304\204\305\306\"\210\307\236A\310\236A\206\311\262p\312!\232\204,\211\312!!\210b\210\304\211\223\210\313 \207" [org-link-frame-setup org-mark-ring-push org-id-find marker nil error "Cannot find entry with ID \"%s\"" file ((find-file . switch-to-buffer) (find-file-other-window . switch-to-buffer-other-window) (find-file-other-frame . switch-to-buffer-other-frame)) switch-to-buffer-other-window marker-buffer org-show-context] 6 (#$ . 19832)])
(byte-code "\300\301\302\303#\210\304\305!\207" [org-link-set-parameters "id" :follow org-id-open provide org-id] 4)