Remove `db-update-org-agenda-files'
It's not used anymore and won't ever work as intended.
This commit is contained in:
parent
9f072ebca1
commit
ec83430a70
17
init.el
17
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-home-task
|
||||||
db/org-clock-in-work-task
|
db/org-clock-in-work-task
|
||||||
endless/org-ispell
|
endless/org-ispell
|
||||||
db/update-org-agenda-files
|
|
||||||
db/org-agenda-list-deadlines
|
db/org-agenda-list-deadlines
|
||||||
db/org-agenda-skip-tag
|
db/org-agenda-skip-tag
|
||||||
db/cmp-date-property
|
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
|
(defcustom db/org-default-work-file nil
|
||||||
"Path to default org-mode file at work."
|
"Path to default org-mode file at work."
|
||||||
:group 'personal-settings
|
:group 'personal-settings
|
||||||
:type '(choice (const nil) file)
|
:type '(choice (const nil) file))
|
||||||
;; :set #'db/update-org-agenda-files
|
|
||||||
)
|
|
||||||
|
|
||||||
(defcustom db/org-default-home-file nil
|
(defcustom db/org-default-home-file nil
|
||||||
"Path to default org-mode file at home."
|
"Path to default org-mode file at home."
|
||||||
:group 'personal-settings
|
:group 'personal-settings
|
||||||
:type '(choice (const nil) file)
|
:type '(choice (const nil) file))
|
||||||
;; :set #'db/update-org-agenda-files
|
|
||||||
)
|
|
||||||
|
|
||||||
(defcustom db/org-default-notes-file nil
|
(defcustom db/org-default-notes-file nil
|
||||||
"Path to default org-mode file for notes."
|
"Path to default org-mode file for notes."
|
||||||
:group 'personal-settings
|
:group 'personal-settings
|
||||||
:type '(choice (const nil) file)
|
:type '(choice (const nil) file))
|
||||||
;; :set #'db/update-org-agenda-files
|
|
||||||
)
|
|
||||||
|
|
||||||
(defcustom db/org-default-refile-file nil
|
(defcustom db/org-default-refile-file nil
|
||||||
"Path to default org-mode file for capturing."
|
"Path to default org-mode file for capturing."
|
||||||
:group 'personal-settings
|
:group 'personal-settings
|
||||||
:type '(choice (const nil) file)
|
:type '(choice (const nil) file))
|
||||||
;; :set #'db/update-org-agenda-files
|
|
||||||
)
|
|
||||||
|
|
||||||
(defcustom db/org-default-pensieve-file nil
|
(defcustom db/org-default-pensieve-file nil
|
||||||
"Path to default org-mode file for private notes."
|
"Path to default org-mode file for private notes."
|
||||||
|
|
|
@ -11,42 +11,6 @@
|
||||||
|
|
||||||
;;; Agenda Customization
|
;;; 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)
|
(defun db/org-agenda-list-deadlines (&optional match)
|
||||||
;; XXX org-agenda-later does not work, fix this
|
;; XXX org-agenda-later does not work, fix this
|
||||||
"Prepare agenda view that only lists upcoming deadlines.
|
"Prepare agenda view that only lists upcoming deadlines.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user