From mboxrd@z Thu Jan 1 00:00:00 1970 From: pmlists@free.fr (Peter =?utf-8?Q?M=C3=BCnster?=) Subject: Re: How to say "I did that yesterday?" Date: Tue, 22 Nov 2011 21:03:53 +0100 Message-ID: <87r50z7wly.fsf@micropit.couberia.bzh> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSwZg-0002RN-QA for emacs-orgmode@gnu.org; Tue, 22 Nov 2011 15:04:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSwZf-0006Fu-M2 for emacs-orgmode@gnu.org; Tue, 22 Nov 2011 15:04:12 -0500 Received: from lo.gmane.org ([80.91.229.12]:58349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSwZf-0006Fp-Ce for emacs-orgmode@gnu.org; Tue, 22 Nov 2011 15:04:11 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RSwZd-0002uu-Q4 for emacs-orgmode@gnu.org; Tue, 22 Nov 2011 21:04:09 +0100 Received: from arennes-359-1-145-187.w86-214.abo.wanadoo.fr ([86.214.84.187]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Nov 2011 21:04:09 +0100 Received: from pmlists by arennes-359-1-145-187.w86-214.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Nov 2011 21:04:09 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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