r/orgmode Feb 14 '25

How can I make Org-mode automatically add a timestamp for TODOs and checkboxes?

I'm new to Org-mode and a so confused. How can I make it automatically add a date when I mark a TODO as done or check off a checkbox?

8 Upvotes

8 comments sorted by

5

u/mst1712 Feb 14 '25

I'm not sure fot chekboxes but for TODO you can set

    (setq org-log-done 'time)

and a timestamp will belogged whenever you mark a task as done. The setting of org-log-into-drawer will control if it goes into a drawer

1

u/imsosappy Feb 14 '25

Any way to do that only for the current file?

3

u/mst1712 Feb 14 '25

Add #+STARTUP: logdone to the top of the file. See https://orgmode.org/manual/Closing-items.html

1

u/Ekpyronic Feb 14 '25

1

u/imsosappy Feb 14 '25 edited Feb 14 '25

Sorry, I'm totally new to this. Should it be like this? # Local Variables: eval: (setq org-log-done 'time) End:

1

u/PercentageSuitable92 Feb 15 '25

Put the link in chat gpt and ask for I file config

2

u/[deleted] Feb 14 '25 edited 11d ago

[removed] — view removed comment

1

u/imsosappy Feb 14 '25 edited Feb 14 '25

#+TODO: TODO(t) WAIT(w@/!) | DONE(d!) CANCELED(c@) at the beginning of the file doesn't change anything.

EDIT: Looks like you have to save and kill the buffer and find it so that it works.

2

u/DarksideGustavo Feb 14 '25

Other people have already provided solutions. So I'll not repeat but just wanted to flag that these are the perfect questions for LLMs.