From: Angel de Vicente <angel.de.vicente@iac.es>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Do not show a TODO item in the global TODO list until certain date?
Date: Fri, 21 Oct 2022 20:35:46 +0100 [thread overview]
Message-ID: <87wn8t3r71.fsf@iac.es> (raw)
In-Reply-To: <87edvdwadb.fsf@localhost> (Ihor Radchenko's message of "Wed, 12 Oct 2022 19:26:56 +0800")
Hello,
Ihor Radchenko <yantar92@gmail.com> writes:
> 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)))))
Fantastic. It does work now beautifully.
[I was about to tell you that it was still not working, because I was
still trying with the following TODO item:
,----
| ** TODO test :personal:
|
| :PROPERTIES:
| :SHOWFROMDATE: 2022-10-16
| :END:
`----
and then I realized that the empty line before :PROPERTIES: was breaking
it. With no empty line it works fine (I should've used
org-command-set-SHOWFROMDATE-property from the beginning, which sets the
PROPERTIES in the right format).
,----
| ** TODO test :personal:
| :PROPERTIES:
| :SHOWFROMDATE: 2022-10-16
| :END:
`----
Many thanks for your help. My TODO list is going to become a lot cleaner
from now!
Cheers,
--
Ángel de Vicente
Research Software Engineer (Supercomputing and BigData)
Tel.: +34 922-605-747
Web.: http://research.iac.es/proyecto/polmag/
---------------------------------------------------------------------------------------------
AVISO LEGAL: Este mensaje puede contener información confidencial y/o privilegiada. Si usted no es el destinatario final del mismo o lo ha recibido por error, por favor notifíquelo al remitente inmediatamente. Cualquier uso no autorizadas del contenido de este mensaje está estrictamente prohibida. Más información en: https://www.iac.es/es/responsabilidad-legal
DISCLAIMER: This message may contain confidential and / or privileged information. If you are not the final recipient or have received it in error, please notify the sender immediately. Any unauthorized use of the content of this message is strictly prohibited. More information: https://www.iac.es/en/disclaimer
next prev parent reply other threads:[~2022-10-22 0:13 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
2022-10-21 19:35 ` Angel de Vicente [this message]
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=87wn8t3r71.fsf@iac.es \
--to=angel.de.vicente@iac.es \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@gmail.com \
/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).