diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 343264f7e..1f0870e62 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -164,6 +164,13 @@ which case all digits and capital letters are used up by the :group 'org-clock :type 'integer) +(defcustom org-clock-default-tasks nil + "List of pairs (KEY . ID) ..." + :group 'org-clock + :type '(repeat (cons :tag "Key and ID" + (character :tag "Access char") + (string :tag "Task ID")))) + (defcustom org-clock-goto-may-find-recent-task t "Non-nil means `org-clock-goto' can go to recent task if no active clock." :group 'org-clock @@ -622,6 +629,15 @@ there is no recent clock to choose from." (+ i (- ?A 10))) m)) (if (fboundp 'int-to-char) (setf (car s) (int-to-char (car s)))) (push s sel-list))) + (let (has-elt m) + (dolist (charid org-clock-default-tasks) + (setq m (org-id-find (cdr charid) 'marker)) + (when m + (unless has-elt + (setq has-elt t) + (insert (org-add-props "Default Tasks\n" nil 'face 'bold))) + (setq s (org-clock-insert-selection-line (car charid) m)) + (push s sel-list)))) (run-hooks 'org-clock-before-select-task-hook) (goto-char (point-min)) ;; Set min-height relatively to circumvent a possible but in