Update to Org 9.6.6
This commit is contained in:
parent
c665ca79ff
commit
95a724abaa
4 changed files with 56 additions and 55 deletions
|
@ -1,5 +1,5 @@
|
||||||
% Reference Card for Org Mode
|
% Reference Card for Org Mode
|
||||||
\def\orgversionnumber{9.6.5}
|
\def\orgversionnumber{9.6.6}
|
||||||
\def\versionyear{2023} % latest update
|
\def\versionyear{2023} % latest update
|
||||||
\input emacsver.tex
|
\input emacsver.tex
|
||||||
|
|
||||||
|
|
|
@ -3062,57 +3062,58 @@ PROPERTIES: The list properties specified in the `:properties' parameter
|
||||||
Otherwise, return nil."
|
Otherwise, return nil."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((origin (point))) ;; `save-excursion' may not work when deleting.
|
(let ((origin (point))) ;; `save-excursion' may not work when deleting.
|
||||||
(save-excursion
|
(prog1
|
||||||
(beginning-of-line 1)
|
(save-excursion
|
||||||
(skip-chars-forward " \t")
|
(beginning-of-line 1)
|
||||||
(when (looking-at org-clock-string)
|
(skip-chars-forward " \t")
|
||||||
(let ((re (concat "[ \t]*" org-clock-string
|
(when (looking-at org-clock-string)
|
||||||
" *[[<]\\([^]>]+\\)[]>]\\(-+[[<]\\([^]>]+\\)[]>]"
|
(let ((re (concat "[ \t]*" org-clock-string
|
||||||
"\\([ \t]*=>.*\\)?\\)?"))
|
" *[[<]\\([^]>]+\\)[]>]\\(-+[[<]\\([^]>]+\\)[]>]"
|
||||||
ts te h m s neg)
|
"\\([ \t]*=>.*\\)?\\)?"))
|
||||||
(cond
|
ts te h m s neg)
|
||||||
((not (looking-at re))
|
(cond
|
||||||
nil)
|
((not (looking-at re))
|
||||||
((not (match-end 2))
|
nil)
|
||||||
(when (and (equal (marker-buffer org-clock-marker) (current-buffer))
|
((not (match-end 2))
|
||||||
(> org-clock-marker (point))
|
(when (and (equal (marker-buffer org-clock-marker) (current-buffer))
|
||||||
(<= org-clock-marker (line-end-position)))
|
(> org-clock-marker (point))
|
||||||
;; The clock is running here
|
(<= org-clock-marker (line-end-position)))
|
||||||
(setq org-clock-start-time
|
;; The clock is running here
|
||||||
(org-time-string-to-time (match-string 1)))
|
(setq org-clock-start-time
|
||||||
(org-clock-update-mode-line)))
|
(org-time-string-to-time (match-string 1)))
|
||||||
(t
|
(org-clock-update-mode-line)))
|
||||||
;; Prevent recursive call from `org-timestamp-change'.
|
(t
|
||||||
(cl-letf (((symbol-function 'org-clock-update-time-maybe) #'ignore))
|
;; Prevent recursive call from `org-timestamp-change'.
|
||||||
;; Update timestamps.
|
(cl-letf (((symbol-function 'org-clock-update-time-maybe) #'ignore))
|
||||||
(save-excursion
|
;; Update timestamps.
|
||||||
(goto-char (match-beginning 1)) ; opening timestamp
|
(save-excursion
|
||||||
(save-match-data (org-timestamp-change 0 'day)))
|
(goto-char (match-beginning 1)) ; opening timestamp
|
||||||
;; Refresh match data.
|
(save-match-data (org-timestamp-change 0 'day)))
|
||||||
(looking-at re)
|
;; Refresh match data.
|
||||||
(save-excursion
|
(looking-at re)
|
||||||
(goto-char (match-beginning 3)) ; closing timestamp
|
(save-excursion
|
||||||
(save-match-data (org-timestamp-change 0 'day))))
|
(goto-char (match-beginning 3)) ; closing timestamp
|
||||||
;; Refresh match data.
|
(save-match-data (org-timestamp-change 0 'day))))
|
||||||
(looking-at re)
|
;; Refresh match data.
|
||||||
(and (match-end 4) (delete-region (match-beginning 4) (match-end 4)))
|
(looking-at re)
|
||||||
(end-of-line 1)
|
(and (match-end 4) (delete-region (match-beginning 4) (match-end 4)))
|
||||||
(setq ts (match-string 1)
|
(end-of-line 1)
|
||||||
te (match-string 3))
|
(setq ts (match-string 1)
|
||||||
(setq s (- (org-time-string-to-seconds te)
|
te (match-string 3))
|
||||||
(org-time-string-to-seconds ts))
|
(setq s (- (org-time-string-to-seconds te)
|
||||||
neg (< s 0)
|
(org-time-string-to-seconds ts))
|
||||||
s (abs s)
|
neg (< s 0)
|
||||||
h (floor (/ s 3600))
|
s (abs s)
|
||||||
s (- s (* 3600 h))
|
h (floor (/ s 3600))
|
||||||
m (floor (/ s 60))
|
s (- s (* 3600 h))
|
||||||
s (- s (* 60 s)))
|
m (floor (/ s 60))
|
||||||
(insert " => " (format (if neg "-%d:%02d" "%2d:%02d") h m))
|
s (- s (* 60 s)))
|
||||||
t)))))
|
(insert " => " (format (if neg "-%d:%02d" "%2d:%02d") h m))
|
||||||
;; Move back to initial position, but never beyond updated
|
t)))))
|
||||||
;; clock.
|
;; Move back to initial position, but never beyond updated
|
||||||
(unless (< (point) origin)
|
;; clock.
|
||||||
(goto-char origin))))
|
(unless (< (point) origin)
|
||||||
|
(goto-char origin)))))
|
||||||
|
|
||||||
(defun org-clock-save ()
|
(defun org-clock-save ()
|
||||||
"Persist various clock-related data to disk.
|
"Persist various clock-related data to disk.
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
(defun org-release ()
|
(defun org-release ()
|
||||||
"The release version of Org.
|
"The release version of Org.
|
||||||
Inserted by installing Org mode or when a release is made."
|
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))
|
org-release))
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun org-git-version ()
|
(defun org-git-version ()
|
||||||
"The Git version of Org mode.
|
"The Git version of Org mode.
|
||||||
Inserted by installing Org or when a release is made."
|
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))
|
org-git-version))
|
||||||
|
|
||||||
(provide 'org-version)
|
(provide 'org-version)
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
;; URL: https://orgmode.org
|
;; URL: https://orgmode.org
|
||||||
;; Package-Requires: ((emacs "26.1"))
|
;; Package-Requires: ((emacs "26.1"))
|
||||||
|
|
||||||
;; Version: 9.6.5
|
;; Version: 9.6.6
|
||||||
|
|
||||||
;; This file is part of GNU Emacs.
|
;; This file is part of GNU Emacs.
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Reference in a new issue