Re: [O] How to say I did that yesterday?
On Tue, Nov 22 2011, Dave Abrahams wrote: I often discover that I completed something a few days ago and I would like to mark it done with the appropriate date as though I had marked it done in the past. That means, e.g., for a repeating event it might repeat sooner than if it had been done today. Is there a way? Not exactly what you want, but it might help. Some code for easy modifying time stamps with C-left, C-right, M-left and M-right: --8---cut here---start-8--- (defvar pm/org-ctrlleft-hook nil Hook for functions attaching themselves to `C-left'.) (defvar pm/org-ctrlright-hook nil Hook for functions attaching themselves to `C-right'.) (defun pm/org-meta-left () Decrease the date in the time stamp by one hour. (when (org-at-timestamp-p) (org-timestamp-change -60 'minute) t)) (defun pm/org-meta-right () Increase the date in the time stamp by one hour. (when (org-at-timestamp-p) (org-timestamp-change 60 'minute) t)) (defun pm/org-ctrl-left () Decrease the date in the time stamp by one day. (when (org-at-timestamp-p) (org-timestamp-down-day) t)) (defun pm/org-ctrl-right () Increase the date in the time stamp by one day. (when (org-at-timestamp-p) (org-timestamp-up-day) t)) (defun pm/org-ctrlleft () Run the functions in `pm/org-ctrlleft-hook'. (interactive) (run-hook-with-args-until-success 'pm/org-ctrlleft-hook)) (defun pm/org-ctrlright () Run the functions in `pm/org-ctrlright-hook'. (interactive) (run-hook-with-args-until-success 'pm/org-ctrlright-hook)) (add-hook 'org-metaleft-hook 'pm/org-meta-left) (add-hook 'org-metaright-hook'pm/org-meta-right) (add-hook 'pm/org-ctrlleft-hook 'pm/org-ctrl-left) (add-hook 'pm/org-ctrlright-hook 'pm/org-ctrl-right) (org-defkey org-mode-map [(control left)] 'pm/org-ctrlleft) (org-defkey org-mode-map [(control right)] 'pm/org-ctrlright) --8---cut here---end---8--- -- Peter
Re: [O] How to say I did that yesterday?
I often discover that I completed something a few days ago and I would like to mark it done with the appropriate date as though I had marked it done in the past. That means, e.g., for a repeating event it might repeat sooner than if it had been done today. Is there a way? I also want to to that, basically binding 'now' to a particular time in the past and then executing a todo state change (to effect the log, and also the next scheduled time). I wonder if replacing the calls to get now with a function that looks at a variable and doing (setq now-var (now)) (do-whatever) would be enough to get it to do what I want. pgp51ksUxPmLw.pgp Description: PGP signature
Re: [O] How to say I did that yesterday?
Hi Dave On Tue, Nov 22, 2011 at 20:40, Dave Abrahams d...@boostpro.com wrote: [...] for a repeating event it might repeat sooner than if it had been done today. [...] Are you looking for habits? http://orgmode.org/manual/Tracking-your-habits.html#Tracking-your-habits Michael
Re: [O] How to say I did that yesterday?
At Tue, 22 Nov 2011 11:40:35 -0800, Dave Abrahams wrote: I often discover that I completed something a few days ago and I would like to mark it done with the appropriate date as though I had marked it done in the past. That means, e.g., for a repeating event it might repeat sooner than if it had been done today. Is there a way? M-x org-todo-yesterday ? If there is a way to do this for days further in the past, I would welcome it! I also find myself wanting to do this often. Right now I just mark it done, then manually adjust the log entries. best, Erik Sent from my free software system http://fsf.org/.
Re: [O] How to say I did that yesterday?
on Tue Nov 22 2011, Michael Brand michael.ch.brand-AT-gmail.com wrote: Hi Dave On Tue, Nov 22, 2011 at 20:40, Dave Abrahams d...@boostpro.com wrote: [...] for a repeating event it might repeat sooner than if it had been done today. [...] Are you looking for habits? http://orgmode.org/manual/Tracking-your-habits.html#Tracking-your-habits No, I'm alreay using habits! But if I have a habit to shave every three days and sometime in the past two days I forgot to mark that I shaved, I need a way to record that fact without habits letting me slide for a day and a half past the time I should shave next. -- Dave Abrahams BoostPro Computing http://www.boostpro.com
Re: [O] How to say I did that yesterday?
on Tue Nov 22 2011, Erik Hetzner egh-AT-e6h.org wrote: At Tue, 22 Nov 2011 11:40:35 -0800, Dave Abrahams wrote: I often discover that I completed something a few days ago and I would like to mark it done with the appropriate date as though I had marked it done in the past. That means, e.g., for a repeating event it might repeat sooner than if it had been done today. Is there a way? M-x org-todo-yesterday ? If there is a way to do this for days further in the past, I would welcome it! I also find myself wanting to do this often. Right now I just mark it done, then manually adjust the log entries. best, Erik Sent from my free software system http://fsf.org/. org-todo-yesterday clearly shows how it could be done. Heh, we could have org-todo respond to negative prefix args by shifting the date back that many days and then prompting for state as though `C-u' had been pressed. -- Dave Abrahams BoostPro Computing http://www.boostpro.com
Re: [O] How to say I did that yesterday?
on Tue Nov 22 2011, Erik Hetzner egh-AT-e6h.org wrote: At Tue, 22 Nov 2011 11:40:35 -0800, Dave Abrahams wrote: I often discover that I completed something a few days ago and I would like to mark it done with the appropriate date as though I had marked it done in the past. That means, e.g., for a repeating event it might repeat sooner than if it had been done today. Is there a way? M-x org-todo-yesterday ? Heh, that doesn't seem to work from the agenda, though :( --8---cut here---start-8--- Debugger entered--Lisp error: (error Before first headline at position 1142 in buffer *Org Agenda*) signal(error (Before first headline at position 1142 in buffer *Org Agenda*)) error(Before first headline at position %d in buffer %s 1142 #buffer *Org Agenda*) (condition-case nil (outline-back-to-heading invisible-ok) (error (error Before first headline at position %d in buffer %s ... ...))) org-back-to-heading(t) (catch (quote exit) (org-back-to-heading t) (if (looking-at org-outline-regexp) (goto-char ...)) (or (looking-at ...) (looking-at \\(?: *\\|[]*$\\))) (let* (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... dolog now-done-p) (when org-blocker-hook ... ...) (store-match-data match-data) (replace-match next t t) (unless ... ...) (unless head ...) (when ... ...) (setq org-last-todo-state-is-todo ...) (setq now-done-p ...) (and logging ...) (when ... ... ... ... ... ...) (org-todo-trigger-tag-changes state) (and org-auto-align-tags ... ...) (when org-provide-todo-statistics ...) (run-hooks ...) (if ... ...) (put-text-property ... ... ... head) (when now-done-p ... ...) (if ... ...) (when org-trigger-hook ...))) (save-excursion (catch (quote exit) (org-back-to-heading t) (if ... ...) (or ... ...) (let* ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...))) (let ((org-blocker-hook org-blocker-hook) (case-fold-search nil)) (when (equal arg ...) (setq arg nil org-blocker-hook nil)) (when (and org-blocker-hook ...) (setq org-blocker-hook nil)) (save-excursion (catch ... ... ... ... ...))) org-todo((4)) (let* ((hour ...) (org-extend-today-until ...)) (org-todo arg)) org-todo-yesterday((4)) call-interactively(org-todo-yesterday t nil) execute-extended-command((4)) call-interactively(execute-extended-command nil nil) --8---cut here---end---8--- -- Dave Abrahams BoostPro Computing http://www.boostpro.com
Re: [O] How to say I did that yesterday?
On Tue, 22 Nov 2011 21:02:48 -0800, Dave Abrahams d...@boostpro.com wrote: on Tue Nov 22 2011, Erik Hetzner egh-AT-e6h.org wrote: At Tue, 22 Nov 2011 11:40:35 -0800, Dave Abrahams wrote: I often discover that I completed something a few days ago and I would like to mark it done with the appropriate date as though I had marked it done in the past. That means, e.g., for a repeating event it might repeat sooner than if it had been done today. Is there a way? M-x org-todo-yesterday ? Heh, that doesn't seem to work from the agenda, though :( M-x org-agenda-todo-yesteday :) Although, it should in princple, be possible to detect running in tha agenda, and handle that automatically. I guess there are probably issues with that. Tom