From f06e2fb8328de1da04c473d80c03e6c6a0abb7cd Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 17 Jun 2015 10:50:16 +0200 Subject: Truncate the path portion of org tasks --- emacs/.emacs.d/site-lisp/org-init.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'emacs/.emacs.d/site-lisp') 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) -- cgit v1.2.3-54-g00ecf