* lisp/org-duration.el (org-duration-units): Guard against recursive
load error when org-duration-units is set via the Customize interface
before org-duration is loaded.
This follows the same approach used by erc-nickserv-identify-mode in
the Emacs repository.
Reported-by: Mario Bourgoin <m.bourgoin@gmail.com>
Ref: https://orgmode.org/list/CAM0Tqh+u+L+UgZizJrH+a+W7Lo1stPJgTsRABxD3HobOnOCrNA@mail.gmail.com
* lisp/org-duration.el (org-duration-format): Add `compact' symbol.
(org-duration-set-regexps): Make white space between duration parts
optional
(org-duration-from-minutes): Handle `compact' symbol.
* testing/lisp/test-org-duration.el (test-org-duration/from-minutes):
(test-org-duration/p): Add tests.
* lisp/org-clock.el (org-clock-out):
* lisp/org.el (org-evaluate-time-range):
Avoid double-rounding of time-related values. Simplify.
* lisp/org-clock.el (org-resolve-clocks-if-idle):
Use time-since instead of open-coding most of it.
* lisp/org-agenda.el (org-agenda-show-clocking-issues):
* lisp/org-capture.el (org-capture-set-target-location):
* lisp/org-table.el (org-table-sum):
* lisp/org.el (org-babel-load-file, org-2ft, org-time-stamp)
(org-read-date-analyze, org-time-stamp-to-now):
Simplify.
Note(km): Many of the changes from 476066e89 have been dropped for
compatibility with older Emacsen.
Avoid some double-rounding of Lisp timestamps
476066e89d6f0bb87220da690b8a476bf9655b80
Paul Eggert
Fri Feb 22 18:33:57 2019 -0800
Emacs's bc511a64f6d made tree-wide changes to prefer https to http.
For Org, this resulted in the header of every lisp/*.el file being
changed. Make the same changes in lisp/*.el files that were added
since Org version 9.0.10 (the last version that was synced with
Emacs).
* lisp/org-duration.el (org-duration-to-minutes): Accept the empty
string.
* testing/lisp/test-org-duration.el (test-org-duration/to-minutes):
Add test.
For backward compatibility with `org-duration-string-to-minutes'
accept the empty string as a duration.
* lisp/org-duration.el (org-duration-to-minutes): Fix bug where the
same unit with a decimal unit would be matched multiple times.
* testing/lisp/test-org-duration.el (test-org-duration/to-minutes):
Fix test.
* lisp/org-duration.el (org-duration--h:mm-re):
(org-duration--h:mm:ss-re): Tolerate leading in trailing blanks.
Change into a defconst.
(org-duration-set-regexps): Tolerate leading in trailing blanks.
Reported-by: Detlef Steuer <steuer@unibw-hamburg.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112111>