summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ravi-init-org.el18
-rw-r--r--local.el9
2 files changed, 27 insertions, 0 deletions
diff --git a/lisp/ravi-init-org.el b/lisp/ravi-init-org.el
index 50a54f4..d66a6cf 100644
--- a/lisp/ravi-init-org.el
+++ b/lisp/ravi-init-org.el
@@ -30,6 +30,7 @@
;; The following lines are always needed. Choose your own keys.
:bind (("C-c l" . org-store-link)
+ ("H-o" . org-capture)
("H--" . org-agenda))
:config
(progn
@@ -45,6 +46,16 @@
(use-package ox-rst)
(use-package ox-impress-js)
+ ;; Default file locations
+ (setq org-directory "~/Documents/org")
+ (defvar ravi/one-org-agenda-file (expand-file-name "agenda.files" org-directory))
+ (setq org-agenda-files ravi/one-org-agenda-file)
+ (unless (file-exists-p ravi/one-org-agenda-file)
+ ;; http://stackoverflow.com/a/14072295/1219634
+ ;; touch `ravi/one-org-agenda-file'
+ (write-region "" :ignore ravi/one-org-agenda-file))
+ (setq org-default-notes-file (expand-file-name "notes.org" org-directory))
+
(setq org-src-fontify-natively t)
(setq org-modules (quote (org-bbdb
org-bibtex
@@ -73,5 +84,12 @@
)
)
+(use-package org-capture
+ :defer t
+ :ensure nil
+ :config
+ (when (fboundp 'ravi/setup-org-capture)
+ (ravi/setup-org-capture)))
+
(provide 'ravi-init-org)
;;; ravi-init-org.el ends here
diff --git a/local.el b/local.el
index 6351573..678999e 100644
--- a/local.el
+++ b/local.el
@@ -34,5 +34,14 @@
(defalias 'ravi-license-header 'ravi/normal-license-header)
+;; Org-capture set-up
+(defun ravi/setup-org-capture ()
+ (add-to-list 'org-capture-templates
+ '("n" ;`org-capture' binding + n
+ "Note"
+ entry
+ (file "") ;empty string defaults to `org-default-notes-file'
+ "\n* %?\n Context:\n %i\n Entered on %U")))
+
(provide 'local)
;;; local.el ends here