From: Ihor Radchenko <yantar92@gmail.com>
To: Angel de Vicente <angel.vicente.garrido@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Do not show a TODO item in the global TODO list until certain date?
Date: Wed, 12 Oct 2022 19:26:56 +0800 [thread overview]
Message-ID: <87edvdwadb.fsf@localhost> (raw)
In-Reply-To: <87sfksq4db.fsf@gmail.com>
Angel de Vicente <angel.vicente.garrido@gmail.com> 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>
next prev parent reply other threads:[~2022-10-12 11:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 9:28 Do not show a TODO item in the global TODO list until certain date? Angel de Vicente
2022-09-14 9:38 ` Rohit Patnaik
2022-09-14 10:44 ` Angel de Vicente
2022-09-14 12:36 ` Ihor Radchenko
2022-09-15 5:37 ` Angel de Vicente
2022-09-15 11:11 ` Angel de Vicente
2022-10-12 11:26 ` Ihor Radchenko [this message]
2022-10-21 19:35 ` Angel de Vicente
2022-10-21 23:07 ` Ihor Radchenko
2022-09-22 15:26 ` Bastien
2022-09-22 16:58 ` Angel de Vicente
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87edvdwadb.fsf@localhost \
--to=yantar92@gmail.com \
--cc=angel.vicente.garrido@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).