Based on the suggestions provided in this answerthis answer, the following command collects the contents of all org-agenda-files
in a single file and then calls the org-agenda
command that builds the timeline:
(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")))
For best results, set up a custom key binding for this command via
(define-key org-mode-map (kbd "C-c t") 'org-agenda-timeline-all)
Additionally, if you want the command to consider all org-mode
files that are currently open (in addition your org-agenda-files
, which may or may not be open), you can replace org-agenda-files
with a call to (org-files-list)
in the code above.