From ec83430a70ff9471b2005081a36e5c6b65971a64 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 5 Jan 2020 13:06:50 +0100 Subject: [PATCH] Remove `db-update-org-agenda-files' It's not used anymore and won't ever work as intended. --- init.el | 17 ++++------------- site-lisp/db-org.el | 36 ------------------------------------ 2 files changed, 4 insertions(+), 49 deletions(-) diff --git a/init.el b/init.el index 44c7f94..1adaaa4 100644 --- a/init.el +++ b/init.el @@ -711,7 +711,6 @@ With given ARG, display files in `db/important-document-path’." db/org-clock-in-home-task db/org-clock-in-work-task endless/org-ispell - db/update-org-agenda-files db/org-agenda-list-deadlines db/org-agenda-skip-tag db/cmp-date-property @@ -961,30 +960,22 @@ With given ARG, display files in `db/important-document-path’." (defcustom db/org-default-work-file nil "Path to default org-mode file at work." :group 'personal-settings - :type '(choice (const nil) file) - ;; :set #'db/update-org-agenda-files - ) + :type '(choice (const nil) file)) (defcustom db/org-default-home-file nil "Path to default org-mode file at home." :group 'personal-settings - :type '(choice (const nil) file) - ;; :set #'db/update-org-agenda-files - ) + :type '(choice (const nil) file)) (defcustom db/org-default-notes-file nil "Path to default org-mode file for notes." :group 'personal-settings - :type '(choice (const nil) file) - ;; :set #'db/update-org-agenda-files - ) + :type '(choice (const nil) file)) (defcustom db/org-default-refile-file nil "Path to default org-mode file for capturing." :group 'personal-settings - :type '(choice (const nil) file) - ;; :set #'db/update-org-agenda-files - ) + :type '(choice (const nil) file)) (defcustom db/org-default-pensieve-file nil "Path to default org-mode file for private notes." diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index 8f9403b..54878c8 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -11,42 +11,6 @@ ;;; Agenda Customization -;; For customization of default org agenda files -(defun db/update-org-agenda-files (symbol value) - "Set SYMBOL to VALUE and update `org-agenda-files’ afterwards. -Remove the old value of SYMBOL from `org-agenda-files’ and add -the new one instead." - (when (and (boundp symbol) - (symbol-value symbol)) - (require 'org) - (org-remove-file (symbol-value symbol))) - (set-default symbol value) - (when value - (if (not (and (stringp value) - (file-exists-p value) - (file-readable-p value))) - (user-error "File %s does not exist or is not readable; not setting %s." - value symbol) - - ;; this is essentially `org-agenda-file-to-front', but using `value' - ;; instead of `buffer-file-name' - (require 'org) - (let ((org-agenda-skip-unavailable-files nil) - (file-alist (mapcar (lambda (x) - (cons (file-truename x) x)) - (org-agenda-files t))) - (ctf (file-truename value)) - x had) - (setq x (assoc ctf file-alist) had x) - - (unless x - (setq x (cons ctf (abbreviate-file-name value)))) - (setq file-alist (append (delq x file-alist) (list x))) - (org-store-new-agenda-file-list (mapcar 'cdr file-alist)) - (org-install-agenda-files-menu) - (message "File %s to end of agenda file list" - (if had "moved" "added")))))) - (defun db/org-agenda-list-deadlines (&optional match) ;; XXX org-agenda-later does not work, fix this "Prepare agenda view that only lists upcoming deadlines.