[Helm] Make new clock-in functionality for ‘helm-org’ a bit nicer

This commit is contained in:
dbo 2018-07-08 19:16:29 +02:00
parent 351b643669
commit f5b20152dd
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 17 additions and 4 deletions

21
init.el
View File

@ -922,12 +922,25 @@ are assumed to be of the form *.crt."
helm-source-bookmarks
helm-source-bookmark-set))
;; Make clocking in the new default action for
;; Add action to clock in at current heading to
;; `helm-org-agenda-files-headings
(defun helm-org--clock-in-at-heading (marker)
"Clock in to current heading at MARKER."
(org-with-point-at marker
(org-clock-in)))
(defun helm-org-clock-in-at-heading ()
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-org--clock-in-at-heading)))
(add-to-list 'helm-org-headings-actions
'("Clock in to this heading" . (lambda (marker)
(org-with-point-at marker
(org-clock-in)))))))
'("Clock in to this heading"
. helm-org--clock-in-at-heading)
t)
(bind-key "C-c c" 'helm-org-clock-in-at-heading helm-org-headings-map)))
(use-package ivy
:commands (ivy-mode