Remove obsolete `db/cmp-date-property' function

This commit is contained in:
Daniel Borchmann 2020-06-26 22:00:18 +02:00
parent 336ee9d7c4
commit 1cad9cc186
Signed by: exot
GPG Key ID: 1C7071A75BB72D64
2 changed files with 0 additions and 18 deletions

View File

@ -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

View File

@ -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/