(defun sd-adjust-time-transcriber (dif) "adds DIFference to every time-mark in transcriber-files" (interactive "NDifference number: ") (setq sd-time-regexp "[tT]ime=\"\\([1-90.]+\\)\"") (while (search-forward-regexp sd-time-regexp nil t) (if (not (= (string-to-number (match-string 1)) 0)) (replace-match (format "%.3f" (+ (string-to-number (match-string 1)) dif)) nil nil nil 1)))) (defun sd-adjust-time-shoebox (dif) "adds DIFference to every time-mark" (interactive "NDifference number: ") (setq sd-time-regexp "^\\\\ref.* \\([1-90.]+\\)$") (while (search-forward-regexp sd-time-regexp nil t) (if (not (= (string-to-number (match-string 1)) 0)) (replace-match (format "%08.3f" (+ (string-to-number (match-string 1)) dif)) nil nil nil 1))))