Skip to content

Commit

Permalink
org-ctrl-c-ctrl-c: Update timestamp at point inside clock lines
Browse files Browse the repository at this point in the history
* lisp/org.el (org-ctrl-c-ctrl-c): Update the timestamp at point, if
any; not just the clock sum.

Reported-by: "Bruce E. Robertson" <brucer42@gmail.com>
Link: https://orgmode.org/list/87mtjo2twj.fsf@gmail.com
  • Loading branch information
yantar92 committed Oct 11, 2022
1 parent 3f60acf commit dd22123
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lisp/org.el
Original file line number Diff line number Diff line change
Expand Up @@ -17307,7 +17307,12 @@ This command does many different things, depending on context:
((or `babel-call `inline-babel-call)
(let ((info (org-babel-lob-get-info context)))
(when info (org-babel-execute-src-block nil info nil type))))
(`clock (org-clock-update-time-maybe))
(`clock
(if (org-at-timestamp-p 'lax)
;; Update the timestamp as well. `org-timestamp-change'
;; will call `org-clock-update-time-maybe'.
(org-timestamp-change 0 'day)
(org-clock-update-time-maybe)))
(`dynamic-block
(save-excursion
(goto-char (org-element-property :post-affiliated context))
Expand Down

0 comments on commit dd22123

Please sign in to comment.