mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-18 76bbd07de7add0f9d13c6914f158d19630fe2f62
commit | author | age
76bbd0 1 ;ELC
C 2 ;;; Compiled
3 ;;; in Emacs version 26.1
4 ;;; with all optimizations.
5
6 ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
7
8 ;;; This file does not contain utf-8 non-ASCII characters,
9 ;;; and so can be loaded in Emacs versions earlier than 23.
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14
15 (byte-code "\300\301!\210\300\302!\207" [require cl-lib org-clock] 2)
16 #@28 t=0 for the running timer.
17 (defvar org-timer-start-time nil (#$ . 478))
18 #@33 Time when the timer was paused.
19 (defvar org-timer-pause-time nil (#$ . 556))
20 #@154 Current countdown timer.
21 This is a timer object if there is an active countdown timer,
22 `paused' if there is a paused countdown timer, and nil
23 otherwise.
24 (defvar org-timer-countdown-timer nil (#$ . 640))
25 #@61 Title for notification displayed when a countdown finishes.
26 (defvar org-timer-countdown-timer-title nil (#$ . 849))
27 #@48 Regular expression used to match timer stamps.
28 (defconst org-timer-re "\\([-+]?[0-9]+\\):\\([0-9]\\{2\\}\\):\\([0-9]\\{2\\}\\)" (#$ . 971))
29 (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)
30 #@43 Hook run after relative timer is started.
31 (defvar org-timer-start-hook nil (#$ . 2316))
32 #@57 Hook run before relative or countdown timer is stopped.
33 (defvar org-timer-stop-hook nil (#$ . 2410))
34 #@56 Hook run before relative or countdown timer is paused.
35 (defvar org-timer-pause-hook nil (#$ . 2517))
36 #@58 Hook run after relative or countdown timer is continued.
37 (defvar org-timer-continue-hook nil (#$ . 2624))
38 #@40 Hook run after countdown timer is set.
39 (defvar org-timer-set-hook nil (#$ . 2736))
40 #@46 Hook run after countdown timer reaches zero.
41 (defvar org-timer-done-hook nil (#$ . 2825))
42 #@539 Set the starting time for the relative timer to now.
43 When called with prefix argument OFFSET, prompt the user for an offset time,
44 with the default taken from a timer stamp at point, if any.
45 If OFFSET is a string or an integer, it is directly taken to be the offset
46 without user interaction.
47 When called with a double prefix arg, all timer strings in the active
48 region will be shifted by a specific amount.  You will be prompted for
49 the amount, with the default to make the first timer string in
50 the region 0:00:00.
51
52 (fn &optional OFFSET)
53 (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"])
54 #@113 Pause or continue the relative or countdown timer.
55 With prefix arg STOP, stop it entirely.
56
57 (fn &optional STOP)
58 (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"])
59 #@39 Stop the relative or countdown timer.
60 (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])
61 #@531 Insert a H:MM:SS string from the timer into the buffer.
62 The first time this command is used, the timer is started.
63
64 When used with a `\[universal-argument]' prefix, force restarting the timer.
65
66 When used with a `\[universal-argument] \[universal-argument]' prefix, change all the timer strings
67 in the region by a fixed amount.  This can be used to re-calibrate
68 a timer that was not started at the correct moment.
69
70 If NO-INSERT is non-nil, return the string instead of inserting
71 it in the buffer.
72
73 (fn &optional RESTART NO-INSERT)
74 (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"])
75 #@23 Set the timer string.
76 (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)])
77 (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])
78 #@67 Change all h:mm:ss time in region by a DELTA.
79
80 (fn BEG END DELTA)
81 (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 #@82 Insert a description-type item with the current timer value.
83
84 (fn &optional ARG)
85 (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"])
86 #@84 If hms is a H:MM:SS string with missing hour or hour and minute, fix it.
87
88 (fn HMS)
89 (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)])
90 #@124 Convert h:mm:ss string to an integer time.
91 If the string starts with a minus sign, the integer will be negative.
92
93 (fn HMS)
94 (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)])
95 #@101 Convert integer S into h:mm:ss.
96 If the integer is negative, the string will start with "-".
97
98 (fn S)
99 (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)])
100 (defvar org-timer-mode-line-timer nil)
101 (defvar org-timer-mode-line-string nil)
102 #@111 Set the mode-line display for relative or countdown timer.
103 VALUE can be `on', `off', or `paused'.
104
105 (fn VALUE)
106 (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)])
107 #@41 Update the timer time in the mode line.
108 (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)])
109 #@51 Display the remaining time before the timer ends.
110 (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])
111 #@783 Prompt for a duration in minutes or hh:mm:ss and set a timer.
112
113 If `org-timer-default-timer' is not "0", suggest this value as
114 the default duration for the timer.  If a timer is already set,
115 prompt the user if she wants to replace it.
116
117 Called with a numeric prefix argument, use this numeric value as
118 the duration of the timer in minutes.
119
120 Called with a `C-u' prefix arguments, use `org-timer-default-timer'
121 without prompting the user for a duration.
122
123 With two `C-u' prefix arguments, use `org-timer-default-timer'
124 without prompting the user for a duration and automatically
125 replace any running timer.
126
127 By default, the timer duration will be set to the number of
128 minutes in the Effort property, if any.  You can ignore this by
129 using three `C-u' prefix arguments.
130
131 (fn &optional OPT)
132 (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"])
133 #@139 Start countdown timer that will last SECS.
134 TITLE will be appended to the notification message displayed when
135 time is up.
136
137 (fn SECS TITLE)
138 (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)])
139 #@64 Construct timer title from heading or file name of Org buffer.
140 (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)])
141 (provide 'org-timer)