Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

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.

Based on the suggestions provided in this 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.

Based on the suggestions provided in this 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.

Turn on syntax highlighting.
Source Link
itsjeyd
  • 14.9k
  • 3
  • 60
  • 87

Based on the suggestions provided in this 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")))
(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)
(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.

Based on the suggestions provided in this 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.

Based on the suggestions provided in this 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.

Mention how to make code consider agenda files plus all open org-mode files.
Source Link
itsjeyd
  • 14.9k
  • 3
  • 60
  • 87

Based on the suggestions provided in this 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-filesagenda-listfiles)
      (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.

Based on the suggestions provided in this 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-files-list)
      (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)

Based on the suggestions provided in this 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.

changing code in case org-agend-file contains directories
Source Link
Loading
Source Link
itsjeyd
  • 14.9k
  • 3
  • 60
  • 87
Loading