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


Reply via email to