MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.117.158.174
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/org/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/org/org-attach.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:51 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/org/org-attach.el
;;; in Emacs version 24.3.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\303\304\305\306\307\310\311\302&\210\312\313\314\315\311\304\316\317&\210\312\320\321\322\311\304\316\323&\210\312\324\325\326\311\304\316\327&\210\312\330\331\332\311\304\316\333&\210\312\334\305\335\311\304\316\336&\210\312\337\340\341\311\304\316\336&\207" [require org-id org custom-declare-group org-attach nil "Options concerning entry attachments in Org-mode." :tag "Org Attach" :group custom-declare-variable org-attach-directory "data/" "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-auto-tag "ATTACH" "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 "Attachments" "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 'cp "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 "Non-nil means do not show the splash buffer with the attach dispatcher." boolean org-attach-allow-inheritance t "Non-nil means allow attachment directories be inherited."] 8)
#@73 Indicates if the last access to the attachment directory was inherited.
(defvar org-attach-inherited nil (#$ . 2460))
#@57 Non-nil means store a link to a file when attaching it.
(custom-declare-variable 'org-attach-store-link-p nil '(#$ . 2584) :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)))
#@116 The dispatcher for attachment commands.
Shows a list of commands and prompts for another key to execute a command.
(defalias 'org-attach #[nil "\306\211\n\307=\203\310`\311\"\206\310`\312\"\211\204\313\314!\210\212\203+\315!q\210b\210\316\317!\210\212\320 \321\216\f\204o
@r\322\323!q\210p\324 \210@\306\211AB\317\211C\317DE\325 \210\326\327!\210+\211FG\330\331!\210\332F!\210+\333\334\323!!\210\335\336!\210\337 \340\323!\203\206\341\323!\210+	\342>\203\223\343\344!\202c	\345>\203\243\346H\343\344!)\202c	\347>\203\263\350H\343\344!)\202c	\351>\203\303\352H\343\344!)\202c	\353>\203\323\354H\343\344!)\202c	\355>\203\337\343\356!\202c	\357>\203\353\343\360!\202c	\361>\203\367\343\362!\202c	\363=\203\343\364!\202c	\365>\203\343\366!\202c	\367>\203\343\370!\202c	\371>\203'\343\372!\202c	\373=\2033\343\374!\202c	\375=\203?\335\376!\202c	\377>\203M\343\201I!\202c	\201J>\203]\343\201K!\202c\313\201L	\"+\207" [marker c major-mode #1=#:wconfig org-attach-expert default-directory 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 ((set-window-configuration #1#)) 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.\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.\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 (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 (70) org-attach-reveal-in-emacs (100 4) org-attach-delete-one 68 org-attach-delete-all 113 "Abort" (115 19) #2=#:old-dir buffer-read-only buffer-file-name buffer-undo-list inhibit-modification-hooks inhibit-read-only #3=#:buf standard-output org-attach-method org-attach-set-directory (105 9) org-attach-set-inherit "No such attachment command %c"] 4 (#$ . 2899) nil])
#@436 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.
(defalias 'org-attach-dir #[(&optional create-if-not-exists-p) "\306\211\211\307\306\310\"\307\306\311\"\211\203\312\n!\210\202n\f\203A\307\306\310\313#\211\203A\212\214~\210
b\210\306\314!+\312\n!\210\313\202n\312\306!\210\315`\"\211\204T\203n	\204\\\316\317!\210\320\321\322	\323\324O	\324\306O#\320!\"\n\205\211\203\202\325\n!\204\202\326\n\313\"\210\327\n!\205\211\n+\207" [inherit uuid attach-dir org-attach-inherited org-attach-allow-inheritance org-entry-property-inherited-from nil org-entry-get "ATTACH_DIR_INHERIT" "ATTACH_DIR" org-attach-check-absolute-path t 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 create-if-not-exists-p org-attach-directory] 8 (#$ . 5891)])
#@321 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.
(defalias 'org-attach-check-absolute-path #[(dir) "\203\n\302!\206\302	!\206\303\304 !\206\305\306!\207" [dir 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"] 2 (#$ . 7144)])
#@129 Set the ATTACH_DIR property of the current entry.
The property defines the directory that is used for attachments
of the entry.
(defalias 'org-attach-set-directory #[nil "\301\302\303\"\304\305\"\306\302\303#)\207" [dir org-entry-get nil "ATTACH_DIR" read-directory-name "Attachment directory: " org-entry-put] 4 (#$ . 7768) nil])
#@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 #[nil "\300\301\302\303#\210\304\305!\207" [org-entry-put nil "ATTACH_DIR_INHERIT" "t" message "Children will inherit attachment directory"] 4 (#$ . 8110) nil])
#@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 #[nil "\303!\304\303\305	\"!\2051\306\307!r\nq\210\310\216\311	!\210\312\313!\210\312\314\315\"\210\316\317\320\321 \322\"\"\210\312\323!+)\207" [org-attach-directory dir #1=#:temp-buffer expand-file-name file-exists-p ".git" generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) cd shell-command "git add ." "git ls-files --deleted" t mapc #[(file) "\301\230?\205
\302\303\304Q!\207" [file "" shell-command "git rm \"" "\""] 4] split-string buffer-string "\n" "git commit -m 'Synchronized attachments'"] 5 (#$ . 8563)])
#@45 Turn the autotag on or (if OFF is set) off.
(defalias 'org-attach-tag #[(&optional off) "\205\212\302\303!\210\304	\203\301\202\305\")\207" [org-attach-auto-tag off org-back-to-heading t org-toggle-tag on] 3 (#$ . 9326)])
#@23 Turn the autotag off.
(defalias 'org-attach-untag #[nil "\300\301!\207" [org-attach-tag off] 2 (#$ . 9562)])
#@112 Add a link to `org-stored-link' when attaching a file.
Only do this when `org-attach-store-link-p' is non-nil.
(defalias 'org-attach-store-link #[(file) "\302!\303!D	B\211\207" [file org-stored-links org-attach-expand-link file-name-nondirectory] 3 (#$ . 9678)])
#@210 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', or `lns' default taken from
`org-attach-method'.
(defalias 'org-attach-attach #[(file &optional visit-dir method) "\206	\306\n!\f\203
\204\307`\f#\210\310\311!\312\"\313=\2033\314\n\"\210\202]\315=\203B\316\n\"\210\202]\317=\203Q\320\n\"\210\202]\321=\203]\322\n\"\210\323 \210\324 \210\325=\203r\326!\210\202}\311=\203}\326\n!\210\203\211\327!\202\215\330\331\"+\207" [method org-attach-method file basename org-attach-file-list-property org-attach-inherited file-name-nondirectory org-entry-add-to-multivalued-property org-attach-dir t expand-file-name mv rename-file cp copy-file ln add-name-to-file lns make-symbolic-link org-attach-commit org-attach-tag attached org-attach-store-link dired message "File \"%s\" is now a task attachment." attach-dir fname org-attach-store-link-p visit-dir] 4 (#$ . 9951) "fFile to keep as an attachment: \nP"])
#@30 Attach a file by copying it.
(defalias 'org-attach-attach-cp #[nil "\301\302\303!)\207" [org-attach-method cp call-interactively org-attach-attach] 2 (#$ . 11019) nil])
#@40 Attach a file by moving (renaming) it.
(defalias 'org-attach-attach-mv #[nil "\301\302\303!)\207" [org-attach-method mv call-interactively org-attach-attach] 2 (#$ . 11195) 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 #[nil "\301\302\303!)\207" [org-attach-method ln call-interactively org-attach-attach] 2 (#$ . 11382) 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 #[nil "\301\302\303!)\207" [org-attach-method lns call-interactively org-attach-attach] 2 (#$ . 11710) nil])
#@98 Create a new attachment FILE for the current task.
The attachment is created as an Emacs buffer.
(defalias 'org-attach-new #[(file) "\203	\204\304`\n#\210\305\306!\307 \210\310\311\n\"!\210\312\313\n\")\207" [org-attach-file-list-property org-attach-inherited file attach-dir org-entry-add-to-multivalued-property org-attach-dir t org-attach-tag find-file expand-file-name message "New attachment %s"] 4 (#$ . 12048) "sCreate attachment named: "])
#@29 Delete a single attachment.
(defalias 'org-attach-delete-one #[(&optional file) "\303\304!\305!\n\206\306\307\310\311	\"\"\312\n\"\313\n!\204$\314\315\n\"\210\316\n!\210\317 +\207" [attach-dir files file org-attach-dir t org-attach-file-list org-icompleting-read "Delete attachment: " mapcar #[(f) "\301!C\207" [f file-name-nondirectory] 2] expand-file-name file-exists-p error "No such attachment: %s" delete-file org-attach-commit] 5 (#$ . 12510) nil])
#@171 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.
(defalias 'org-attach-delete-all #[(&optional force) "\203
	\204
\304`\"\210\305 \211\205.\204\306\307!\205.\310\311\312\n\"!\210\313\314!\210\315 \210\316 )\207" [org-attach-file-list-property org-attach-inherited attach-dir force 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-commit org-attach-untag] 5 (#$ . 12982) "P"])
#@110 Synchronize the current tasks with its attachments.
This can be used after files have been added externally.
(defalias 'org-attach-sync #[nil "\306 \210\203	\204\307`\"\210\310 \211\205H\311\n!\211\203\"\312 \210\205G\313\211\205F
@\314\315\f\"\204>\316`\f#\210
A\211\204.\313*))\207" [org-attach-file-list-property org-attach-inherited attach-dir files file --dolist-tail-- org-attach-commit org-entry-delete org-attach-dir org-attach-file-list org-attach-tag nil string-match "^\\." org-entry-add-to-multivalued-property] 5 (#$ . 13637) nil])
#@118 Return a list of files in the attachment directory.
This ignores files starting with a ".", and files ending in "~".
(defalias 'org-attach-file-list #[(dir) "\301\302\303\304\305\302\306#\"\"\207" [dir delq nil mapcar #[(x) "\301\302\"?\205	\207" [x string-match "^\\."] 3] directory-files "[^~]\\'"] 8 (#$ . 14210)])
#@61 Show the attachment directory of the current task in dired.
(defalias 'org-attach-reveal #[(&optional if-exists) "\302?!\211\205\f\303	!)\207" [if-exists attach-dir org-attach-dir org-open-file] 3 (#$ . 14538) "P"])
#@120 Show the attachment directory of the current task.
This will attempt to use an external program to show the directory.
(defalias 'org-attach-reveal-in-emacs #[nil "\301\302!\303!)\207" [attach-dir org-attach-dir t dired] 2 (#$ . 14764) nil])
#@292 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.
(defalias 'org-attach-open #[(&optional in-emacs) "\304\305!\306!\211G\307U\203	@\202\310\311\312\313	\"\314\305$\315\316\n\"\"+\207" [attach-dir files file in-emacs org-attach-dir t org-attach-file-list 1 org-icompleting-read "Open attachment: " mapcar list nil org-open-file expand-file-name] 6 (#$ . 15015) "P"])
#@65 Open attachment, force opening in Emacs.
See `org-attach-open'.
(defalias 'org-attach-open-in-emacs #[nil "\300\301!\207" [org-attach-open in-emacs] 2 (#$ . 15638) nil])
#@126 Return the full path to the current entry's attachment file FILE.
Basically, this adds the path to the attachment directory.
(defalias 'org-attach-expand #[(file) "\301\302 \"\207" [file expand-file-name org-attach-dir] 3 (#$ . 15815)])
#@155 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.
(defalias 'org-attach-expand-link #[(file) "\301\302!P\207" [file "file:" org-attach-expand] 3 (#$ . 16060)])
(provide 'org-attach)

MMCT - 2023