Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clock-in action #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion helm-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ NOTE: This will be slow on large org buffers."
'(("Go to heading" . helm-org-goto-marker)
("Open in indirect buffer `C-c i'" . helm-org--open-heading-in-indirect-buffer)
("Refile heading(s) (marked-to-selected|current-to-selected) `C-c w`" . helm-org--refile-heading-to)
("Insert link to this heading `C-c l`" . helm-org-insert-link-to-heading-at-marker))
("Insert link to this heading `C-c l`" . helm-org-insert-link-to-heading-at-marker)
("Clock-in this heading" . helm-org-clock-in))
"Default actions alist for `helm-source-org-headings-for-files'."
:group 'helm-org
:type '(alist :key-type string :value-type function))
Expand Down Expand Up @@ -413,6 +414,11 @@ will be refiled."
do (org-with-point-at victim
(org-refile nil nil rfloc))))))

(defun helm-org-clock-in (marker)
"Start the clock on the heading pointed by the MARKER."
(helm-org-goto-marker marker)
(org-clock-in))

(defun helm-org-in-buffer-preselect ()
"Return the current or closest visible heading as a regexp string."
(save-excursion
Expand Down