From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: [BUG] org-timestamp-change does not respect argument 'n' for minutes Date: Wed, 22 Jan 2014 11:24:56 +0100 Message-ID: <878uu871qf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5uzD-0000Lm-C3 for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 05:24:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5uz6-000553-1j for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 05:24:43 -0500 Received: from plane.gmane.org ([80.91.229.3]:55090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5uz5-00054v-R7 for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 05:24:35 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W5uz2-0003wG-Ae for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 11:24:32 +0100 Received: from e178059038.adsl.alicedsl.de ([85.178.59.38]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Jan 2014 11:24:32 +0100 Received: from tjolitz by e178059038.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Jan 2014 11:24:32 +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 Bug or feature? Why is there this special handling of minutes? Evaluating ,--------------------- | (org-timestamp-up 3) `--------------------- with point on year, month, day, hour works as expected (3 units up), but not with point on minute. There it's always a 1 unit change due to this code snippet from org.el: #+begin_src emacs-lisp (defun org-timestamp-change (n &optional what updown suppress-tmp-delay) ;; n => 3 in this case, what => minute [...] (when (and updown (eq org-ts-what 'minute) (not current-prefix-arg)) ;; This looks like s-up and s-down. Change by one rounding step. (setq n (* dm (cond ((> n 0) 1) ((< n 0) -1) (t 0)))) ; Why? (when (not (= 0 (setq rem (% (nth 1 time0) dm)))) (setcar (cdr time0) (+ (nth 1 time0) (if (> n 0) (- rem) (- dm rem)))))) [...] ) #+end_src -- cheers, Thorsten