[oni-org] Add function that I want to save and have no place for yet
This commit is contained in:
parent
83a70abae3
commit
817060db2c
1 changed files with 22 additions and 0 deletions
|
@ -1170,5 +1170,27 @@ placed above TARGET. Otherwise it will be placed below it."
|
||||||
(quit nil)))))
|
(quit nil)))))
|
||||||
(widen))))))
|
(widen))))))
|
||||||
|
|
||||||
|
(defun oni-org-clock+post-drawer ()
|
||||||
|
(if (and (markerp org-clock-hd-marker)
|
||||||
|
(marker-buffer org-clock-hd-marker))
|
||||||
|
(progn (set-buffer (marker-buffer org-clock-hd-marker))
|
||||||
|
(org-capture-put-target-region-and-position)
|
||||||
|
(widen)
|
||||||
|
(goto-char org-clock-hd-marker)
|
||||||
|
(let ((end (org-entry-end-position)))
|
||||||
|
(while (search-forward ":END:" end t))))
|
||||||
|
(user-error "No running clock that could be used as capture target")))
|
||||||
|
|
||||||
|
(defun init-find-weekly-review-file ()
|
||||||
|
(interactive)
|
||||||
|
(find-file (format-time-string "u:/documents/gtd/weekly-reviews/%Y-%W.org"))
|
||||||
|
(if (= (point-min) (point-max))
|
||||||
|
(progn
|
||||||
|
(insert (format-time-string "#+TITLE: Weekly Review Report for Week %-W %Y\n"))
|
||||||
|
(insert "\n")
|
||||||
|
(insert "See [[file:u:/documents/gtd/checklists/weekly-review.org][Weekly Review Checklist]]\n")
|
||||||
|
(insert "\n"))
|
||||||
|
(goto-char (point-min))))
|
||||||
|
|
||||||
(provide 'oni-org)
|
(provide 'oni-org)
|
||||||
;;; oni-org.el ends here
|
;;; oni-org.el ends here
|
||||||
|
|
Loading…
Reference in a new issue