[Helm] Make new clock-in functionality for ‘helm-org’ a bit nicer
This commit is contained in:
parent
351b643669
commit
f5b20152dd
21
init.el
21
init.el
|
@ -922,12 +922,25 @@ are assumed to be of the form *.crt."
|
||||||
helm-source-bookmarks
|
helm-source-bookmarks
|
||||||
helm-source-bookmark-set))
|
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’
|
;; `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
|
(add-to-list 'helm-org-headings-actions
|
||||||
'("Clock in to this heading" . (lambda (marker)
|
'("Clock in to this heading"
|
||||||
(org-with-point-at marker
|
. helm-org--clock-in-at-heading)
|
||||||
(org-clock-in)))))))
|
t)
|
||||||
|
|
||||||
|
(bind-key "C-c c" 'helm-org-clock-in-at-heading helm-org-headings-map)))
|
||||||
|
|
||||||
(use-package ivy
|
(use-package ivy
|
||||||
:commands (ivy-mode
|
:commands (ivy-mode
|
||||||
|
|
Loading…
Reference in New Issue