ELisp function to org-todo current clocked task and keep current buffer still
0
votes
1
answer
46
views
Image that I have a clocked task and I want clock-out it and set the heading to done the same time.Most importantly,I don't want to change my focus on my current buffer,I tried to write a function
(defun ql/done-current-clocked-task ()
(interactive)
(with-current-buffer
(if (funcall 'org-clocking-p)
(progn
(org-clock-goto)
(org-todo 'done))
(message "No active clock!"))
)
)
But it failed to retutn to my original buffer but stop at the org file's buffer.I have no ideas.
Asked by Qiu Lin
(1 rep)
Apr 22, 2020, 02:18 PM
Last activity: Apr 23, 2020, 02:24 AM
Last activity: Apr 23, 2020, 02:24 AM