summaryrefslogtreecommitdiff
path: root/lisp/org
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2023-05-14 21:04:37 -0400
committerKyle Meyer <kyle@kyleam.com>2023-05-14 21:04:37 -0400
commit95a724abaaca40e3fbad69593cb9fab39a249742 (patch)
tree3deaed4ea916de5580431d219fa3a50535f25472 /lisp/org
parentc665ca79ff47f7c2c0b0625069f4caa69162f1db (diff)
downloademacs-95a724abaaca40e3fbad69593cb9fab39a249742.tar.gz
emacs-95a724abaaca40e3fbad69593cb9fab39a249742.tar.bz2
emacs-95a724abaaca40e3fbad69593cb9fab39a249742.zip
Update to Org 9.6.6
Diffstat (limited to 'lisp/org')
-rw-r--r--lisp/org/org-clock.el103
-rw-r--r--lisp/org/org-version.el4
-rw-r--r--lisp/org/org.el2
3 files changed, 55 insertions, 54 deletions
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index f9daf3f14d8..d7fe14cd5e1 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -3062,57 +3062,58 @@ PROPERTIES: The list properties specified in the `:properties' parameter
Otherwise, return nil."
(interactive)
(let ((origin (point))) ;; `save-excursion' may not work when deleting.
- (save-excursion
- (beginning-of-line 1)
- (skip-chars-forward " \t")
- (when (looking-at org-clock-string)
- (let ((re (concat "[ \t]*" org-clock-string
- " *[[<]\\([^]>]+\\)[]>]\\(-+[[<]\\([^]>]+\\)[]>]"
- "\\([ \t]*=>.*\\)?\\)?"))
- ts te h m s neg)
- (cond
- ((not (looking-at re))
- nil)
- ((not (match-end 2))
- (when (and (equal (marker-buffer org-clock-marker) (current-buffer))
- (> org-clock-marker (point))
- (<= org-clock-marker (line-end-position)))
- ;; The clock is running here
- (setq org-clock-start-time
- (org-time-string-to-time (match-string 1)))
- (org-clock-update-mode-line)))
- (t
- ;; Prevent recursive call from `org-timestamp-change'.
- (cl-letf (((symbol-function 'org-clock-update-time-maybe) #'ignore))
- ;; Update timestamps.
- (save-excursion
- (goto-char (match-beginning 1)) ; opening timestamp
- (save-match-data (org-timestamp-change 0 'day)))
- ;; Refresh match data.
- (looking-at re)
- (save-excursion
- (goto-char (match-beginning 3)) ; closing timestamp
- (save-match-data (org-timestamp-change 0 'day))))
- ;; Refresh match data.
- (looking-at re)
- (and (match-end 4) (delete-region (match-beginning 4) (match-end 4)))
- (end-of-line 1)
- (setq ts (match-string 1)
- te (match-string 3))
- (setq s (- (org-time-string-to-seconds te)
- (org-time-string-to-seconds ts))
- neg (< s 0)
- s (abs s)
- h (floor (/ s 3600))
- s (- s (* 3600 h))
- m (floor (/ s 60))
- s (- s (* 60 s)))
- (insert " => " (format (if neg "-%d:%02d" "%2d:%02d") h m))
- t)))))
- ;; Move back to initial position, but never beyond updated
- ;; clock.
- (unless (< (point) origin)
- (goto-char origin))))
+ (prog1
+ (save-excursion
+ (beginning-of-line 1)
+ (skip-chars-forward " \t")
+ (when (looking-at org-clock-string)
+ (let ((re (concat "[ \t]*" org-clock-string
+ " *[[<]\\([^]>]+\\)[]>]\\(-+[[<]\\([^]>]+\\)[]>]"
+ "\\([ \t]*=>.*\\)?\\)?"))
+ ts te h m s neg)
+ (cond
+ ((not (looking-at re))
+ nil)
+ ((not (match-end 2))
+ (when (and (equal (marker-buffer org-clock-marker) (current-buffer))
+ (> org-clock-marker (point))
+ (<= org-clock-marker (line-end-position)))
+ ;; The clock is running here
+ (setq org-clock-start-time
+ (org-time-string-to-time (match-string 1)))
+ (org-clock-update-mode-line)))
+ (t
+ ;; Prevent recursive call from `org-timestamp-change'.
+ (cl-letf (((symbol-function 'org-clock-update-time-maybe) #'ignore))
+ ;; Update timestamps.
+ (save-excursion
+ (goto-char (match-beginning 1)) ; opening timestamp
+ (save-match-data (org-timestamp-change 0 'day)))
+ ;; Refresh match data.
+ (looking-at re)
+ (save-excursion
+ (goto-char (match-beginning 3)) ; closing timestamp
+ (save-match-data (org-timestamp-change 0 'day))))
+ ;; Refresh match data.
+ (looking-at re)
+ (and (match-end 4) (delete-region (match-beginning 4) (match-end 4)))
+ (end-of-line 1)
+ (setq ts (match-string 1)
+ te (match-string 3))
+ (setq s (- (org-time-string-to-seconds te)
+ (org-time-string-to-seconds ts))
+ neg (< s 0)
+ s (abs s)
+ h (floor (/ s 3600))
+ s (- s (* 3600 h))
+ m (floor (/ s 60))
+ s (- s (* 60 s)))
+ (insert " => " (format (if neg "-%d:%02d" "%2d:%02d") h m))
+ t)))))
+ ;; Move back to initial position, but never beyond updated
+ ;; clock.
+ (unless (< (point) origin)
+ (goto-char origin)))))
(defun org-clock-save ()
"Persist various clock-related data to disk.
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index ef61dc9cbd6..8d93af2c20d 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -5,13 +5,13 @@
(defun org-release ()
"The release version of Org.
Inserted by installing Org mode or when a release is made."
- (let ((org-release "9.6.5"))
+ (let ((org-release "9.6.6"))
org-release))
;;;###autoload
(defun org-git-version ()
"The Git version of Org mode.
Inserted by installing Org or when a release is made."
- (let ((org-git-version "release_9.6.5-3-g2993f4"))
+ (let ((org-git-version "release_9.6.6"))
org-git-version))
(provide 'org-version)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index f4aa28cc486..d3e14fecec3 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -9,7 +9,7 @@
;; URL: https://orgmode.org
;; Package-Requires: ((emacs "26.1"))
-;; Version: 9.6.5
+;; Version: 9.6.6
;; This file is part of GNU Emacs.
;;