From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] org-timestamp-change changes minutes in multiples of rounding time Date: Tue, 22 Jun 2010 16:17:37 +0200 Message-ID: References: <760E4982-388D-4B19-BD27-FABF6C2717E0@gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=38060 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OR4IN-0001fZ-0U for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 10:17:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OR4IL-0000PM-Ca for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 10:17:46 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:43584) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OR4IL-0000PB-61 for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 10:17:45 -0400 Received: by wwb17 with SMTP id 17so1270565wwb.0 for ; Tue, 22 Jun 2010 07:17:42 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Puneeth Cc: emacs-orgmode Hi Puneeth, I have now understood, and changed the behavior so that your function should work correctly. Note that the rounding only works now if you use S-up and S-down on the minutes. If you give your function of 13 minutes, it will change all time stamps by 13 minutes, not a rounded number. HTH - Carsten On Jun 22, 2010, at 3:48 PM, Puneeth wrote: > Hi Carsten, > > On Tue, Jun 22, 2010 at 7:03 PM, Carsten Dominik > wrote: >> >> On Jun 22, 2010, at 1:10 PM, Puneeth wrote: > [..] >> no, I do not think so. The variable is called "-rounding", not "- >> step". > > Sorry for the unclear message. Let me explain. > > I tried to use the function shown below (imitating a similar function > by Juan Pechier [1]). But this function only changes the time by > either +5 or -5 minutes for whatever value of "n". Should it not, > increase the time by a multiple of 5 mins? > > 8<---------------------------------------- > > (defun upminutes ( n ) > "update all timestamps n minutes" > (interactive "nAdd minutes: ") > (save-excursion > (goto-char (point-min)) > (while (re-search-forward "[[<]" nil t) > (when (org-at-timestamp-p t) > (org-timestamp-change n 'minute) > )))) > > 8<---------------------------------------- > > Thanks, > Puneeth > > [1] http://lists.gnu.org/archive/html/emacs-orgmode/2010-06/msg00229.html - Carsten