diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-11-15 21:18:15 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-11-15 21:18:15 -0500 |
commit | 18339d46597d0c6d5a949f55f8a2c3235d61bb32 (patch) | |
tree | 6928c0caa54208584c8a8226834895b85b259f84 /lisp | |
parent | f9b78be28c5fc476b3bced9f866d18bf4099206b (diff) | |
download | emacs.d-18339d46597d0c6d5a949f55f8a2c3235d61bb32.tar.gz |
Rework command for opening default Org notes file
Almost every time I used `km/open-main-orgfile', I would jump to the
"Inbox" heading right after, so just have the command do that for me.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-org.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/init-org.el b/lisp/init-org.el index 66dc1e7..555d80e 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -45,10 +45,6 @@ (defadvice org-open-file (after km/org-open-add-to-recentf activate) (recentf-add-file path)) -(defun km/open-main-orgfile () - (interactive) - (find-file org-default-notes-file)) - (defun km/org-open-file-at-point () "Open file at point with `org-open-file'." (interactive) @@ -105,7 +101,6 @@ The hook functions and `org-store-link' are called within a (define-key km/global-org-map "a" 'org-agenda) (define-key km/global-org-map "b" 'org-iswitchb) (define-key km/global-org-map "s" 'org-save-all-org-buffers) -(define-key km/global-org-map "m" 'km/open-main-orgfile) (define-key km/global-org-map "p" 'poporg-dwim) (key-chord-define-global ",a" 'org-agenda) @@ -328,6 +323,16 @@ displayed in the agenda." (define-key km/global-org-map "n" 'km/org-agenda-add-or-remove-file) +(defun km/org-open-default-notes-file-inbox () + "Open \"Inbox\" heading of `org-default-notes-file'." + (interactive) + (find-file org-default-notes-file) + (goto-char (org-find-exact-headline-in-buffer "Inbox" nil t)) + (recenter-top-bottom 0) + (show-children)) + +(define-key km/global-org-map "m" 'km/org-open-default-notes-file-inbox) + (setq org-agenda-custom-commands '(("d" todo "DONE" nil) ("u" "Unschedule TODO entries" alltodo "" |