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
;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!\207" [require cl-lib org-clock] 2)
#@28 t=0 for the running timer.
(defvar org-timer-start-time nil (#$ . 478))
#@33 Time when the timer was paused.
(defvar org-timer-pause-time nil (#$ . 556))
#@154 Current countdown timer.
This is a timer object if there is an active countdown timer,
`paused' if there is a paused countdown timer, and nil
otherwise.
(defvar org-timer-countdown-timer nil (#$ . 640))
#@61 Title for notification displayed when a countdown finishes.
(defvar org-timer-countdown-timer-title nil (#$ . 849))
#@48 Regular expression used to match timer stamps.
(defconst org-timer-re "\\([-+]?[0-9]+\\):\\([0-9]\\{2\\}\\):\\([0-9]\\{2\\}\\)" (#$ . 971))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\315\316\317\320\310\311& \210\300\321\302\303\322DD\323\306\307\310\324&\207" [custom-declare-variable org-timer-format funcall function #[0 "\300\207" [#1="%s "] 1 #1#] "The format to insert the time of the timer.\nThis format must contain one instance of \"%s\" which will be replaced by\nthe value of the timer." :group org-time :type string org-timer-default-timer #[0 "\300\207" [#2="0"] 1 #2#] "The default timer when a timer is set, in minutes or hh:mm:ss format.\nWhen 0, the user is prompted for a value." :version "26.1" :package-version (Org . "8.3") org-timer-display #[0 "\300\207" [mode-line] 1] "Define where running timer is displayed, if at all.\nWhen a timer is running, Org can display it in the mode line\nand/or frame title.  Allowed values are:\n\nboth         displays in both mode line and frame title\nmode-line    displays only in mode line (default)\nframe-title  displays only in frame title\nnil          current timer is not displayed" (choice (const :tag "Mode line" mode-line) (const :tag "Frame title" frame-title) (const :tag "Both" both) (const :tag "None" nil))] 12)
#@43 Hook run after relative timer is started.
(defvar org-timer-start-hook nil (#$ . 2316))
#@57 Hook run before relative or countdown timer is stopped.
(defvar org-timer-stop-hook nil (#$ . 2410))
#@56 Hook run before relative or countdown timer is paused.
(defvar org-timer-pause-hook nil (#$ . 2517))
#@58 Hook run after relative or countdown timer is continued.
(defvar org-timer-continue-hook nil (#$ . 2624))
#@40 Hook run after countdown timer is set.
(defvar org-timer-set-hook nil (#$ . 2736))
#@46 Hook run after countdown timer reaches zero.
(defvar org-timer-done-hook nil (#$ . 2825))
#@539 Set the starting time for the relative timer to now.
When called with prefix argument OFFSET, prompt the user for an offset time,
with the default taken from a timer stamp at point, if any.
If OFFSET is a string or an integer, it is directly taken to be the offset
without user interaction.
When called with a double prefix arg, all timer strings in the active
region will be shifted by a specific amount.  You will be prompted for
the amount, with the default to make the first timer string in
the region 0:00:00.
 
(fn &optional OFFSET)
(defalias 'org-timer-start #[256 "\211\304\232\203\n\305\306!\207\203\307\310!\207\311\211\211\204\312 \202h\250\203*\262\202_;\2037\313!\262\202_\314\n!\203C\315\316!\202D\317\262\320\321\322\"!\262\323\324\"\204X\262\313\325!!\262\326\327\312 !Z!\311\330\331!\210\332\333\334\335    \"\336\206{\316!#\210\337\340!\207" [org-timer-countdown-timer org-timer-start-time org-timer-re org-timer-pause-time (16) call-interactively org-timer-change-times-in-region user-error "Countdown timer is running.  Cancel first" nil current-time org-timer-hms-to-secs org-in-regexp match-string 0 "0:00:00" read-string format "Restart timer with offset [%s]: " string-match "\\S-" org-timer-fix-incomplete seconds-to-time float-time org-timer-set-mode-line on message "Timer start time set to %s, current value is %s" format-time-string "%T" org-timer-secs-to-hms run-hooks org-timer-start-hook] 9 (#$ . 2922) "P"])
#@113 Pause or continue the relative or countdown timer.
With prefix arg STOP, stop it entirely.
 
(fn &optional STOP)
(defalias 'org-timer-pause-or-continue #[256 "\211\203\304 \207\204\305\306!\207    \203L\307!\307    !\n\2031Z\310 \"\311\312 \313!\"\210\202<\313\307\312 !ZZ!\314\315\316!\210\317\320!\210\321\322\323 \"\207\n\203V\324\n!\210\325\317\326!\210\312 \315\325!\210\321\327\323 \"\207" [org-timer-start-time org-timer-pause-time org-timer-countdown-timer org-timer-countdown-timer-title org-timer-stop error "No timer is running" float-time org-timer--run-countdown-timer time-add current-time seconds-to-time nil org-timer-set-mode-line on run-hooks org-timer-continue-hook message "Timer continues at %s" org-timer-value-string cancel-timer paused org-timer-pause-hook "Timer paused at %s"] 8 (#$ . 4402) "P"])
#@39 Stop the relative or countdown timer.
(defalias 'org-timer-stop #[0 "\204\303\304!\210\305    !\203\306    !\210\307\310!\210\311\211\311\312\313!\210\314\315!\207" [org-timer-start-time org-timer-countdown-timer org-timer-pause-time user-error "No timer running" timerp cancel-timer run-hooks org-timer-stop-hook nil org-timer-set-mode-line off message "Timer stopped"] 3 (#$ . 5246) nil])
#@531 Insert a H:MM:SS string from the timer into the buffer.
The first time this command is used, the timer is started.
 
When used with a `\[universal-argument]' prefix, force restarting the timer.
 
When used with a `\[universal-argument] \[universal-argument]' prefix, change all the timer strings
in the region by a fixed amount.  This can be used to re-calibrate
a timer that was not started at the correct moment.
 
If NO-INSERT is non-nil, return the string instead of inserting
it in the buffer.
 
(fn &optional RESTART NO-INSERT)
(defalias 'org-timer #[512 "\301\232\203\n\302!\207\303\232\204\204\302 \210\211\203\304 \207\304 c\207" [org-timer-start-time (16) org-timer-start (4) org-timer-value-string] 4 (#$ . 5646) "P"])
#@23 Set the timer string.
(defalias 'org-timer-value-string #[0 "\301\302\303\304\305 !!!\"\207" [org-timer-format format org-timer-secs-to-hms abs floor org-timer-seconds] 6 (#$ . 6389)])
(defalias 'org-timer-seconds #[0 "\203\303    !\303\n\206\304 !Z\207\303\n\206\304 !\303    !Z\207" [org-timer-countdown-timer org-timer-start-time org-timer-pause-time float-time current-time] 3])
#@67 Change all h:mm:ss time in region by a DELTA.
 
(fn BEG END DELTA)
(defalias 'org-timer-change-times-in-region #[771 "\300\301\302\303\"\2041\212b\210\304\305#\2030\306\307!\262\310!\311\232\203+\312\301O\262\2020\313P\262)\314\315!!\262\307U\203B\316\317!\210\212b\210\320\305#\205x`\262\321\322 \323\307\324\325\326!\327\"\330$\216\331\314\306\307!!\\!)\262\305\211#\210\211b\210\202F)\207" ["[-+]?[0-9]+:[0-9]\\{2\\}:[0-9]\\{2\\}" nil string-match "\\S-" re-search-forward t match-string 0 string-to-char 45 1 "-" org-timer-hms-to-secs org-timer-fix-incomplete error "No change" re-search-backward replace-match match-data make-byte-code "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 org-timer-secs-to-hms] 13 (#$ . 6780) "r\nsEnter time difference like \"-1:08:26\".  Default is first time to zero: "])
#@82 Insert a description-type item with the current timer value.
 
(fn &optional ARG)
(defalias 'org-timer-item #[256 "\301 `\203<b\203<\302 \203<\303 \304!\305\205\306\307\"\310P\311\312%\262\313\314!\"\210\315!\210\316\225b\266\203\202\\\203I\211b\210\317\320!\202\\\321 \210\322 \210\323c\210\305\205X\324!\210\310c\207" [org-list-full-item-re org-in-item-p org-at-item-timer-p org-list-struct org-list-prevs-alist org-timer (4) t ":: " org-list-insert-item nil org-list-write-struct org-list-parents-alist looking-at 0 error "This is not a timer list" beginning-of-line org-indent-line "- " (4)] 12 (#$ . 7640) "P"])
#@84 If hms is a H:MM:SS string with missing hour or hour and minute, fix it.
 
(fn HMS)
(defalias 'org-timer-fix-incomplete #[257 "\300\301\"\2037\302\303\304\305\225\203\306\307\305\"!\202\310\311\225\203)\306\307\311\"!\202*\310\306\307\312\"!$\313\211$\207\314\315\"\207" [string-match "\\(?:\\([0-9]+:\\)?\\([0-9]+:\\)\\)?\\([0-9]+\\)" replace-match format "%d:%02d:%02d" 1 string-to-number match-string 0 2 3 t error "Cannot parse HMS string \"%s\""] 10 (#$ . 8285)])
#@124 Convert h:mm:ss string to an integer time.
If the string starts with a minus sign, the integer will be negative.
 
(fn HMS)
(defalias 'org-timer-hms-to-secs #[257 "\300\301\"\204    \302\207\303\304\305\"!\303\304\306\"!\303\304\307\"!\304\305\"\302\305O\310\232\311!\262\211\2031\312\2022\305\313_\\\313_\\_\207" [string-match "\\([-+]?[0-9]+\\):\\([0-9]\\{2\\}\\):\\([0-9]\\{2\\}\\)" 0 string-to-number match-string 1 2 3 "-" abs -1 60] 10 (#$ . 8776)])
#@101 Convert integer S into h:mm:ss.
If the integer is negative, the string will start with "-".
 
(fn S)
(defalias 'org-timer-secs-to-hms #[257 "\300\211\211\301W\203 \302\202\303\262\304!\262\305\245\262\305_Z\262\305\245\262\305_Z\262\306\307%\207" [nil 0 "-" "" abs 60 format "%s%d:%02d:%02d"] 10 (#$ . 9249)])
(defvar org-timer-mode-line-timer nil)
(defvar org-timer-mode-line-string nil)
#@111 Set the mode-line display for relative or countdown timer.
VALUE can be `on', `off', or `paused'.
 
(fn VALUE)
(defalias 'org-timer-set-mode-line #[257 "\304=\204\f\305=\203    \204\306\307    >\204\310    \311\"\312=\204)\305=\2034\307\n>\2044\310\n\313\"\211\314\267\202\302 \203D\315 !\210\316\304=\204P\305=\203U\317\307    \"\312=\204a\305=\203f\317\307\n\"\320 \207 \205\303\315 !\210\316\211\207\304=\204\201\305=\203\222    \204\207\321\307    >\204\222\310    \322\"\312=\204\236\305=\203\251\307\n>\204\251\310\n\323\"\324 \210 \203\266\315 !\210\316\205\303\325\326\211\324#\211\207\316\207" [org-timer-display global-mode-string frame-title-format org-timer-mode-line-timer mode-line both (#1="") org-timer-mode-line-string append (org-timer-mode-line-string) frame-title (org-timer-mode-line-string) #s(hash-table size 3 test eql rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (off 58 paused 105 on 117)) cancel-timer nil delq force-mode-line-update (#1#) (org-timer-mode-line-string) (org-timer-mode-line-string) org-timer-update-mode-line run-with-timer 1] 5 (#$ . 9666)])
#@41 Update the timer time in the mode line.
(defalias 'org-timer-update-mode-line #[0 "?\205\302\303 \304\305O\306Q\307 \207" [org-timer-pause-time org-timer-mode-line-string " <" org-timer-value-string 0 -1 ">" force-mode-line-update] 4 (#$ . 10798)])
#@51 Display the remaining time before the timer ends.
(defalias 'org-timer-show-remaining-time #[0 "\301\302!\210\204\f\303\304!\207\305\306\307!\310 \"!\211@A@\303\311#\207" [org-timer-countdown-timer require time message "No timer set" decode-time time-subtract timer--time current-time "%d minute(s) %d seconds left before next time out"] 7 (#$ . 11057) nil])
#@783 Prompt for a duration in minutes or hh:mm:ss and set a timer.
 
If `org-timer-default-timer' is not "0", suggest this value as
the default duration for the timer.  If a timer is already set,
prompt the user if she wants to replace it.
 
Called with a numeric prefix argument, use this numeric value as
the duration of the timer in minutes.
 
Called with a `C-u' prefix arguments, use `org-timer-default-timer'
without prompting the user for a duration.
 
With two `C-u' prefix arguments, use `org-timer-default-timer'
without prompting the user for a duration and automatically
replace any running timer.
 
By default, the timer duration will be set to the number of
minutes in the Effort property, if any.  You can ignore this by
using three `C-u' prefix arguments.
 
(fn &optional OPT)
(defalias 'org-timer-set-timer #[256 "\203\f    \204\f\305\306!\210\n\247\203\307\n!\202\n\3101&\311\312\313\314\"!0\202(\210\315\247\2033\307!\206`\316\232\204C\211\203C\307!\206`:\203L\206`;\203U\206`\317\320\321\230?\205_\"\322\323\"\203l\211\324P\262\322\325\"\204x\326 \202\270\327\330!!    \203\223\331\232\204\223\332\333!\204\223\334\335!\202\266\336    !\203\235\337    !\210\340 \341 \"\342\343!\210\344\345 \346!\"\315\347\350!\262\207" [org-timer-start-time org-timer-countdown-timer org-timer-default-timer org-timer-countdown-timer-title org-timer-pause-time user-error "Relative timer is running.  Stop first" number-to-string (error) floor org-get-at-eol effort-minutes 1 nil (64) read-from-minibuffer "How much time left? (minutes or h:mm:ss) " "0" string-match "\\`[0-9]+\\'" ":00" "[0-9]+" org-timer-show-remaining-time org-timer-hms-to-secs org-timer-fix-incomplete (16) y-or-n-p "Replace current timer? " message "No timer set" timerp cancel-timer org-timer--get-timer-title org-timer--run-countdown-timer run-hooks org-timer-set-hook time-add current-time seconds-to-time org-timer-set-mode-line on] 9 (#$ . 11429) "P"])
#@139 Start countdown timer that will last SECS.
TITLE will be appended to the notification message displayed when
time is up.
 
(fn SECS TITLE)
(defalias 'org-timer--run-countdown-timer #[514 "\301\302\"\303\304\305\304\306\307E\310BBBB#\207" [org-clock-sound format "%s: time out" run-with-timer nil lambda (setq org-timer-countdown-timer nil org-timer-start-time nil) org-notify ((org-timer-set-mode-line 'off) (run-hooks 'org-timer-done-hook))] 12 (#$ . 13398)])
#@64 Construct timer title from heading or file name of Org buffer.
(defalias 'org-timer--get-timer-title #[0 "\300\301!\203>\302`\303\"\206\304 \302`\305\"\206\211r\306!q\210\212\214~\210\211b\210\307 \210\31011\311 0\2025\210\2028\206<\312\313 !+\207\300\314!\203Z\3151N\311 0\202R\210\202U\206]\312\313 !\207\316\317!\207" [derived-mode-p org-agenda-mode get-text-property org-marker org-agenda-error org-hd-marker marker-buffer org-show-entry (error) org-get-heading buffer-name buffer-base-buffer org-mode (error) error "Not in an Org buffer"] 4 (#$ . 13869)])
(provide 'org-timer)