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
;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\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311\312\313\302&\210\314\315\316\317\320DD\321\313\306\322\323&\210\314\324\316\317\325DD\326\313\306\322\327\330\331\332\333& \210\314\334\316\317\335DD\336\313\306\330\337\332\340\322\341& \210\314\342\316\317\343DD\344\313\306\322\345&\210\314\346\316\317\347DD\350\313\306\322\351&\210\314\352\316\317\353DD\354\313\306\322\355&\210\314\356\316\317\357DD\360\313\306\322\327&\210\314\361\316\317\362DD\363\313\306\322\327&\207" [require cl-lib org org-id vc-git custom-declare-group org-attach nil "Options concerning entry attachments in Org mode." :tag "Org Attach" :group custom-declare-variable org-attach-directory funcall function #[0 "\300\207" [#1="data/"] 1 #1#] "The directory where attachments are stored.\nIf this is a relative path, it will be interpreted relative to the directory\nwhere the Org file lives." :type directory org-attach-commit #[0 "\300\207" [t] 1] "If non-nil commit attachments with git.\nThis is only done if the Org file is in a git repository." boolean :version "26.1" :package-version (Org . "9.0") org-attach-git-annex-cutoff #[0 "\300\207" [32768] 1] "If non-nil, files larger than this will be annexed instead of stored." "24.4" (Org . "8.0") (choice (const :tag "None" nil) (integer :tag "Bytes")) org-attach-auto-tag #[0 "\300\207" [#2="ATTACH"] 1 #2#] "Tag that will be triggered automatically when an entry has an attachment." (choice (const :tag "None" nil) (string :tag "Tag")) org-attach-file-list-property #[0 "\300\207" [#3="Attachments"] 1 #3#] "The property used to keep a list of attachment belonging to this entry.\nThis is not really needed, so you may set this to nil if you don't want it.\nAlso, for entries where children inherit the directory, the list of\nattachments is not kept in this property." (choice (const :tag "None" nil) (string :tag "Tag")) org-attach-method #[0 "\300\207" [cp] 1] "The preferred method to attach a file.\nAllowed values are:\n\nmv    rename the file to move it into the attachment directory\ncp    copy the file\nln    create a hard link.  Note that this is not supported\n      on all systems, and then the result is not defined.\nlns   create a symbol link.  Note that this is not supported\n      on all systems, and then the result is not defined." (choice (const :tag "Copy" cp) (const :tag "Move/Rename" mv) (const :tag "Hard Link" ln) (const :tag "Symbol Link" lns)) org-attach-expert #[0 "\300\207" [nil] 1] "Non-nil means do not show the splash buffer with the attach dispatcher." org-attach-allow-inheritance #[0 "\300\207" [t] 1] "Non-nil means allow attachment directories be inherited."] 12)
#@73 Indicates if the last access to the attachment directory was inherited.
(defvar org-attach-inherited nil (#$ . 3092))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313&    \210\300\314\302\303\315DD\316\306\307\310\317\320\321\312\322& \210\300\323\302\303\324DD\325\306\307\320\326\310\317\312\327& \207" [custom-declare-variable org-attach-store-link-p funcall function #[0 "\300\207" [nil] 1] "Non-nil means store a link to a file when attaching it." :group org-attach :version "24.1" :type (choice (const :tag "Don't store link" nil) (const :tag "Link to origin location" t) (const :tag "Link to the attach-dir location" attached)) org-attach-archive-delete #[0 "\300\207" [nil] 1] "Non-nil means attachments are deleted upon archiving a subtree.\nWhen set to `query', ask the user instead." "26.1" :package-version (Org . "8.3") (choice (const :tag "Never delete attachments" nil) (const :tag "Always delete attachments" t) (const :tag "Query the user" query)) org-attach-annex-auto-get #[0 "\300\207" [ask] 1] "Confirmation preference for automatically getting annex files.\nIf \\='ask, prompt using `y-or-n-p'.  If t, always get.  If nil, never get." (Org . "9.0") (choice (const :tag "confirm with `y-or-n-p'" ask) (const :tag "always get from annex if necessary" t) (const :tag "never get from annex" nil))] 12)
#@116 The dispatcher for attachment commands.
Shows a list of commands and prompts for another key to execute a command.
(defalias 'org-attach #[0 "\306\211\307=\203\310`\311\"\206\310`\312\"\262\211\204\313\314!\210\212\211\203*\315!q\210\211b\210\316\317!\210\212\320 \321\322\323\324\325!\326\"\327$\216    \204p\nr\330\331!q\210p\332 \210\306\211\317\211\317@A\333 \210\334\335!\210+\211B\336\337!\210\340!\210)\266\341\342\331!!\210\343\344!\210\345 \262\346\331!\203\210\347\331!\210)\210)\350>\203\227\351\352!\202\211\353>\203\247\354C\351\352!)\202\211\355>\203\267\356C\351\352!)\202\211\357>\203\307\360C\351\352!)\202\211\361>\203\327\362C\351\352!)\202\211\363>\203\347\364C\351\365!)\202\211\366>\203\363\351\367!\202\211\370>\203\377\351\371!\202\211\372>\203 \351\373!\202\211\374=\203\351\375!\202\211\376>\203#\351\377!\202\211\201D>\2033\351\201E!\202\211\201F>\203C\351\201G!\202\211\201H=\203S\351\201I!\202\211\201J=\203c\343\201K!\202\211\201L>\203s\351\201M!\202\211\201N>\203\203\351\201O!\202\211\313\201P\")\207" [major-mode org-attach-expert default-directory buffer-read-only buffer-file-name buffer-undo-list nil org-agenda-mode get-text-property org-hd-marker org-marker error "No task in current line" marker-buffer org-back-to-heading t current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 get-buffer-create "*Org Attach*" kill-all-local-variables erase-buffer run-hooks temp-buffer-setup-hook princ "Select an Attachment Command:\n\na       Select a file and attach it to the task, using `org-attach-method'.\nc/m/l/y Attach a file using copy/move/link/symbolic-link method.\nu       Attach a file from URL (downloading it).\nn       Create a new attachment, as an Emacs buffer.\nz       Synchronize the current task with its attachment\n        directory, in case you added attachments yourself.\n\no       Open current task's attachments.\nO       Like \"o\", but force opening in Emacs.\nf       Open current task's attachment directory.\nF       Like \"f\", but force using dired in Emacs.\n\nd       Delete one attachment, you will be prompted for a file name.\nD       Delete all of a task's attachments.  A safer way is\n        to open the directory in dired and delete from there.\n\ns       Set a specific attachment directory for this entry or reset to default.\ni       Make children of the current entry inherit its attachment directory." internal-temp-output-buffer-show org-fit-window-to-buffer get-buffer-window message "Select command: [acmlzoOfFdD]" read-char-exclusive get-buffer kill-buffer (97 1) call-interactively org-attach-attach (99 3) cp (109 13) mv (108 12) ln (121 25) lns (117 21) url org-attach-url (110 14) org-attach-new (122 26) org-attach-sync (111 15) org-attach-open 79 org-attach-open-in-emacs (102 6) org-attach-reveal inhibit-modification-hooks inhibit-read-only standard-output org-attach-method (70) org-attach-reveal-in-emacs (100 4) org-attach-delete-one 68 org-attach-delete-all 113 "Abort" (115 19) org-attach-set-directory (105 9) org-attach-set-inherit "No such attachment command %c"] 10 (#$ . 4430) nil])
#@475 Return the directory associated with the current entry.
This first checks for a local property ATTACH_DIR, and then for an inherited
property ATTACH_DIR_INHERIT.  If neither exists, the default mechanism
using the entry ID will be invoked to access the unique directory for the
current entry.
If the directory does not exist and CREATE-IF-NOT-EXISTS-P is non-nil,
the directory and (if necessary) the corresponding ID will be created.
 
(fn &optional CREATE-IF-NOT-EXISTS-P)
(defalias 'org-attach-dir #[256 "\304\211\305\304\306\"\305\304\307\"\211\262\203\310!\210\202u    \203I\305\304\306\311#\203I\212\214~\210\312\n!\2034\nb\210\2028\313\311!\210\304\314!+\262\310!\210\311\202u\310\304!\210\315`\"\262\211\204[\203u\211\204c\316\317!\210\320\321\322\323\324O\324\304O#\320 !\"\262\205\217\203\210\325!\204\210\326\311\"\210\327!\205\217\207" [org-attach-inherited org-attach-allow-inheritance org-entry-property-inherited-from org-attach-directory nil org-entry-get "ATTACH_DIR_INHERIT" "ATTACH_DIR" org-attach-check-absolute-path t marker-position org-back-to-heading org-attach-dir org-id-get error "ID retrieval/creation failed" expand-file-name format "%s/%s" 0 2 file-directory-p make-directory file-exists-p] 10 (#$ . 7665)])
#@331 Check if we have enough information to root the attachment directory.
When DIR is given, check also if it is already absolute.  Otherwise,
assume that it will be relative, and check if `org-attach-directory' is
absolute, or if at least the current buffer has a file name.
Throw an error if we cannot root the directory.
 
(fn DIR)
(defalias 'org-attach-check-absolute-path #[257 "\211\203\n\301!\206\301!\206\302\303 !\206\304\305!\207" [org-attach-directory file-name-absolute-p buffer-file-name buffer-base-buffer error "Need absolute `org-attach-directory' to attach in buffers without filename"] 3 (#$ . 8941)])
#@253 Set the ATTACH_DIR node property and ask to move files there.
The property defines the directory that is used for attachments
of the entry.  When called with `\[universal-argument]', reset the directory to
the default ID based one.
 
(fn &optional ARG)
(defalias 'org-attach-set-directory #[256 "\301 \203\302\303\304\"\210\202!\305\306\307\303\304\205\310#\"\311\303\304#\266\301\310!\230\206,??\205J\312\313!\203>\314\310\303\310%\210\312\315P!\205J\316\310\"\207" [org-attach-allow-inheritance org-attach-dir org-entry-delete nil "ATTACH_DIR" read-directory-name "Attachment directory: " org-entry-get t org-entry-put yes-or-no-p "Copy over attachments from old directory? " copy-directory "Delete " delete-directory] 9 (#$ . 9572) "P"])
#@252 Set the ATTACH_DIR_INHERIT property of the current entry.
The property defines the directory that is used for attachments
of the entry and any children that do not explicitly define (by setting
the ATTACH_DIR property) their own attachment directory.
(defalias 'org-attach-set-inherit #[0 "\300\301\302\303#\210\304\305!\207" [org-entry-put nil "ATTACH_DIR_INHERIT" "t" message "Children will inherit attachment directory"] 4 (#$ . 10339) nil])
#@42 Return non-nil if git annex can be used.
(defalias 'org-attach-use-annex #[0 "\302\303!!    \205\304\303\305\"!\206\304\303\306\"!\207" [org-attach-directory org-attach-git-annex-cutoff vc-git-root expand-file-name file-exists-p "annex" ".git/annex"] 5 (#$ . 10790)])
#@148 Call git annex get PATH (via shell) if using git annex.
Signals an error if the file content is not available and it was not retrieved.
 
(fn PATH)
(defalias 'org-attach-annex-get-maybe #[257 "\303!\304!\305 \205G\306\307\310\311!\"!\312\230?\205G\n\313=\203)\314\307\315\"!\202*\n\211\203A\316\317\"\210\320\321\322\211\211\323\324&\202E\325\326\"\262)\207" [org-attach-directory default-directory org-attach-annex-auto-get expand-file-name file-relative-name org-attach-use-annex shell-command-to-string format "git annex find --format=found --in=here %s" shell-quote-argument "found" ask y-or-n-p "Run git annex get %s? " message "Running git annex get \"%s\"." call-process "git" nil "annex" "get" error "File %s stored in git annex but it is not available, and was not retrieved"] 11 (#$ . 11069)])
#@145 Commit changes to git if `org-attach-directory' is properly initialized.
This checks for the existence of a ".git" directory in that directory.
(defalias 'org-attach-commit #[0 "\302!\303!\304 \305\205\233\306\307!\205\233\310\311!r\211q\210\312\305\313\314\315!\316\"\317$\216\320!\210\321\322\323!\324\325#\211\203j\211@\203T\326\327!8    Y\203T\330\307\331\211\211\332\333&\210\202_\330\307\331\211\211\333&\210T\262A\266\202\2021\210\321\322\334!\324\325#\211\203\216\211@\330\307\331\211\211\335&\210T\262A\266\202\202r\210\305V\205\230\336\337!*\262\207" [org-attach-directory org-attach-git-annex-cutoff expand-file-name vc-git-root org-attach-use-annex 0 executable-find "git" generate-new-buffer " *temp*" make-byte-code "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 cd split-string shell-command-to-string "git ls-files -zmo --exclude-standard" "" t 7 file-attributes call-process nil "annex" "add" "git ls-files -z --deleted" "rm" shell-command "git commit -m 'Synchronized attachments'"] 15 (#$ . 11896)])
#@65 Turn the autotag on or (if OFF is set) off.
 
(fn &optional OFF)
(defalias 'org-attach-tag #[256 "\205\212\301\302!\210\303\203\304\202\305\")\207" [org-attach-auto-tag org-back-to-heading t org-toggle-tag off on] 4 (#$ . 12980)])
#@23 Turn the autotag off.
(defalias 'org-attach-untag #[0 "\300\301!\207" [org-attach-tag off] 2 (#$ . 13225)])
#@123 Add a link to `org-stored-link' when attaching a file.
Only do this when `org-attach-store-link-p' is non-nil.
 
(fn FILE)
(defalias 'org-attach-store-link #[257 "\301!\302!DB\211\207" [org-stored-links org-attach-expand-link file-name-nondirectory] 4 (#$ . 13340)])
#@12 
 
(fn URL)
(defalias 'org-attach-url #[257 "\300!\207" [org-attach-attach] 3 (#$ . 13616) "MURL of the file to attach: \n"])
#@254 Move/copy/link FILE into the attachment directory of the current task.
If VISIT-DIR is non-nil, visit the directory with dired.
METHOD may be `cp', `mv', `ln', `lns' or `url' default taken from
`org-attach-method'.
 
(fn FILE &optional VISIT-DIR METHOD)
(defalias 'org-attach-attach #[769 "\211\206\262\305!    \203\n\204\306`    #\210\307\310!\311\"\312\267\202O\313\"\210\202O\314\"\210\202O\315\"\210\202O\316\"\210\202O\317\"\210 \203V\303 \210\320 \210\f\321\267\202k\322!\210\202k\322!\210\203u\323!\202y\324\325\"\266\202\207" [org-attach-method org-attach-file-list-property org-attach-inherited org-attach-commit org-attach-store-link-p file-name-nondirectory org-entry-add-to-multivalued-property org-attach-dir t expand-file-name #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (mv 37 cp 46 ln 55 lns 64 url 73)) rename-file copy-file add-name-to-file make-symbolic-link url-copy-file org-attach-tag #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (attached 95 t 102)) org-attach-store-link dired message "File %S is now a task attachment."] 9 (#$ . 13749) (byte-code "\302\303\304\305!\210\306 \206\f\"    \307E\207" [default-directory current-prefix-arg read-file-name "File to keep as an attachment:" require dired-aux dired-dwim-target-directory nil] 4)])
#@30 Attach a file by copying it.
(defalias 'org-attach-attach-cp #[0 "\301\302\303!)\207" [org-attach-method cp call-interactively org-attach-attach] 2 (#$ . 15136) nil])
#@40 Attach a file by moving (renaming) it.
(defalias 'org-attach-attach-mv #[0 "\301\302\303!)\207" [org-attach-method mv call-interactively org-attach-attach] 2 (#$ . 15310) nil])
#@181 Attach a file by creating a hard link to it.
Beware that this does not work on systems that do not support hard links.
On some systems, this apparently does copy the file instead.
(defalias 'org-attach-attach-ln #[0 "\301\302\303!)\207" [org-attach-method ln call-interactively org-attach-attach] 2 (#$ . 15495) nil])
#@190 Attach a file by creating a symbolic link to it.
 
Beware that this does not work on systems that do not support symbolic links.
On some systems, this apparently does copy the file instead.
(defalias 'org-attach-attach-lns #[0 "\301\302\303!)\207" [org-attach-method lns call-interactively org-attach-attach] 2 (#$ . 15821) nil])
#@109 Create a new attachment FILE for the current task.
The attachment is created as an Emacs buffer.
 
(fn FILE)
(defalias 'org-attach-new #[257 "\203    \204\302`#\210\303\304!\305 \210\306\307\"!\210\310\311\"\207" [org-attach-file-list-property org-attach-inherited org-entry-add-to-multivalued-property org-attach-dir t org-attach-tag find-file expand-file-name message "New attachment %s"] 6 (#$ . 16158) "sCreate attachment named: "])
#@50 Delete a single attachment.
 
(fn &optional FILE)
(defalias 'org-attach-delete-one #[256 "\301\302!\303!\206\304\305\306\307\"\"\310\"\262\311!\204\"\312\313\"\210\314!\210\205,\300 \207" [org-attach-commit org-attach-dir t org-attach-file-list completing-read "Delete attachment: " mapcar #[257 "\300!C\207" [file-name-nondirectory] 3 "\n\n(fn F)"] expand-file-name file-exists-p error "No such attachment: %s" delete-file] 8 (#$ . 16607) nil])
#@193 Delete all attachments from the current task.
This actually deletes the entire attachment directory.
A safer way is to open the directory in dired and delete from there.
 
(fn &optional FORCE)
(defalias 'org-attach-delete-all #[256 "\203     \204 \303`\"\210\304 \211\2051\204\305\306!\2051\307\310\311\"!\210\312\313!\210\n\203/\302 \210\314 \207" [org-attach-file-list-property org-attach-inherited org-attach-commit org-entry-delete org-attach-dir y-or-n-p "Are you sure you want to remove all attachments of this entry? " shell-command format "rm -fr %s" message "Attachment directory removed" org-attach-untag] 6 (#$ . 17074) "P"])
#@110 Synchronize the current tasks with its attachments.
This can be used after files have been added externally.
(defalias 'org-attach-sync #[0 "\203\300 \210    \203\n\204\303`    \"\210\304 \211\205E\305!\306?!\210    \205C\211\211\205A\211@\307\310\"\204:\311`    #\210A\266\202\202'\262\262\207" [org-attach-commit org-attach-file-list-property org-attach-inherited org-entry-delete org-attach-dir org-attach-file-list org-attach-tag string-match "^\\.\\.?\\'" org-entry-add-to-multivalued-property] 8 (#$ . 17725) nil])
#@97 Return a list of files in the attachment directory.
This ignores files ending in "~".
 
(fn DIR)
(defalias 'org-attach-file-list #[257 "\300\301\302\303\304\301\305#\"\"\207" [delq nil mapcar #[257 "\300\301\"?\205    \211\207" [string-match "^\\.\\.?\\'"] 4 "\n\n(fn X)"] directory-files "[^~]\\'"] 9 (#$ . 18259)])
#@146 Show the attachment directory of the current task.
This will attempt to use an external program to show the directory.
 
(fn &optional IF-EXISTS)
(defalias 'org-attach-reveal #[256 "\300?!\211\205 \301!\207" [org-attach-dir org-open-file] 4 (#$ . 18582) "P"])
#@61 Show the attachment directory of the current task in dired.
(defalias 'org-attach-reveal-in-emacs #[0 "\300\301!\302!\207" [org-attach-dir t dired] 3 (#$ . 18850) nil])
#@317 Open an attachment of the current task.
If there are more than one attachment, you will be prompted for the file name.
This command will open the file using the settings in `org-file-apps'
and in the system-specific variants of this variable.
If IN-EMACS is non-nil, force opening in Emacs.
 
(fn &optional IN-EMACS)
(defalias 'org-attach-open #[256 "\300\301!\302!\211G\303U\203\211@\202\304\305\306\307\"\310\301$\311\"\312!\210\313\"\207" [org-attach-dir t org-attach-file-list 1 completing-read "Open attachment: " mapcar list nil expand-file-name org-attach-annex-get-maybe org-open-file] 8 (#$ . 19027) "P"])
#@65 Open attachment, force opening in Emacs.
See `org-attach-open'.
(defalias 'org-attach-open-in-emacs #[0 "\300\301!\207" [org-attach-open in-emacs] 2 (#$ . 19659) nil])
#@137 Return the full path to the current entry's attachment file FILE.
Basically, this adds the path to the attachment directory.
 
(fn FILE)
(defalias 'org-attach-expand #[257 "\300\301 \"\207" [expand-file-name org-attach-dir] 4 (#$ . 19834)])
#@166 Return a file link pointing to the current entry's attachment file FILE.
Basically, this adds the path to the attachment directory, and a "file:"
prefix.
 
(fn FILE)
(defalias 'org-attach-expand-link #[257 "\300\301!P\207" ["file:" org-attach-expand] 4 (#$ . 20082)])
#@160 Maybe delete subtree attachments when archiving.
This function is called by `org-archive-hook'.  The option
`org-attach-archive-delete' controls its behavior.
(defalias 'org-attach-archive-delete-maybe #[0 "\301=\203\f\302\303!\202 \205\304\305!\207" [org-attach-archive-delete query yes-or-no-p "Delete all attachments? " org-attach-delete-all t] 2 (#$ . 20357)])
(byte-code "\300\301\302\"\210\303\304!\207" [add-hook org-archive-hook org-attach-archive-delete-maybe provide org-attach] 3)