branch: externals/org
commit c2dc7a759453e33d3f8f851afc5a3c47cf1ad9b1
Merge: 22a724bb41 0d02d72627
Author: Ihor Radchenko <[email protected]>
Commit: Ihor Radchenko <[email protected]>
Merge branch 'bugfix'
---
lisp/org-clock.el | 16 +++++++++-------
lisp/org-timer.el | 2 +-
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 53d326e585..a1de045fe5 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1991,13 +1991,15 @@ Optional argument N tells to change by that many units."
(user-error "No active clock"))
(save-excursion ; Do not replace this with `with-current-buffer'.
(with-no-warnings (set-buffer (org-clocking-buffer)))
- (goto-char org-clock-marker)
- (if (looking-back (concat "^[ \t]*" org-clock-string ".*")
- (line-beginning-position))
- (progn (delete-region (1- (line-beginning-position))
(line-end-position))
- (org-remove-empty-drawer-at (point)))
- (message "Clock gone, cancel the timer anyway")
- (sit-for 2)))
+ (save-restriction
+ (widen)
+ (goto-char org-clock-marker)
+ (if (looking-back (concat "^[ \t]*" org-clock-string ".*")
+ (line-beginning-position))
+ (progn (delete-region (1- (line-beginning-position))
(line-end-position))
+ (org-remove-empty-drawer-at (point)))
+ (message "Clock gone, cancel the timer anyway")
+ (sit-for 2))))
(move-marker org-clock-marker nil)
(move-marker org-clock-hd-marker nil)
(setq org-clock-current-task nil)
diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index 3c853555b6..8eb6a8eb7d 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -436,7 +436,7 @@ using three \\[universal-argument] prefix arguments."
(and (not (equal opt '(64)))
effort-minutes
(number-to-string effort-minutes))
- (and (consp opt) default-timer)
+ (and (consp opt) (not (equal opt '(64))) default-timer)
(and (stringp opt) opt)
(read-from-minibuffer
"How much time left? (minutes or h:mm:ss) "