diff --git a/init.el b/init.el index afe3da5..aec7771 100644 --- a/init.el +++ b/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 diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index 6d8a348..4b9fda4 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -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/