| Server IP : 217.160.0.212 / Your IP : 216.73.216.15 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/org/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(byte-code "\300\301!\210\300\302!\207" [require cl-lib org-macs] 2)
#@70 Canonical time duration units.
See `org-duration-units' for details.
(defconst org-duration-canonical-units (byte-code "\300\301\302\303BE\207" [("min" . 1) ("h" . 60) "d" 1440] 4) (#$ . 153))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313\314\315\316\317\320\321&\210\300\322\302\303\323DD\324\306\325\306\326\312\327\320\330&\207" [custom-declare-variable org-duration-units funcall function #[0 "\300\301\302\303B\304\305B\306\307B\310\311B\257\207" [("min" . 1) ("h" . 60) "d" 1440 "w" 10080 "m" 43200 "y" 525960.0] 7 #1=""] "Conversion factor to minutes for a duration.\n\nEach entry has the form (UNIT . MODIFIER).\n\nIn a duration string, a number followed by UNIT is multiplied by\nthe specified number of MODIFIER to obtain a duration in minutes.\n\nFor example, the following value\n\n \\=`((\"min\" . 1)\n (\"h\" . 60)\n (\"d\" . ,(* 60 8))\n (\"w\" . ,(* 60 8 5))\n (\"m\" . ,(* 60 8 5 4))\n (\"y\" . ,(* 60 8 5 4 10)))\n\nis meaningful if you work an average of 8 hours per day, 5 days\na week, 4 weeks a month and 10 months a year.\n\nWhen setting this variable outside the Customize interface, make\nsure to call the following command:\n\n \\[org-duration-set-regexps]" :group org-agenda :version "26.1" :package-version (Org . "9.1") :set #[514 "\300\"\210\301\302!\205
\303 \207" [set-default featurep org-duration org-duration-set-regexps] 5 "\n\n(fn VAR VAL)"] :initialize custom-initialize-changed :type (choice (const :tag "H:MM" h:mm) (const :tag "H:MM:SS" h:mm:ss) (alist :key-type (string :tag "Unit") :value-type (number :tag "Modifier"))) org-duration-format #[0 "\300\207" [(("d") (special . h:mm))] 1 #1#] "Format definition for a duration.\n\nThe value can be set to, respectively, the symbols `h:mm:ss' or\n`h:mm', which means a duration is expressed as, respectively,\na \"H:MM:SS\" or \"H:MM\" string.\n\nAlternatively, the value can be a list of entries following the\npattern:\n\n (UNIT . REQUIRED?)\n\nUNIT is a unit string, as defined in `org-duration-units'. The\ntime duration is formatted using only the time components that\nare specified here.\n\nUnits with a zero value are skipped, unless REQUIRED? is non-nil.\nIn that case, the unit is always used.\n\nThe list can also contain one of the following special entries:\n\n (special . h:mm)\n (special . h:mm:ss)\n\n Units shorter than an hour are ignored. The hours and\n minutes part of the duration is expressed unconditionally\n with H:MM, or H:MM:SS, pattern.\n\n (special . PRECISION)\n\n A duration is expressed with a single unit, PRECISION being\n the number of decimal places to show. The unit chosen is the\n first one required or with a non-zero integer part. If there\n is no such unit, the smallest one is used.\n\nEventually, if the list contains the symbol `compact', the\nduration is expressed in a compact form, without any white space\nbetween units.\n\nFor example,\n\n ((\"d\" . nil) (\"h\" . t) (\"min\" . t))\n\nmeans a duration longer than a day is expressed in days, hours\nand minutes, whereas a duration shorter than a day is always\nexpressed in hours and minutes, even when shorter than an hour.\n\nOn the other hand, the value\n\n ((\"d\" . nil) (\"min\" . nil))\n\nmeans a duration longer than a day is expressed in days and\nminutes, whereas a duration shorter than a day is expressed\nentirely in minutes, even when longer than an hour.\n\nThe following format\n\n ((\"d\" . nil) (special . h:mm))\n\nmeans that any duration longer than a day is expressed with both\na \"d\" unit and a \"H:MM\" part, whereas a duration shorter than\na day is expressed only as a \"H:MM\" string.\n\nEventually,\n\n ((\"d\" . nil) (\"h\" . nil) (special . 2))\n\nexpresses a duration longer than a day as a decimal number, with\na 2-digits fractional part, of \"d\" unit. A duration shorter\nthan a day uses \"h\" unit instead." org-time org-clock (Org . "9.1") (choice (const :tag "Use H:MM" h:mm) (const :tag "Use H:MM:SS" h:mm:ss) (repeat :tag "Use units" (choice (cons :tag "Use units" (string :tag "Unit") (choice (const :tag "Skip when zero" nil) (const :tag "Always used" t))) (cons :tag "Use a single decimal unit" (const special) (integer :tag "Number of decimals")) (cons :tag "Use both units and H:MM" (const special) (const h:mm)) (cons :tag "Use both units and H:MM:SS" (const special) (const h:mm:ss)) (const :tag "Use compact form" compact))))] 16)
#@161 Regexp matching a duration expressed with H:MM or H:MM:SS format.
See `org-duration--h:mm:ss-re' to only match the latter. Hours
can use any number of digits.
(defconst org-duration--h:mm-re "\\`[ ]*[0-9]+\\(?::[0-9]\\{2\\}\\)\\{1,2\\}[ ]*\\'" (#$ . 4605))
#@148 Regexp matching a duration expressed H:MM:SS format.
See `org-duration--h:mm-re' to also support H:MM format. Hours
can use any number of digits.
(defconst org-duration--h:mm:ss-re "\\`[ ]*[0-9]+\\(?::[0-9]\\{2\\}\\)\\{2\\}[ ]*\\'" (#$ . 4872))
#@168 Regexp matching a duration with an unit.
Allowed units are defined in `org-duration-units'. Match group
1 contains the bare number. Match group 2 contains the unit.
(defvar org-duration--unit-re nil (#$ . 5127))
#@101 Regexp matching a duration expressed with units.
Allowed units are defined in `org-duration-units'.
(defvar org-duration--full-re nil (#$ . 5348))
#@210 Regexp matching a duration expressed with units and H:MM or H:MM:SS format.
Allowed units are defined in `org-duration-units'. Match group
1 contains units part. Match group 2 contains H:MM or H:MM:SS
part.
(defvar org-duration--mixed-re nil (#$ . 5502))
#@193 Return modifier associated to string UNIT.
When optional argument CANONICAL is non-nil, refer to
`org-duration-canonical-units' instead of `org-duration-units'.
(fn UNIT &optional CANONICAL)
(defalias 'org-duration--modifier #[513 "\302\203\n \202 \"A\206 \303\304\"\207" [org-duration-canonical-units org-duration-units assoc error "Unknown unit: %S"] 5 (#$ . 5766)])
#@31 Set duration related regexps.
(defalias 'org-duration-set-regexps #[0 "\305\306\307\310\311 \"\"\312\"P\313\314\n\"\313\315\n\"\211\207" [org-duration-canonical-units org-duration-units org-duration--unit-re org-duration--full-re org-duration--mixed-re "\\([0-9]+\\(?:\\.[0-9]*\\)?\\)[ ]*" regexp-opt mapcar car append t format "\\`\\(?:[ ]*%s\\)+[ ]*\\'" "\\`\\(?1:\\([ ]*%s\\)+\\)[ ]*\\(?2:[0-9]+\\(?::[0-9][0-9]\\)\\{1,2\\}\\)[ ]*\\'"] 7 (#$ . 6149) nil])
#@51 Non-nil when string S is a time duration.
(fn S)
(defalias 'org-duration-p #[257 "\211;\2052 \304\305\306#)\266\203\2062 \n\304\305\306#)\266\203\2062 \304\305\306#)\266\203\207" [org-duration--full-re inhibit-changing-match-data org-duration--mixed-re org-duration--h:mm-re nil t string-match] 8 (#$ . 6624)])
#@355 Return number of minutes of DURATION string.
When optional argument CANONICAL is non-nil, ignore
`org-duration-units' and use standard time units value.
A bare number is translated into minutes. The empty string is
translated into 0.0.
Return value as a float. Raise an error if duration format is
not recognized.
(fn DURATION &optional CANONICAL)
(defalias 'org-duration-to-minutes #[513 "\305\232\203 \306\207\247\203 \307!\207\310\311\312#)\266\203\203C \313\314\315\316\"\"\211\242\243\211\242\243\211\242\243\2069 \317\320\245\\\321_\\\207\n\310\311\312#)\266\203\203\201 \317\211\312#\203} \317\225\262\314\322\323\"!\322\324\"\325\"_\\\262\266\202U \307!\207\312\f\"\203\230 \322\323\"\322\324\"\326!\326!\\\207\327\310\311\312#)\266\203\203\256 \307\314!!\207\330\331\"\207" [org-duration--h:mm-re inhibit-changing-match-data org-duration--full-re org-duration--unit-re org-duration--mixed-re "" 0.0 float nil t string-match mapcar string-to-number split-string ":" 0 60.0 60 match-string 1 2 org-duration--modifier org-duration-to-minutes "\\`[0-9]+\\(\\.[0-9]*\\)?\\'" error "Invalid duration format: %S"] 12 (#$ . 6960)])
#@323 Return duration string for a given number of MINUTES.
Format duration according to `org-duration-format' or FMT, when
non-nil.
When optional argument CANONICAL is non-nil, ignore
`org-duration-units' and use standard time units value.
Raise an error if expected format is unknown.
(fn MINUTES &optional FMT CANONICAL)
(defalias 'org-duration-from-minutes #[769 "C\301\206 \211\302\267\2020 \303\304\242\305\245\306\242\305\"#\207\307\242!\306\305\242_\305\"\303\310\311\312\"#\207\211:\204; \313\314\"\207\315\316\236\262\211:\203\270 \211\242\211\316=\203\261 \243\211\317>\203\250 \320\321\322 \"\"\211\205m \323\324\325\321\326\f\"\"\"\211\203y \242W\203\202 \311\242#\207\211\307 \242!\245_\242Z\327>\311#?\205\241 \330\311 \"Q\207#\207#\207#\207" [org-duration-format #[771 "\300\236A\211\205 \301!\204 \302\303\"\205 \304\305\"\262\306\307\310\"\311\312\"\"\313>\2030 \314\2021 \315\203\\ \316\311\317#\"\206I \320!@\262@\321\"\304\322\n\242!\245\"P\207\323\324\311\325 $\314#\326\327\203t \330\202u \331\314\327\332\314##\266\202!\206\225 \320!\211\242\211\242\243\333P\266\202\262\262\207" [special wholenump error "Unknown formatting directive: %S" format "%%.%df" sort cl-remove-if #[257 "\211\300=\203 \301\207\211:\203 \211\242\211\302=\205 \301\207\303\207" [compact t special nil] 4 "\n\n(fn PAIR)"] make-closure #[514 "\301@\300\"\301@\300\"V\207" [V0 org-duration--modifier] 6 "\n\n(fn A B)"] compact #1="" " " cl-find-if #[257 "\211:\205 \211\242\243\211\206 \302\301\"\300\242X\266\202\207" [V0 V1 org-duration--modifier] 6 "\n\n(fn PAIR)"] last org-duration--modifier float org-string-nw-p mapconcat #[257 "\211\242\243\303\301\"\211\300\242X\203% \304\300\242\"\300\211\242_Z\240\210\305\306\302$\207\203. \302\307Q\207\310\207" [V0 V1 V2 org-duration--modifier floor format "%s%d%s" "0" #1#] 10 "\n\n(fn UNITS)"] nil replace-regexp-in-string "\\`\\([ ]*\n\\)+" "\\`[ \n
]+" "[ \n
]+\\'" "0"] 16 "\n\n(fn MINUTES CANONICAL DURATION-FORMAT)"] #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (h:mm 14 h:mm:ss 28)) format "%d:%02d" 60 mod floor "%s:%02d" org-duration-from-minutes h:mm error "Invalid duration format specification: %S" nil special (h:mm h:mm:ss) cl-remove-if-not make-closure #[257 "\211:\205 \211\242\211;\205 \301\300\"\302V\262\207" [V0 org-duration--modifier 60] 5 "\n\n(fn PAIR)"] apply min mapcar #[257 "\301@\300\"\207" [V0 org-duration--modifier] 4 "\n\n(fn P)"] compact " "] 19 (#$ . 8158)])
#@318 Non-nil when every duration in TIMES has "H:MM" or "H:MM:SS" format.
TIMES is a list of duration strings.
Return nil if any duration is expressed with units, as defined in
`org-duration-units'. Otherwise, if any duration is expressed
with "H:MM:SS" format, return `h:mm:ss'. Otherwise, return
`h:mm'.
(fn TIMES)
(defalias 'org-duration-h:mm-only-p #[257 "\304\3052a \211\203Z \211@\304\306\307#)\266\203\203$ \310\305\304\"\210\202S \n\304\306\307#)\266\203\203<