Function: org-edit-agenda-file-list

org-edit-agenda-file-list is an interactive and byte-compiled function defined in org.el.gz.

Signature

(org-edit-agenda-file-list)

Documentation

Edit the list of agenda files.

Depending on setup, this either uses customize to edit the variable org-agenda-files(var)/org-agenda-files(fun), or it visits the file that is holding the list. In the latter case, the buffer is set up in a way that saving it automatically kills the buffer and restores the previous window configuration.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-edit-agenda-file-list ()
  "Edit the list of agenda files.
Depending on setup, this either uses customize to edit the variable
`org-agenda-files', or it visits the file that is holding the list.  In the
latter case, the buffer is set up in a way that saving it automatically kills
the buffer and restores the previous window configuration."
  (interactive)
  (if (stringp org-agenda-files)
      (let ((cw (current-window-configuration)))
	(find-file org-agenda-files)
	(setq-local org-window-configuration cw)
	(add-hook 'after-save-hook
		  (lambda ()
		    (set-window-configuration
		     (prog1 org-window-configuration
		       (kill-buffer (current-buffer))))
		    (org-install-agenda-files-menu)
		    (message "New agenda file list installed"))
		  nil 'local)
	(message "%s" (substitute-command-keys
		       "Edit list and finish with \\[save-buffer]")))
    (customize-variable 'org-agenda-files)))