Remove obsolete `db/cmp-date-property' function
This commit is contained in:
parent
336ee9d7c4
commit
1cad9cc186
1
init.el
1
init.el
@ -710,7 +710,6 @@ With given ARG, display files in `db/important-document-path’."
|
||||
endless/org-ispell
|
||||
db/org-agenda-list-deadlines
|
||||
db/org-agenda-skip-tag
|
||||
db/cmp-date-property
|
||||
hydra-org-agenda-view/body
|
||||
org-babel-execute:hy
|
||||
db/org-timestamp-difference
|
||||
|
||||
@ -117,23 +117,6 @@ If OTHERS is true, skip all entries that do not correspond to TAG."
|
||||
next-headline
|
||||
nil)))
|
||||
|
||||
(defun db/cmp-date-property (prop)
|
||||
;; https://emacs.stackexchange.com/questions/26351/custom-sorting-for-agenda
|
||||
"Compare two `org-mode' agenda entries, `A' and `B', by some date property.
|
||||
|
||||
If a is before b, return -1. If a is after b, return 1. If they
|
||||
are equal return nil."
|
||||
(let ((prop prop))
|
||||
#'(lambda (a b)
|
||||
(let* ((a-pos (get-text-property 0 'org-marker a))
|
||||
(b-pos (get-text-property 0 'org-marker b))
|
||||
(a-date (or (org-entry-get a-pos prop)
|
||||
(format "<%s>" (org-read-date t nil "now"))))
|
||||
(b-date (or (org-entry-get b-pos prop)
|
||||
(format "<%s>" (org-read-date t nil "now"))))
|
||||
(cmp (compare-strings a-date nil nil b-date nil nil)))
|
||||
(if (eq cmp t) nil (cl-signum cmp))))))
|
||||
|
||||
;; A Hydra for changing agenda appearance
|
||||
;; http://oremacs.com/2016/04/04/hydra-doc-syntax/
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user