Truncate the path portion of org tasks

This commit is contained in:
Tom Willemse 2015-06-17 10:50:16 +02:00
parent 3933f42b39
commit f06e2fb832

View file

@ -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)