org-super-agenda icon indicating copy to clipboard operation
org-super-agenda copied to clipboard

Relative dates in deadlines and scheluded for before and after

Open dancn opened this issue 4 years ago • 13 comments

Backward compatible improvement, org-read-date support a super-set of the previous function org-time-string-to-absolute.

Should be also an easy solution for #59.

dancn avatar Apr 24 '20 09:04 dancn

Thanks, this looks like a nice improvement. I will look at it more closely when I have some time, hopefully soon.

alphapapa avatar May 01 '20 11:05 alphapapa

+1, I use this patch locally and it's quite convenient.

nivekuil avatar Jul 29 '20 23:07 nivekuil

Yes, I, too, think this would be incredibly useful, so much so, I submitted the exact same PR without realizing this one existed!

pkazmier avatar Dec 09 '20 01:12 pkazmier

After one year I re-based the branch for my convenience, hopefully will also speed up the review and merge.

dancn avatar Apr 26 '21 07:04 dancn

It would be great to see this merged!

real-or-random avatar Sep 23 '21 12:09 real-or-random

Thanks for the ping and your patience.

alphapapa avatar Sep 24 '21 01:09 alphapapa

Hello, I tried to add some tests with the last push, but failed. Please comment/suggest on the new tentative. Thanks

dancn avatar Oct 11 '21 08:10 dancn

It shouldn't be necessary to use advice for this. See https://github.com/alphapapa/org-super-agenda/blob/369a4cdda1ddcbfd4428e5d3c88960ad94d76fa7/test/test.el#L214

Also, FYI, the advice you wrote uses the old-style advice. When writing advice, you should instead use the new-style nadvice library that uses add-function and advice-add. See the Elisp manual.

alphapapa avatar Oct 11 '21 15:10 alphapapa

Another try here! I found out out to get relative date to a fixed date... the test code is not very lispy but works and covers the obvious cases.

dancn avatar Oct 15 '21 14:10 dancn

@alphapapa or anybody interested, please have a look at the patch and request changes or improve it! Thanks!

dancn avatar Oct 28 '21 12:10 dancn

Any updates on this? Anything preventing this from being merged? This would be a mega-useful feature as there is no good workaround for this currently.

eugr avatar Jan 24 '22 00:01 eugr

I did this as a local work around to adjust for the number of days. Hope it helps anyone else. It's a little janky.

(defun my/get-time-string-today-offset (dayOffSet)
  (format-time-string "%Y-%m-%d %H:%M" (+ (string-to-number (format-time-string "%s" (current-time))) (* 86400 dayOffSet))))

And call it like this:

  (let ((date (my/get-time-string-today-offset 5)))
....
`( ...
:scheduled (after ,date)
)

DominikMendel avatar Oct 17 '22 00:10 DominikMendel

Any updates on this? Anything preventing this from being merged? This would be a mega-useful feature as there is no good workaround for this currently.

@eugr What prevents it from being merged is chiefly my lack of time to work on it. I don't have as much to spend on this project as I used to.

Besides that, there are issues of code quality, tests to be reviewed, etc. that must be addressed before it can be merged. Some of them I have mentioned to the PR's author in comments, so in that respect, the PR is waiting on him to address them, and then on me to re-review and confirm that it's appropriate for merging.

#225 is also a possibility for merging, but it also needs to be polished and re-reviewed, and its author has not responded to my last comment.

Of course, if either of these PRs works for you, you're free to use their code as-is right now.

alphapapa avatar Oct 17 '22 14:10 alphapapa