From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [BUG] org-timestamp-change does not respect argument 'n' for minutes
Date: Wed, 22 Jan 2014 11:24:56 +0100 [thread overview]
Message-ID: <878uu871qf.fsf@gmail.com> (raw)
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
next reply other threads:[~2014-01-22 10:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-22 10:24 Thorsten Jolitz [this message]
2014-01-22 10:36 ` [BUG] org-timestamp-change does not respect argument 'n' for minutes Bastien
2014-01-22 11:28 ` Thorsten Jolitz
2014-01-22 13:43 ` Bastien
2014-01-22 14:32 ` Thorsten Jolitz
2014-01-22 15:01 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878uu871qf.fsf@gmail.com \
--to=tjolitz@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.