Re: time-warping - retroactively marking DONE?
Adam Spiers writes: Many thanks again for this. It's working great for me! In case anyone's interested, here's my use-package config (which uses the awesome straight.el package manager to install it): https://github.com/aspiers/emacs/blob/aa62bd84b51a02cb0fc980862a63514349d253bf/.emacs.d/init.d/as-org-mode.el#L111-L116 I agree with your observation that it might be nicer to separate out the org-specific stuff into a separate package, because the epoch stuff seems useful in its own right outside org-mode. Thanks for trying it out. There are still some rough edges I have to work out, but I plan on working on it more when I get some more free time.
Re: time-warping - retroactively marking DONE?
On Wed, 8 Jul 2020 at 23:09, No Wayman wrote: > I emailed Adam directly with an experimental package I wrote to > solve the problem of changing the todo-state of an entry at an > arbitrary time. > He suggested I posted here as well: > > https://github.com/progfolio/epoch/ > > The package advises current-time to return `epoch-current-time' if > is set (falling back to the usual current-time if not). > A macro, `epoch-with-time' is provided which allows a body to be > executed with current-time set to an arbitrary time. > Two commands (which I may separate into their own package), > `epoch-todo' and `epoch-agenda-todo' call their respective > org-mode commands. > `org-read-date' is called with the tasks's SCHEDULED or DEADLINE > time pre-populated so one can easily edit relative to that time. > > Still very much a work in progress, but the two commands are > useful for me so far. > > Any ideas, suggestions, criticisms are appreciated. Many thanks again for this. It's working great for me! In case anyone's interested, here's my use-package config (which uses the awesome straight.el package manager to install it): https://github.com/aspiers/emacs/blob/aa62bd84b51a02cb0fc980862a63514349d253bf/.emacs.d/init.d/as-org-mode.el#L111-L116 I agree with your observation that it might be nicer to separate out the org-specific stuff into a separate package, because the epoch stuff seems useful in its own right outside org-mode.
Re: time-warping - retroactively marking DONE?
I emailed Adam directly with an experimental package I wrote to solve the problem of changing the todo-state of an entry at an arbitrary time. He suggested I posted here as well: https://github.com/progfolio/epoch/ The package advises current-time to return `epoch-current-time' if is set (falling back to the usual current-time if not). A macro, `epoch-with-time' is provided which allows a body to be executed with current-time set to an arbitrary time. Two commands (which I may separate into their own package), `epoch-todo' and `epoch-agenda-todo' call their respective org-mode commands. `org-read-date' is called with the tasks's SCHEDULED or DEADLINE time pre-populated so one can easily edit relative to that time. Still very much a work in progress, but the two commands are useful for me so far. Any ideas, suggestions, criticisms are appreciated.
Re: time-warping - retroactively marking DONE?
On 2020-07-07, at 13:26, Adam Spiers wrote: > Hi all, > > I'm looking for a way to retroactively mark a task as having been done > at a previous time/date. I know that I can just change the keyword to org-todo-yesterday? Hth, -- Marcin Borkowski http://mbork.pl
Re: time-warping - retroactively marking DONE?
Adam Spiers writes: > I'm looking for a way to retroactively mark a task as having been done > at a previous time/date. I know that I can just change the keyword to > DONE and then edit the timestamp, but this is tedious when it's a > repeating event, e.g.: [...] I'm not aware of any built-in support for this. > If this is not currently possible, would it make sense to write a > wrapper around `org-todo', e.g. `org-todo-timewarp' or > `org-retroactive-todo', which interactively prompts for a timestamp > before invoking `org-todo'? I think this is the easiest approach, though I'm not sure such a wrapper needs to live in Org proper. Here's a snippet from a recent thread [*] that should get you most of the way there: (defun my-org-todo-time-machine () (interactive) (cl-letf (((symbol-function 'current-time) (lambda () (apply #'encode-time (org-parse-time-string "2019-11-27 Mi 16:44") (call-interactively #'org-todo))) [*] https://orgmode.org/list/875zj42rpx@passepartout.tim-landscheidt.de/T/#u