emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggestion: refer to other scheduled tasks in DEADLINE/SCHEDULE


From: Ihor Radchenko
Subject: Re: Suggestion: refer to other scheduled tasks in DEADLINE/SCHEDULE
Date: Wed, 09 Nov 2022 04:46:30 +0000

hugo@heagren.com writes:

> I think it would be great if other org headlines could be referenced in
> DEADLINEs and SCHEDULEs. This would effectively solve my problem: I
> could just add an id (or whatever identifier the implementation ends up
> using) to the event headline, and then use that id in the DEADLINE or
> SCHEDULE, thus:
>
> ,----
> | * Important Seminar
> | :PROPERTIES:
> | :CUSTOM_ID: seminarid
> | :END:
> | <2022-10-27 Through +1w>
> |
> | * TODO Read Famous Paper
> | DEADLINE: seminarid
> |
> | * TODO Read Other Paper
> | DEADLINE: seminarid
> `----

Note that the above is ambiguous: The event may have multiple
timestamps, and it is unclear which one to select in general case.

> Then the tasks to read papers will show up in my agenda with deadlines
> when the seminar starts. As far as I know, there isn't a way to do this
> already (though if there is, I would be happy to use it!).

You can use diary-style timestamps like
DEADLINE: <%%(my/copy-date :id "seminarid" :after "2022-11-08 Tue")>

where `my/copy-date' is an arbitrary Elisp function that is executed in
Diary environment, with `date' and `entry' variables being set at
runtime. See `org-class' for a sample implementation.

Since `my/copy-date' can be anything, you can implement any logic you
need.

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]