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

Chizi123
2018-11-18 76bbd07de7add0f9d13c6914f158d19630fe2f62
commit | author | age
76bbd0 1 ;ELC
C 2 ;;; Compiled
3 ;;; in Emacs version 26.1
4 ;;; with all optimizations.
5
6 ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
7
8 ;;; This file does not contain utf-8 non-ASCII characters,
9 ;;; and so can be loaded in Emacs versions earlier than 23.
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14
15 (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)
16 #@40 List of files with IDs in those files.
17 (defvar org-id-locations nil (#$ . 5008))
18 #@33 List of files that contain IDs.
19 (defvar org-id-files nil (#$ . 5095))
20 (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)
21 #@183 Create an ID for the current entry and return it.
22 If the entry already has an ID, just return it.
23 With optional argument FORCE, force the creation of a new ID.
24
25 (fn &optional FORCE)
26 (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"])
27 #@80 Copy the ID of the entry at point to the kill ring.
28 Create an ID if necessary.
29 (defalias 'org-id-copy #[0 "\300\301\302\303\"!\207" [org-kill-new org-id-get nil create] 4 (#$ . 6580) nil])
30 #@363 Get the ID property of the entry at point-or-marker POM.
31 If POM is nil, refer to the entry at point.
32 If the entry does not have an ID, the function returns nil.
33 However, when CREATE is non nil, create an ID if none is present already.
34 PREFIX will be passed through to `org-id-new'.
35 In any case, the ID of the entry is returned.
36
37 (fn &optional POM CREATE PREFIX)
38 (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)])
39 #@307 Use `outline-path-completion' to retrieve the ID of an entry.
40 TARGETS may be a setting for `org-refile-targets' to define
41 eligible headlines.  When omitted, all headlines in the current
42 file are eligible.  This function returns the ID of the entry.
43 If necessary, the ID is created.
44
45 (fn &optional TARGETS)
46 (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)])
47 #@205 Use an outline-cycling interface to retrieve the ID of an entry.
48 This only finds entries in the current buffer, using `org-get-location'.
49 It returns the ID of the entry.  If necessary, the ID is created.
50 (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)])
51 #@110 Switch to the buffer containing the entry with id ID.
52 Move the cursor to that entry in that buffer.
53
54 (fn ID)
55 (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: "])
56 #@244 Return the location of the entry with the id ID.
57 The return value is a cons cell (file-name . position), or nil
58 if there is no entry with that ID.
59 With optional argument MARKERP, return the position as a new marker.
60
61 (fn ID &optional MARKERP)
62 (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)])
63 #@425 Create a new globally unique ID.
64
65 An ID consists of two parts separated by a colon:
66 - a prefix
67 - a unique part that will be created according to `org-id-method'.
68
69 PREFIX can specify the prefix, the default is given by the variable
70 `org-id-prefix'.  However, if PREFIX is the symbol `none', don't use any
71 prefix even if `org-id-prefix' specifies one.
72
73 So a typical ID could look like "Org:4nd91V40HI".
74
75 (fn &optional PREFIX)
76 (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)])
77 #@45 Return string with random (version 4) UUID.
78 (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)])
79 #@84 Turn an integer between 0 and 61 into a single character 0..9, A..Z, a..z.
80
81 (fn I)
82 (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)])
83 #@123 Turn a character 0..9, A..Z, a..z into a number 0..61.
84 The input I may be a character, or a single-letter string.
85
86 (fn I)
87 (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)])
88 #@90 Convert an integer to a base-36 number represented as a string.
89
90 (fn I &optional LENGTH)
91 (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)])
92 #@66 Convert a base-36 string into the corresponding integer.
93
94 (fn S)
95 (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)])
96 #@151 Encode TIME as a 10-digit string.
97 This string holds the time to micro-second accuracy, and can be decoded
98 using `org-id-decode'.
99
100 (fn &optional TIME)
101 (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)])
102 #@211 Split ID into the prefix and the time value that was used to create it.
103 The return value is (prefix . time) where PREFIX is nil or a string,
104 and time is the usual three-integer representation of time.
105
106 (fn ID)
107 (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)])
108 #@277 Scan relevant files for IDs.
109 Store the relation between files and corresponding IDs.
110 This will scan all agenda files, all associated archives, and all
111 files currently mentioned in `org-id-locations'.
112 When FILES is given, scan these files instead.
113
114 (fn &optional FILES SILENT)
115 (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])
116 #@53 Save `org-id-locations' in `org-id-locations-file'.
117 (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)])
118 #@45 Read the data from `org-id-locations-file'.
119 (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)])
120 #@78 Add the ID with location FILE to the database of ID locations.
121
122 (fn ID FILE)
123 (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)])
124 (byte-code "\204    \301\302\303\"\210\301\207" [noninteractive add-hook kill-emacs-hook org-id-locations-save] 3)
125 #@84 Turn an org-id hash into an alist, so that it can be written to a file.
126
127 (fn HASH)
128 (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)])
129 #@60 Turn an org-id location list into a hash table.
130
131 (fn LIST)
132 (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)])
133 #@93 Update any IDs in TXT and assign BUFFER-OR-FILE to them.
134
135 (fn TXT &optional BUFFER-OR-FILE)
136 (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)])
137 #@74 Query the id database for the file in which this ID is located.
138
139 (fn ID)
140 (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)])
141 #@289 Return the position of the entry ID in FILE.
142 If that files does not exist, or if it does not contain this ID,
143 return nil.
144 The position is returned as a cons cell (file-name . position).  With
145 optional argument MARKERP, return the position as a new marker.
146
147 (fn ID FILE &optional MARKERP)
148 (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)])
149 #@50 Store a link to the current entry, using its ID.
150 (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])
151 #@38 Go to the entry with id ID.
152
153 (fn ID)
154 (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)])
155 (byte-code "\300\301\302\303#\210\304\305!\207" [org-link-set-parameters "id" :follow org-id-open provide org-id] 4)