summaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/site-lisp
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-06-17 10:50:16 +0200
committerGravatar Tom Willemse2015-06-17 10:50:16 +0200
commitf06e2fb8328de1da04c473d80c03e6c6a0abb7cd (patch)
tree6f5a0b4c34abb4e5af78c6586f9720c1bcaecf54 /emacs/.emacs.d/site-lisp
parent3933f42b393aea0d816f54d6c767fe034e0efd76 (diff)
downloaddotfiles-f06e2fb8328de1da04c473d80c03e6c6a0abb7cd.tar.gz
dotfiles-f06e2fb8328de1da04c473d80c03e6c6a0abb7cd.zip
Truncate the path portion of org tasks
Diffstat (limited to 'emacs/.emacs.d/site-lisp')
-rw-r--r--emacs/.emacs.d/site-lisp/org-init.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/emacs/.emacs.d/site-lisp/org-init.el b/emacs/.emacs.d/site-lisp/org-init.el
index e35af30..0934cf0 100644
--- a/emacs/.emacs.d/site-lisp/org-init.el
+++ b/emacs/.emacs.d/site-lisp/org-init.el
@@ -80,7 +80,9 @@
(let ((outline-path (org-format-outline-path
(cdr (org-get-outline-path)))))
(unless (string= outline-path "")
- (setq outline-path (concat "[ " outline-path " ] ")))
+ (let ((trunc-path (truncate-string-to-width
+ outline-path 25 nil nil "...")))
+ (setq outline-path (format "[%-25s] " trunc-path))))
outline-path))
(defun oni:org-heading-has-predecessor-p ()
@@ -180,6 +182,7 @@ predecessor if there is a non-DONE sibling defined before it."
(setq org-outline-path-complete-in-steps t)
(setq org-refile-allow-creating-parent-nodes t)
(setq org-refile-use-outline-path 'file)
+(setq org-refile-targets '((nil :maxlevel . 2)))
(setq org-return-follows-link t)
(setq org-src-fontify-natively t)
(setq org-tags-column (- 70))
@@ -211,7 +214,7 @@ predecessor if there is a non-DONE sibling defined before it."
(add-hook 'org-agenda-mode-hook 'org-agenda-to-appt)
-(add-to-list 'org-modules 'habit)
+(add-to-list 'org-modules 'org-habit)
(org-agenda-to-appt)
(ad-activate 'org-agenda-redo)