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
;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\304\305\306\307\310\311\312\313&\210\314\315\316\317\320DD\321\312\305\322\323&\210\314\324\316\317\325DD\326\312\305\322\323&\210\314\327\316\317\330DD\331\312\305\322\323&\210\314\332\316\317\333DD\334\312\305\322\335&\210\314\336\316\317\337DD\340\312\305\322\335&\210\314\341\316\317\342DD\343\312\305\322\335&\210\314\344\316\317\345DD\346\312\305\347\350\322\351&    \210\314\352\316\317\353DD\354\312\305\347\350\322\351&    \210\314\355\316\317\356DD\357\312\305\322\335&\210\360\361\362\363\312\305\312\364&\210\360\365\366\367\312\305\312\364&\210\360\370\371\372\312\305\312\364&\210\360\373\374\372\312\305\312\364&\210\360\375\376\377\312\305\312\364&\210\360\201@\201A\377\312\305\312\364&\210\360\201B\201C\201D\312\305\312\364&\210\360\201E\201F\201D\312\305\312\364&\207" [require cl-lib org org-agenda custom-declare-group org-habit nil "Options concerning habit tracking in Org mode." :tag "Org Habit" :group org-progress custom-declare-variable org-habit-graph-column funcall function #[0 "\300\207" [40] 1] "The absolute column at which to insert habit consistency graphs.\nNote that consistency graphs will overwrite anything else in the buffer." :type integer org-habit-preceding-days #[0 "\300\207" [21] 1] "Number of days before today to appear in consistency graphs." org-habit-following-days #[0 "\300\207" [7] 1] "Number of days after today to appear in consistency graphs." org-habit-show-habits #[0 "\300\207" [t] 1] "If non-nil, show habits in agenda buffers." boolean org-habit-show-habits-only-for-today #[0 "\300\207" [t] 1] "If non-nil, only show habits on today's agenda, and not for future days.\nNote that even when shown for future days, the graph is always\nrelative to the current effective date." org-habit-show-all-today #[0 "\300\207" [nil] 1] "If non-nil, will show the consistency graph of all habits on\ntoday's agenda, even if they are not scheduled." org-habit-today-glyph #[0 "\300\207" [33] 1] "Glyph character used to identify today." :version "24.1" character org-habit-completed-glyph #[0 "\300\207" [42] 1] "Glyph character used to show completed days on which a task was done." org-habit-show-done-always-green #[0 "\300\207" [nil] 1] "Non-nil means DONE days will always be green in the consistency graph.\nIt will be green even if it was done after the deadline." custom-declare-face org-habit-clear-face ((((background light)) (:background "#8270f9")) (((background dark)) (:background "blue"))) "Face for days on which a task shouldn't be done yet." org-faces org-habit-clear-future-face ((((background light)) (:background "#d6e4fc")) (((background dark)) (:background "midnightblue"))) "Face for future days on which a task shouldn't be done yet." org-habit-ready-face ((((background light)) (:background "#4df946")) (((background dark)) (:background "forestgreen"))) "Face for days on which a task should start to be done." org-habit-ready-future-face ((((background light)) (:background "#acfca9")) (((background dark)) (:background "darkgreen"))) org-habit-alert-face ((((background light)) (:background "#f5f946")) (((background dark)) (:background "gold"))) "Face for days on which a task is due." org-habit-alert-future-face ((((background light)) (:background "#fafca9")) (((background dark)) (:background "darkgoldenrod"))) org-habit-overdue-face ((((background light)) (:background "#f9372d")) (((background dark)) (:background "firebrick"))) "Face for days on which a task is overdue." org-habit-overdue-future-face ((((background light)) (:background "#fc9590")) (((background dark)) (:background "darkred")))] 10)
#@11 
 
