;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require org-element ivy] 2) #@99 The `org-mode' file upon which ivy-todo operates. Level 1 headlines are recognized as TODO lists. (defvar ivy-todo-file (expand-file-name "ivy-todo.org" org-directory) (#$ . 156)) #@159 The level 1 headline in `ivy-todo-file` which contain the active TODO-list. Normally use `ivy-todo--buffer-headline-name' instead of accessing this variable. (defvar ivy-todo-headline nil (#$ . 343)) (make-variable-buffer-local 'ivy-todo-headline) #@58 Whether to guess TODO list based on the current project. (defvar ivy-todo-guess-list t (#$ . 597)) #@111 A list of tags which will be applied to new headlines created by `ivy-todo'. If nil, no tags will be applied. (defvar ivy-todo-default-tags nil (#$ . 703)) #@57 Return an list of level 1 headlines in `ivy-todo-file'. (defalias 'ivy-todo--headlines #[0 "\300\301 \302\303#\207" [org-element-map ivy-todo--ast headline #[257 "\300\211;\203\301\302#\266\202\202\303A@\"\266\202\304U\2053\305\211;\203+\301\302#\207\303A@\"\266\202\207" [:level get-text-property 0 plist-get 1 :raw-value] 7 "\n\n(fn H1)"]] 4 (#$ . 865)]) #@120 Return HEADLINE and its position if HEADLINE exists in `ivy-todo-file'. If it doesn't exist, create it. (fn HEADLINE) (defalias 'ivy-todo--get-headline #[257 "\211\205\217\301\302 \303\304\305\"\306\307%\206\217\310\302 \311\303\312\313\314C\315\257\"C\211\204-\266\202\202\212\211\211\203`\211@\211\316\206;;\203K\317\306$\266\202YA\320A@#\240\210\266A\266\202\202.\210\203\203\321\322\211\211:\204t\306\262\202\211@9\203\211AA\262\244#\210\206\210\211\266\202!\210\323!\207" [ivy-todo-default-tags org-element-map ivy-todo--ast headline make-closure #[257 "\301\211;\203\302\303#\266\202\202\304A@\"\266\202\305U\205W\306\211;\203/\302\303#\266\202\2027\304A@\"\266\202\300\232\205W\300\307\211;\203N\302\303#\266\202\202V\304A@\"\266\202B\207" [V0 :level get-text-property 0 plist-get 1 :raw-value :begin] 8 "\n\n(fn H1)"] nil t ivy-todo--replace-ast org-element-create :level 1 :title :tags :parent org-add-props plist-put apply org-element-set-contents ivy-todo--get-headline] 14 (#$ . 1245)]) #@112 Guess the headline name associated with the current buffer. Return nil if no headline is found, else a string. (defalias 'ivy-todo--guess-headline-name #[0 "\301\302\303\304#\203\305 \203\305 \306\232\204\305 \207\301\307\303\304#\203&\310\311\312 !!\207\313\314\"\203?\301\315!\203?\316 \203?\310\311\316 !!\207\303\207" [emacs-version require projectile nil t projectile-project-name "-" find-file-in-project file-name-base directory-file-name ffip-get-project-root-directory version<= "25" vc vc-root-dir] 4 (#$ . 2320)]) #@112 Get the name of the headline associated with the current buffer. Set `ivy-todo-headline` to the headline name. (defalias 'ivy-todo--buffer-headline-name #[0 "\206\302\303\304\305 \306\211 \205\307 %!\211\207" [ivy-todo-headline ivy-todo-guess-list ivy-todo--get-headline completing-read "TODO list: " ivy-todo--headlines nil ivy-todo--guess-headline-name] 7 (#$ . 2863)]) #@120 Return alist of todo items of `ivy-todo-headline'. The car is the name and the cdr is the position in `ivy-todo-file'. (defalias 'ivy-todo--list-items #[0 "\300\301 \302\303\304\305%\206\306 \210\304\207" [org-element-map ivy-todo--ast headline #[257 "\300\211;\203\301\302#\266\202\202\303A@\"\266\202\304U\205Y\305 @\306\211;\2032\301\302#\266\202\202:\303A@\"\266\202\230\205Y\307\211:\204K\310\262\202V\211@9\203V\211AA\262\311\312#\207" [:level get-text-property 0 plist-get 1 ivy-todo--buffer-headline-name :raw-value org-element-map nil headline #[257 "\300\211;\203\301\302#\266\202\202\303A@\"\266\202\205=\304\305!\306\"@\307\211;\2034\301\302#\266\202\202<\303A@\"\266\202B\207" [:todo-type get-text-property 0 plist-get split-string org-element-interpret-data "\n" :begin] 8 "\n\n(fn TODO-ITEM)"]] 8 "\n\n(fn H1)"] nil t ivy-todo--buffer-headline-name] 6 (#$ . 3248)]) #@32 Get the AST for the TODO file. (defalias 'ivy-todo--ast #[0 "\302\300!\210\303\304\305\303\"r\211q\210\306\307\"\216\310 !\210\311 \210\312 *\262)\207" [delay-mode-hooks ivy-todo-file make-local-variable t generate-new-buffer " *temp*" make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents org-mode org-element-parse-buffer] 4 (#$ . 4179)]) #@61 Replace AST of `ivy-todo-file' and save the file. (fn AST) (defalias 'ivy-todo--replace-ast #[257 "\301\302\303\"\304\305\"\216r\211q\210\306!c)rq\210\307\310\211\310\311%\210*\207" [ivy-todo-file generate-new-buffer " *temp file*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] org-element-interpret-data write-region nil 0] 10 (#$ . 4576)]) #@287 Read and manipulate entries in `ivy-todo-file'. The default action changes the TODO state of the selected entry. With a `\[universal-argument]' ARG, first change the active TODO list. With a `\[universal-argument] \[universal-argument]' ARG, change `ivy-todo-file'. (fn &optional ARG) (defalias 'ivy-todo #[256 "\211\303U\203\304\305\306 #!\211\307V\203\310\311\312\313 \"!\n\203%\310\n@!\314 \nA\315\316\n@\317Q\320\321\322\"$\207" [org-directory ivy-todo-file ivy-todo-headline 16 expand-file-name read-file-name "TODO file: " 1 ivy-todo--get-headline completing-read "TODO list: " ivy-todo--headlines ivy-todo--list-items ivy-read "\"" "\" items: " :action make-closure #[257 "\303\301!\210\304r\305\n!q\210\211;\203\"\300b\210\306 b\210\307\310!\210\211c\210\202)\211Ab\210\311 \210\312 *\207" [V0 delay-mode-hooks ivy-todo-file make-local-variable t find-file-noselect line-end-position org-insert-todo-subheading 1 org-todo save-buffer] 3 "\n\n(fn X)"]] 10 (#$ . 4967) "p"]) #@153 If ITEM exist in `ivy-todo-file' goto its position, else insert it after POS. Meant to be used with `ivy-todo-file' as `current-buffer'. (fn ITEM POS) (defalias 'ivy-todo--old-or-new-item #[514 ";\203\211b\210\300 b\210\301\302!\210c\207Ab\207" [line-end-position org-insert-todo-subheading 1] 4 (#$ . 5971)]) #@123 Goto HEADLINE in `ivy-todo-file' and archive it. HEADLINE is a string or a cons ("headline" . buffer-pos). (fn HEADLINE) (defalias 'ivy-todo-archive #[257 "A\303\301!\210\304r\305\n!q\210\306\"\210\307 \210\310 *\207" [ivy-todo-headline delay-mode-hooks ivy-todo-file make-local-variable t find-file-noselect ivy-todo--old-or-new-item org-archive-subtree save-buffer] 5 (#$ . 6294)]) #@132 Goto HEADLINE in `ivy-todo-file' and call `org-priority'. HEADLINE is a string or a cons ("headline" . buffer-pos). (fn HEADLINE) (defalias 'ivy-todo-set-priority #[257 "A\303\301!\210\304r\305\n!q\210\306\"\210\307 \210\310 *\207" [ivy-todo-headline delay-mode-hooks ivy-todo-file make-local-variable t find-file-noselect ivy-todo--old-or-new-item org-priority save-buffer] 5 (#$ . 6690)]) #@136 Goto HEADLINE in `ivy-todo-file' and call `org-set-property'. HEADLINE is a string or a cons ("headline" . buffer-pos). (fn HEADLINE) (defalias 'ivy-todo-set-property #[257 "A\303\301!\210\304r\305\n!q\210\306\"\210\307\310!\210\311 *\207" [ivy-todo-headline delay-mode-hooks ivy-todo-file make-local-variable t find-file-noselect ivy-todo--old-or-new-item call-interactively org-set-property save-buffer] 5 (#$ . 7093)]) #@132 Goto HEADLINE in `ivy-todo-file' and call `org-set-tags'. HEADLINE is a string or a cons ("headline" . buffer-pos). (fn HEADLINE) (defalias 'ivy-todo-set-tags #[257 "A\303\301!\210\304r\305\n!q\210\306\"\210\307 \210\310 *\207" [ivy-todo-headline delay-mode-hooks ivy-todo-file make-local-variable t find-file-noselect ivy-todo--old-or-new-item org-set-tags-command save-buffer] 5 (#$ . 7527)]) #@134 Goto HEADLINE in `ivy-todo-file' and call `org-set-effort'. HEADLINE is a string or a cons ("headline" . buffer-pos). (fn HEADLINE) (defalias 'ivy-todo-set-effort #[257 "A\303\301!\210\304r\305\n!q\210\306\"\210\307 \210\310 *\207" [ivy-todo-headline delay-mode-hooks ivy-todo-file make-local-variable t find-file-noselect ivy-todo--old-or-new-item org-set-effort save-buffer] 5 (#$ . 7934)]) #@130 Goto HEADLINE in `ivy-todo-file' and call `org-refile'. HEADLINE is a string or a cons ("headline" . buffer-pos). (fn HEADLINE) (defalias 'ivy-todo-refile #[257 "A\303\301!\210\304r\305\n!q\210\306\"\210\307 \210\310 *\207" [ivy-todo-headline delay-mode-hooks ivy-todo-file make-local-variable t find-file-noselect ivy-todo--old-or-new-item org-refile save-buffer] 5 (#$ . 8339)]) #@109 Visit HEADLINE in `ivy-todo-file'. HEADLINE is a string or a cons ("headline" . buffer-pos). (fn HEADLINE) (defalias 'ivy-todo-visit #[257 "Ar\302 !q\210\303\"\210\304 )\207" [ivy-todo-headline ivy-todo-file find-file ivy-todo--old-or-new-item save-buffer] 5 (#$ . 8732)]) (byte-code "\300\301\302\"\210\303\301!\207" [ivy-set-actions ivy-todo (("," ivy-todo-set-priority "priority") ("a" ivy-todo-archive "archive") ("e" ivy-todo-set-effort "effort") ("p" ivy-todo-set-property "property") ("r" ivy-todo-refile "refile") ("t" ivy-todo-set-tags "tags") ("v" ivy-todo-visit "visit")) provide] 3)