]> git.donarmstrong.com Git - lib.git/commitdiff
add timeline all command
authorDon Armstrong <don@donarmstrong.com>
Mon, 12 Jun 2017 14:43:24 +0000 (09:43 -0500)
committerDon Armstrong <don@donarmstrong.com>
Mon, 12 Jun 2017 14:43:24 +0000 (09:43 -0500)
emacs_el/configuration/org-mode-configuration.el

index b58a00d23ebe8a81f6993bf8ad9d80b899241378..0af973acbf05482bd1202a46a2c3612f346618f4 100644 (file)
@@ -1102,4 +1102,16 @@ same directory as the org-buffer and insert a link to this file."
                            (min (1+ (match-end 0)) end)))
                   (unless (bolp) (insert "\n"))))))))))))
 
                            (min (1+ (match-end 0)) end)))
                   (unless (bolp) (insert "\n"))))))))))))
 
+; from https://emacs.stackexchange.com/questions/909/how-can-i-have-an-agenda-timeline-view-of-multiple-files
+(defun org-agenda-timeline-all (&optional arg)
+  (interactive "P")
+  (with-temp-buffer
+    (dolist (org-agenda-file org-agenda-files)
+      (insert-file-contents org-agenda-file nil)
+      (end-of-buffer)
+      (newline))
+    (write-file "/tmp/timeline.org")
+    (org-agenda arg "L")))
+(define-key org-mode-map (kbd "C-c t") 'org-agenda-timeline-all)
+
 (provide 'org-mode-configuration)
 (provide 'org-mode-configuration)