(fn TS)
(defalias 'org-habit-duration-to-days #[257 "\300\301\"\203\302\303\304\305\"!\306\304\307\"\310\"A_!\207\311\312\"\207" [string-match "\\([0-9]+\\)\\([dwmy]\\)" floor string-to-number match-string 1 assoc 2 (("d" . 1) ("w" . 7) ("m" . 30.4) ("y" . 365.25)) error "Invalid duration string: %s"] 7 (#$ . 4066)])
#@58 Is the task at POM or point a habit?
 
(fn &optional POM)
(defalias 'org-is-habit-p #[256 "\300\206`\301\"\302\230\207" [org-entry-get "STYLE" "habit"] 4 (#$ . 4399)])
#@492 Parse the TODO surrounding point for its habit-related data.
Returns a list with the following elements:
 
  0: Scheduled date for the habit (may be in the past)
  1: ".+"-style repeater for the schedule, in days
  2: Optional deadline (nil if not present)
  3: If deadline, the repeater for the deadline, otherwise nil
  4: A list of all the past dates this todo was mark closed
  5: Repeater type as a string
 
This list represents a "habit" for the rest of this module.
 
(fn &optional POM)
(defalias 'org-habit-parse-todo #[256 "\212\211\203\211b\210\306`!\204\307\310!\210\311`!\312\313`\314\"!\212\315 \210`)\316\317 8\320\211\2035\321\322G$\210\202=\323\322G\320$\210\266\202\320\211\211\211\211\203S\324    !\262    \202Y\325\326\"\210\204d\325\327\"\210\330!\262\331\332    \"\210\333\322    \"\262\322V\204\203\325\334\"\210\331\335    \"\203\252\330\333\336\n\"!\262X\203\242\325\337\n#\210Z\\\262\340\341!\210    \n\\ \211\203\272\342\202\273\343\203\304    \202\305`\322\344\345\346\f! \3475\236A\211\204\331\350\202\367\351\352\353!\354 B\3556B\356\357\360 B\3616B\362BBBBBB\"P\262$\204\fb\210W\203*\341#\203*\324\363\333\336!\206\333\364!!! B\262 T\262\202\266\257\266\211)\207" [org-rm-props org-habit-preceding-days org-habit-following-days org-log-states-order-reversed org-done-keywords org-ts-regexp-inactive org-is-habit-p cl--assertion-failed (org-is-habit-p (point)) org-get-scheduled-time org-get-repeat org-entry-get "SCHEDULED" outline-next-heading 4 org-heading-components nil remove-text-properties 0 set-text-properties time-to-days error "Habit %s has no scheduled date" "Habit `%s' has no scheduled repeat period or has an incorrect one" org-habit-duration-to-days string-match "[\\.+]?\\+" match-string-no-properties "Habit %s scheduled repeat period is less than 1d" "/\\([0-9]+[dwmy]\\)" 1 "Habit %s deadline repeat period is less than or equal to scheduled (%s)" org-back-to-heading t re-search-forward re-search-backward format "^[     ]*-[     ]+\\(?:State \"%s\".*%s%s\\)" regexp-opt done "" "\\|" org-replace-escapes regexp-quote "%d" "%D" ("%s" . "\"\\S-+\"") ("%S" . "\"\\S-+\"") "%t" "%T" (("%u" . ".*?") ("%U" . ".*?")) org-time-string-to-time 2 org-log-note-headings org-ts-regexp] 30 (#$ . 4576)])
#@14 
 
(fn HABIT)
(defalias 'org-habit-scheduled #[257 "\211@\207" [] 2 (#$ . 6886)])
(put 'org-habit-scheduled 'byte-optimizer 'byte-compile-inline-expand)
#@14 
 
(fn HABIT)
(defalias 'org-habit-scheduled-repeat #[257 "\211A@\207" [] 2 (#$ . 7044)])
(put 'org-habit-scheduled-repeat 'byte-optimizer 'byte-compile-inline-expand)
#@14 
 
(fn HABIT)
(defalias 'org-habit-deadline #[257 "\3008\211\206\"\3018\203\211@\262\211A@\262S\\\202\"\211@\262\207" [2 3] 5 (#$ . 7217)])
(put 'org-habit-deadline 'byte-optimizer 'byte-compile-inline-expand)
#@14 
 
(fn HABIT)
(defalias 'org-habit-deadline-repeat #[257 "\3008\206\f\211\211A@\262\207" [3] 3 (#$ . 7444)])
(put 'org-habit-deadline-repeat 'byte-optimizer 'byte-compile-inline-expand)
#@14 
 
(fn HABIT)
(defalias 'org-habit-done-dates #[257 "\3008\207" [4] 3 (#$ . 7638)])
(put 'org-habit-done-dates 'byte-optimizer 'byte-compile-inline-expand)
#@14 
 
(fn HABIT)
(defalias 'org-habit-repeat-type #[257 "\3008\207" [5] 3 (#$ . 7800)])
(put 'org-habit-repeat-type 'byte-optimizer 'byte-compile-inline-expand)
#@145 Determine the relative priority of a habit.
This must take into account not just urgency, but consistency as well.
 
(fn HABIT &optional MOMENT)
(defalias 'org-habit-get-priority #[513 "\300\203 \301!\202 \302 \211@\262\3038\211\2065\3048\2030\211@\262\211A@\262S\\\2025\211@\262\266\202Z\305_\\\262U\204QU\203Q\306\\\262SZ\211\307V\203e\310_\\\262\202l\305_\\\262\210\207" [1000 time-to-days org-today 2 3 10 50 0 100] 10 (#$ . 7965)])
(put 'org-habit-get-priority 'byte-optimizer 'byte-compile-inline-expand)
#@788 Return faces for HABIT relative to NOW-DAYS and SCHEDULED-DAYS.
NOW-DAYS defaults to the current time's days-past-the-epoch if nil.
SCHEDULED-DAYS defaults to the habit's actual scheduled days if nil.
 
Habits are assigned colors on the following basis:
  Blue      Task is before the scheduled date.
  Green     Task is on or after scheduled date, but before the
        end of the schedule's repeat period.
  Yellow    If the task has a deadline, then it is after schedule's
        repeat period, but before the deadline.
  Orange    The task has reached the deadline day, or if there is
        no deadline, the end of the schedule's repeat period.
  Red       The task has gone beyond the deadline day or the
        schedule's repeat period.
 
(fn HABIT &optional NOW-DAYS SCHEDULED-DAYS DONEP)
(defalias 'org-habit-get-faces #[1025 "\206    \211@\262\211A@\262\3018\206\211\211A@\262\262\203*Z\\\202P\3028\211\206N\3018\203I\211@\262\211A@\262S\\\202N\211@\262\266\202\206Y\303\304 !\211W\203c\305\202\214\211W\203m\306\202\214\211U\203\203{\307\202\214\310\202\214\203\213\203\213\311\202\214\312\207" [org-habit-show-done-always-green 3 2 time-to-days current-time (org-habit-clear-face . org-habit-clear-future-face) (org-habit-ready-face . org-habit-ready-future-face) (org-habit-ready-face . org-habit-ready-future-face) (org-habit-alert-face . org-habit-alert-future-face) (org-habit-ready-face . org-habit-ready-future-face) (org-habit-overdue-face . org-habit-overdue-future-face)] 12 (#$ . 8523)])
#@236 Build a graph for the given HABIT, from STARTING to ENDING.
CURRENT gives the current time between STARTING and ENDING, for
the purpose of drawing the graph.  It need not be the actual
current time.
 
(fn HABIT STARTING CURRENT ENDING)
(defalias 'org-habit-build-graph #[1028 "\302\3038\262\304\"\211\211@\262\211A@\262\305!\305!\305!\306ZT\307\"\310\311\203F@W\203F@\262A\262    \202+W\203\243WU\n\205_ @U\203s\204s\nW\204s\312\202\313\n\205\205\3148\262\204\222\202\211\315\232\203\240\\\202\211\316\232\203\262G_Z\202@\317Z\"\211\310U\203\310\202\311\211\\\262\nU\203\330\211\202\f\3202\fA\211\203\211@Z\310]\245T_\\\262\211\fU\203\321\320\"\210A\266\202\202\337\2620\266\202\262$\311\211\203^\322\323\305!Z!\"        I\210\324\262\325    \211T\326\327\330 \"%\210\203Z\f@U\203Z@\262A\262\202?\210\202i\203i    I\210\204q\203v@\202xA\262\203\214\211\331=\204\214\204\214A\262\325\211T\332 %\266T\262T\262\202F\207" [org-habit-completed-glyph org-habit-today-glyph sort 4 < time-to-days make-string 32 0 nil (org-habit-clear-face . org-habit-clear-future-face) org-habit-get-faces 5 ".+" "+" mod :exit throw time-add days-to-time t put-text-property help-echo format-time-string org-time-stamp-format org-habit-overdue-face face] 28 (#$ . 10079)])
#@71 Insert consistency graph for any habitual tasks.
 
(fn &optional LINE)
(defalias 'org-habit-insert-consistency-graphs #[256 "\306\307\310\311 \312\313_\312E\"\212\203\314 \202eb\210m?\205W\315`\316\"\211\203P\317 \306\"\210\320\321\322\f #\323 `Z^!\210\324\325\310\326\f!\"\327\326 !\"$!\210\210\330y\210\202+\207" [org-extend-today-until buffer-invisibility-spec inhibit-read-only org-habit-graph-column org-habit-preceding-days org-habit-following-days t (org-link) time-subtract current-time 0 3600 point-at-bol get-text-property org-habit-p move-to-column delete-char + 1 line-end-position insert-before-markers org-habit-build-graph days-to-time time-add nil] 14 (#$ . 11514)])
#@47 Toggle display of habits in an agenda buffer.
(defalias 'org-habit-toggle-habits #[0 "\301\302\303\"\210?\304 \210\305 \210\306\307\203\310\202\311\"\207" [org-habit-show-habits org-agenda-check-type t agenda org-agenda-redo org-agenda-set-mode-name message "Habits turned %s" "on" "off"] 3 (#$ . 12221) nil])
(byte-code "\301\302\303#\210\304\305!\207" [org-agenda-mode-map org-defkey "K" org-habit-toggle-habits provide org-habit] 4)