emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: time-warping - retroactively marking DONE?
       [not found] <mailman.55.1594224009.21222.emacs-orgmode@gnu.org>
@ 2020-07-08 21:38 ` No Wayman
  2020-08-30  0:22   ` Adam Spiers
  0 siblings, 1 reply; 6+ messages in thread
From: No Wayman @ 2020-07-08 21:38 UTC (permalink / raw)
  To: emacs-orgmode


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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: time-warping - retroactively marking DONE?
  2020-07-08 21:38 ` time-warping - retroactively marking DONE? No Wayman
@ 2020-08-30  0:22   ` Adam Spiers
  2020-08-30  1:32     ` No Wayman
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Spiers @ 2020-08-30  0:22 UTC (permalink / raw)
  To: No Wayman; +Cc: org-mode mailing list

On Wed, 8 Jul 2020 at 23:09, No Wayman <iarchivedmywholelife@gmail.com> 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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: time-warping - retroactively marking DONE?
  2020-08-30  0:22   ` Adam Spiers
@ 2020-08-30  1:32     ` No Wayman
  0 siblings, 0 replies; 6+ messages in thread
From: No Wayman @ 2020-08-30  1:32 UTC (permalink / raw)
  To: Adam Spiers; +Cc: org-mode mailing list


Adam Spiers <orgmode@adamspiers.org> 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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: time-warping - retroactively marking DONE?
  2020-07-07 11:26 Adam Spiers
  2020-07-08  4:53 ` Kyle Meyer
@ 2020-07-08  5:52 ` Marcin Borkowski
  1 sibling, 0 replies; 6+ messages in thread
From: Marcin Borkowski @ 2020-07-08  5:52 UTC (permalink / raw)
  To: Adam Spiers; +Cc: org-mode mailing list


On 2020-07-07, at 13:26, Adam Spiers <orgmode@adamspiers.org> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: time-warping - retroactively marking DONE?
  2020-07-07 11:26 Adam Spiers
@ 2020-07-08  4:53 ` Kyle Meyer
  2020-07-08  5:52 ` Marcin Borkowski
  1 sibling, 0 replies; 6+ messages in thread
From: Kyle Meyer @ 2020-07-08  4:53 UTC (permalink / raw)
  To: Adam Spiers; +Cc: org-mode mailing list

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.fsf@passepartout.tim-landscheidt.de/T/#u




^ permalink raw reply	[flat|nested] 6+ messages in thread

* time-warping - retroactively marking DONE?
@ 2020-07-07 11:26 Adam Spiers
  2020-07-08  4:53 ` Kyle Meyer
  2020-07-08  5:52 ` Marcin Borkowski
  0 siblings, 2 replies; 6+ messages in thread
From: Adam Spiers @ 2020-07-07 11:26 UTC (permalink / raw)
  To: org-mode mailing list

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
DONE and then edit the timestamp, but this is tedious when it's a
repeating event, e.g.:

*** NEXT [#A] meditate 15 minutes every day
       SCHEDULED: <2020-07-06 Mon 11:30-11:50 .+1d>
       :PROPERTIES:
       :LAST_REPEAT: [2020-07-05 Sun 11:13]
       :ID:       142a639c-e06d-4d4b-ad1c-edcd0d9ba6ce
       :Effort:   0:20
       :STYLE:    habit
       :END:

       - State "DONE"       from "NEXT"       [2020-07-05 Sun 10:15]
       - State "DONE"       from "NEXT"       [2020-07-04 Sat 10:30]
       - State "DONE"       from "NEXT"       [2020-07-03 Fri 10:05]
       - State "DONE"       from "NEXT"       [2020-07-02 Thu 11:15]

I forgot to mark it as done yesterday, which means that I would have
to manually edit /three/ timestamps to log the correct data: 1) the
SCHEDULED timestamp, 2) the :LAST_REPEAT: property, and 3) the state
change history.

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

Another possibility would be to add yet another magic prefix argument
to `org-todo', but it seems that is already heavily overloaded, so it
would have to be 'C-u C-u C-u C-u' which isn't particularly
convenient.

I can even imagine users occasionally wanting to mark stuff done in
the future, e.g. if they have an activity planned for tomorrow while
they're offline.  So maybe using the word 'retroactive' in the wrapper
function name is a bit too limiting.

Cheers,
Adam


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-30  1:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.55.1594224009.21222.emacs-orgmode@gnu.org>
2020-07-08 21:38 ` time-warping - retroactively marking DONE? No Wayman
2020-08-30  0:22   ` Adam Spiers
2020-08-30  1:32     ` No Wayman
2020-07-07 11:26 Adam Spiers
2020-07-08  4:53 ` Kyle Meyer
2020-07-08  5:52 ` Marcin Borkowski

Code repositories for project(s) associated with this 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).