alphapapa / org-super-agenda

Supercharge your Org daily/weekly agenda by grouping items
GNU General Public License v3.0
1.35k stars 107 forks source link

Relative dates in deadlines and scheluded for before and after #149

Open dancn opened 4 years ago

dancn commented 4 years ago

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.

alphapapa commented 4 years ago

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

nivekuil commented 4 years ago

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

pkazmier commented 3 years ago

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

dancn commented 3 years ago

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

real-or-random commented 3 years ago

It would be great to see this merged!

alphapapa commented 3 years ago

Thanks for the ping and your patience.

dancn commented 2 years ago

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

alphapapa commented 2 years ago

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.

dancn commented 2 years ago

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 commented 2 years ago

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

eugr commented 2 years ago

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.

DominikMendel commented 1 year ago

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)
)
alphapapa commented 1 year ago

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.