emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Landscheidt <tim@tim-landscheidt.de>
To: emacs-orgmode@gnu.org
Subject: How to mark task as done at specified (past) time?
Date: Thu, 28 Nov 2019 10:57:46 +0000	[thread overview]
Message-ID: <875zj42rpx.fsf@passepartout.tim-landscheidt.de> (raw)

Hi,

with Emacs 26.2/org-mode 9.1.9, I have a repeating task that
I close with a helper function:

| (defun tl-entry-done ()
|   (interactive)
|   (find-file "/path/to/file.org")
|   (goto-char (org-find-entry-with-id "ENTRY-ID"))
|   (org-todo 'done))

Every time I do this task, I get an acknowledging mail, so
instead of manually closing this task (and forgetting to do
that, or delaying it for some time) I want Gnus to mark the
task as done /at the time when the mail was sent/, i. e. in:

|    - State "DONE"       from "TODO"       [2019-11-27 Mi 16:44]

I want "2019-11-27 Mi 16:44" not to be the current time, but
some other (past) time.

How can I mark a task as done at a specified time?  Looking
at org-add-planning-info, there seems to be a mechanism to
pass a timestamp, but it does not seem to be exposed at
higher levels (?).

Do I have to cl-flet org-current-time or something similar?

Tim

             reply	other threads:[~2019-11-28 11:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28 10:57 Tim Landscheidt [this message]
2019-12-12  3:26 ` How to mark task as done at specified (past) time? Kyle Meyer
2020-07-08 20:50   ` Tim Landscheidt
2020-07-09  2:56     ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875zj42rpx.fsf@passepartout.tim-landscheidt.de \
    --to=tim@tim-landscheidt.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).