added org template for schedluled entries

This commit is contained in:
Thomas von Dein
2019-05-13 12:51:03 +02:00
parent d10a3a9519
commit 8721552771

59
.emacs
View File

@@ -1,4 +1,4 @@
;; Toms Emacs Config - portable - version ("20190412.01") -*-emacs-lisp-*- ;; Toms Emacs Config - portable - version ("20190513.01") -*-emacs-lisp-*-
;; * Introduction ;; * Introduction
;; This is my emacs config, it is more than twenty years old. It ;; This is my emacs config, it is more than twenty years old. It
@@ -772,6 +772,9 @@
;; 20190412.01 ;; 20190412.01
;; - added yaml mode and highlight indent mode ;; - added yaml mode and highlight indent mode
;; 20190513.01
;; - added scheduled task org capture template along with wrappers etc
;; ** TODO ;; ** TODO
;; - check helpful https://github.com/wilfred/helpful ;; - check helpful https://github.com/wilfred/helpful
@@ -799,7 +802,7 @@
;; My emacs config has a version (consisting of a timestamp with a ;; My emacs config has a version (consisting of a timestamp with a
;; serial), which I display in the mode line. So I can clearly see, if ;; serial), which I display in the mode line. So I can clearly see, if
;; I'm using an outdated config somewhere. ;; I'm using an outdated config somewhere.
(defvar tvd-emacs-version "20190412.01") (defvar tvd-emacs-version "20190513.01")
;; -------------------------------------------------------------------------------- ;; --------------------------------------------------------------------------------
@@ -3859,6 +3862,13 @@ down and unfold it, otherwise jump paragraph as usual."
("t" "Todo Item" entry (file+headline tvd-org-file "Manual-Agenda-Tasks") ("t" "Todo Item" entry (file+headline tvd-org-file "Manual-Agenda-Tasks")
"* TODO %^{title}\n:LOGBOOK:\n%u:END:\n" :prepend t :immediate-finish t) "* TODO %^{title}\n:LOGBOOK:\n%u:END:\n" :prepend t :immediate-finish t)
;; ("s" "Scheduled Item" entry (file+headline tvd-org-file "Scheduled-Agenda-Tasks")
;; "* TODO %^{title}\n:SCHEDULED: <%(org-read-date)>\nLOGBOOK:\n%u:END:\n" :prepend t :immediate-finish t)
("s" "Scheduled Item" entry (file+headline tvd-org-file "Scheduled-Agenda-Tasks")
"* TODO %^{title}\n:SCHEDULED: <%^t>\nLOGBOOK:\n%u:END:\n" :prepend t :immediate-finish t)
("j" "Journal" entry (file+headline tvd-org-file "Kurznotizen") ("j" "Journal" entry (file+headline tvd-org-file "Kurznotizen")
"* TODO %^{title}\n%u\n %i%?\n" :prepend t :jump-to-captured t) "* TODO %^{title}\n%u\n %i%?\n" :prepend t :jump-to-captured t)
@@ -3985,16 +3995,26 @@ down and unfold it, otherwise jump paragraph as usual."
;; A wrapper which executes an org capture directly. `t' is the ;; A wrapper which executes an org capture directly. `t' is the
;; shortcut for the capture, defined above in org mode. ;; shortcut for the capture, defined above in org mode.
(defun tvd-org-agenda-capture (&optional vanilla) (defun tvd-org-agenda-capture (task)
"Capture a task in agenda mode, using the date at point. "Capture a task in agenda mode, using the date at point"
(interactive)
If VANILLA is non-nil, run the standard `org-capture'."
(interactive "P")
(if vanilla
(org-capture)
(let ((org-overriding-default-time (org-get-cursor-date))) (let ((org-overriding-default-time (org-get-cursor-date)))
(org-capture nil "t") (call-interactively (org-capture nil task))
(org-agenda-redo t)))) (org-agenda-redo t)))
(defun tvd-org-agenda-capture-todo ()
"Capture a todo task in agenda mode"
(interactive)
(tvd-org-agenda-capture "t"))
(defun tvd-org-agenda-capture-scheduled ()
"Capture a scheduled task in agenda mode"
(interactive)
(tvd-org-agenda-capture "s"))
;; Sometimes it is nice to see the agenda alone, so I press ;; Sometimes it is nice to see the agenda alone, so I press
;; `o'. However, since follow mode is enabled, once I move point, the ;; `o'. However, since follow mode is enabled, once I move point, the
@@ -4022,11 +4042,12 @@ Org Agenda (_q_uit)
^Tasks^ ^Options^ ^Movement^ ^Tasks^ ^Options^ ^Movement^
-^^^^^^------------------------------------------------------------------------------------- -^^^^^^-------------------------------------------------------------------------------------
_n_: create new task _f_: follow =?f? ENTER: switch to entry _n_: create new todo task _f_: follow =?f? ENTER: switch to entry
_d_: mark task done and archive _e_: entry =?e? C-<up>: go one entry up _N_: create new scheduled task _e_: entry =?e? C-<up>: go one entry up
_w_: mark task waiting _o_: one window C-<down>: go one entry down _d_: mark task done and archive _o_: one window C-<down>: go one entry down
_t_: toggle todo state ^^ M-<up>: move entry up _w_: mark task waiting ^^ M-<up>: move entry up
_z_: archive task ^^ M-<down>: move entry down _t_: toggle todo state ^^ M-<down>: move entry down
_z_: archive task ^ ^
_+_: increase prio ^Marking^ _+_: increase prio ^Marking^
_-_: decrease prio _m_: mark entry _-_: decrease prio _m_: mark entry
_g_: refresh _u_: un-mark entry _g_: refresh _u_: un-mark entry
@@ -4035,7 +4056,8 @@ _a_: add a note to the entry _B_: bulk action
" "
("a" tvd-org-agenda-edit-entry nil) ("a" tvd-org-agenda-edit-entry nil)
("n" tvd-org-agenda-capture nil) ("n" tvd-org-agenda-capture-todo nil)
("N" tvd-org-agenda-capture-scheduled nil)
("o" tvd-org-agenda-solitair nil) ("o" tvd-org-agenda-solitair nil)
("g" tvd-org-agenda-redo) ("g" tvd-org-agenda-redo)
("t" org-agenda-todo) ("t" org-agenda-todo)
@@ -4061,7 +4083,8 @@ _a_: add a note to the entry _B_: bulk action
org-log-into-drawer t org-log-into-drawer t
org-agenda-entry-text-mode t org-agenda-entry-text-mode t
org-agenda-sorting-strategy '(priority-down timestamp-down)) org-agenda-sorting-strategy '(priority-down timestamp-down))
(local-set-key (kbd "n") 'tvd-org-agenda-capture) (local-set-key (kbd "n") 'tvd-org-agenda-capture-todo)
(local-set-key (kbd "N") 'tvd-org-agenda-capture-scheduled)
(local-set-key (kbd "o") 'tvd-org-agenda-solitair) (local-set-key (kbd "o") 'tvd-org-agenda-solitair)
(local-set-key (kbd "a") 'tvd-org-agenda-edit-entry) (local-set-key (kbd "a") 'tvd-org-agenda-edit-entry)
(local-set-key (kbd "d") 'tvd-org-agenda-done) (local-set-key (kbd "d") 'tvd-org-agenda-done)