Add imalison prefix to capture template funcs
This commit is contained in:
parent
e14da00dea
commit
3cebedef6d
@ -1180,7 +1180,20 @@ Sets environment variables by starting a shell
|
|||||||
(interactive)
|
(interactive)
|
||||||
(org-map-entries 'org-archive-if-completed))
|
(org-map-entries 'org-archive-if-completed))
|
||||||
|
|
||||||
(cl-defun org-capture-make-todo-template
|
(cl-defun imalison:make-org-template (&key (content "%?"))
|
||||||
|
(with-temp-buffer
|
||||||
|
(org-mode)
|
||||||
|
(insert content)
|
||||||
|
(org-set-property "CREATED"
|
||||||
|
(with-temp-buffer
|
||||||
|
(org-insert-time-stamp
|
||||||
|
(org-current-effective-time) t t)))
|
||||||
|
(buffer-substring-no-properties (point-min) (point-max))))
|
||||||
|
|
||||||
|
(defun imalison:make-org-template-from-file (filename)
|
||||||
|
(imalison:make-org-template (imalison:get-string-from-file filename)))
|
||||||
|
|
||||||
|
(cl-defun imalison:make-org-todo-template
|
||||||
(&key (content "%?") (creation-state "TODO"))
|
(&key (content "%?") (creation-state "TODO"))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(org-mode)
|
(org-mode)
|
||||||
@ -1225,8 +1238,8 @@ Sets environment variables by starting a shell
|
|||||||
(cond ((eq major-mode 'org-mode) (org-todo))
|
(cond ((eq major-mode 'org-mode) (org-todo))
|
||||||
((eq major-mode 'org-agenda-mode) (org-agenda-todo)))))
|
((eq major-mode 'org-agenda-mode) (org-agenda-todo)))))
|
||||||
|
|
||||||
(defun org-capture-make-linked-todo-template ()
|
(defun imalison:make-org-linked-todo-template ()
|
||||||
(org-capture-make-todo-template "%? %A"))
|
(imalison:make-org-todo-template "%? %A"))
|
||||||
|
|
||||||
(defun org-cmp-creation-times (a b)
|
(defun org-cmp-creation-times (a b)
|
||||||
(let ((a-created (get-date-created-from-agenda-entry a))
|
(let ((a-created (get-date-created-from-agenda-entry a))
|
||||||
@ -1394,11 +1407,11 @@ Sets environment variables by starting a shell
|
|||||||
|
|
||||||
(add-to-list 'org-capture-templates
|
(add-to-list 'org-capture-templates
|
||||||
`("t" "GTD Todo (Linked)" entry (file ,imalison:org-gtd-file)
|
`("t" "GTD Todo (Linked)" entry (file ,imalison:org-gtd-file)
|
||||||
(function org-capture-make-linked-todo-template)))
|
(function imalison:make-org-linked-todo-template)))
|
||||||
|
|
||||||
(add-to-list 'org-capture-templates
|
(add-to-list 'org-capture-templates
|
||||||
`("g" "GTD Todo" entry (file ,imalison:org-gtd-file)
|
`("g" "GTD Todo" entry (file ,imalison:org-gtd-file)
|
||||||
(function org-capture-make-todo-template)))
|
(function imalison:make-org-todo-template)))
|
||||||
|
|
||||||
(add-to-list 'org-capture-templates
|
(add-to-list 'org-capture-templates
|
||||||
`("y" "Calendar entry (Linked)" entry
|
`("y" "Calendar entry (Linked)" entry
|
||||||
@ -1548,8 +1561,8 @@ Sets environment variables by starting a shell
|
|||||||
(interactive "P")
|
(interactive "P")
|
||||||
(helm :sources (list (helm-source-org-capture-templates)
|
(helm :sources (list (helm-source-org-capture-templates)
|
||||||
(org-projectile:helm-source
|
(org-projectile:helm-source
|
||||||
(if arg (org-capture-make-linked-todo-template)
|
(if arg (imalison:make-org-linked-todo-template)
|
||||||
(org-capture-make-todo-template))))
|
(imalison:make-org-todo-template))))
|
||||||
:candidate-number-limit 99999
|
:candidate-number-limit 99999
|
||||||
:buffer "*helm org capture templates*"))))
|
:buffer "*helm org capture templates*"))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
Loading…
Reference in New Issue
Block a user