Function: org-timer-change-times-in-region
org-timer-change-times-in-region is an autoloaded, interactive and
byte-compiled function defined in org-timer.el.gz.
Signature
(org-timer-change-times-in-region BEG END DELTA)
Documentation
Change all h:mm:ss time in region BEG..END by a DELTA.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-timer.el.gz
;;;###autoload
(defun org-timer-change-times-in-region (beg end delta)
"Change all h:mm:ss time in region BEG..END by a DELTA."
(interactive
"r\nsEnter time difference like \"-1:08:26\". Default is first time to zero: ")
(let ((re "[-+]?[0-9]+:[0-9]\\{2\\}:[0-9]\\{2\\}") p)
(unless (string-match "\\S-" delta)
(save-excursion
(goto-char beg)
(when (re-search-forward re end t)
(setq delta (match-string 0))
(if (equal (string-to-char delta) ?-)
(setq delta (substring delta 1))
(setq delta (concat "-" delta))))))
(setq delta (org-timer-hms-to-secs (org-timer-fix-incomplete delta)))
(when (= delta 0) (error "No change"))
(save-excursion
(goto-char end)
(while (re-search-backward re beg t)
(setq p (point))
(replace-match
(save-match-data
(org-timer-secs-to-hms (+ (org-timer-hms-to-secs (match-string 0)) delta)))
t t)
(goto-char p)))))