Angel de Vicente <[email protected]> writes:
> I copied your code from
> https://github.com/yantar92/emacs-config/blob/master/config.org#properties
> into my .emacs and eval-ed it.
> ...
> But the "test" still shows in the TODO list. Am I missing something
> basic here?
Not really. I just use a different system for skip functions.
Try the following adjusted version:
(defun org-agenda-skip-before-SHOWFROMDATE-property ()
"Skip agenda item if :SHOWFROMDATE: property is set and the day is before it"
(when-let* ((showfromdate (if (bound-and-true-p org-ql--current-element)
(org-element-property :SHOWFROMDATE
(org-element-lineage org-ql--current-element '(headline) t))
(org-entry-get (point) "SHOWFROMDATE")))
(showfromdate (unless (seq-empty-p showfromdate) (ts-parse-org
showfromdate)))
(currenttime (ts-now)))
(when (ts< currenttime showfromdate)
(or (outline-next-heading) (point-max)))))
(Note that the code requires ts library installed).
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>