When I create an appointment in org-agenda I make use of timestamps. The item is created with today's date and time and I then place my cursor on the date and time respectively and use S-up or S-down to increase or decrease the time until I get to the time I need. I see that time increments by default are 5 minutes. I would prefer it to be 30 minutes. Can can I achieve this?
-
Are you sure you are pressing CONTROL- {up, down} to change the times? Might you be pressing SHIFT-{up, down} instead? This does not affect the question and answer, but it might confuse people reading this.– NickDCommented Oct 10, 2019 at 16:58
-
Mea Culpa. I meant to say Shift-up and Shift-down. Apologies.– EdmanCommented Oct 11, 2019 at 18:42
-
OK - thanks! I edited the question and the answer to reflect this.– NickDCommented Oct 11, 2019 at 19:32
1 Answer
S-up and S-down are bound to org-shiftup
and org-shiftdown
. On timestamps, these call org-timestamp-up
and org-timestamp-down
respectively. These methods use the variable org-time-stamp-rounding-minutes
:
Number of minutes to round time stamps to.
These are two values, the first applies when first creating a time stamp.
The second applies when changing it with the commands ‘S-up’ and ‘S-down’.
When changing the time stamp, this means that it will change in steps of N minutes, as given by the second value.
So we can change the second value to 30
:
(setf (elt org-time-stamp-rounding-minutes 1)
30)
And now these methods will move by 30 minutes[1].
[1] It will move to the nearest multiple of this value; S-up once on <2019-10-09 Wed 06:27>
will move it to <2019-10-09 Wed 06:30>
; calling it again gives <2019-10-09 Wed 07:00>
.
-
1When you say
C-up
andC-down
, you really meanS-up
andS-down
, don't you? See the doc string of the variable that you quoted.– NickDCommented Oct 10, 2019 at 5:12 -
@NickD Neither
S-up
norS-down
is not bound on my version of org, and the OP in the question says they're usingC-up
andC-down
, so I used the Ctrl versions in the answer.– zckCommented Oct 10, 2019 at 16:10 -
What version is that? AFAIK,
org-shiftup
andorg-shiftdown
have always been bound toS-up
andS-down
(hence the function names: these settings are ancient).– NickDCommented Oct 10, 2019 at 16:29 -
I should add that these settings are the default on GUI emacs, but even on console emacs, they are supposed to work: see the doc string for
org-support-shift-select
.– NickDCommented Oct 10, 2019 at 16:37 -
On the computer I'm at now, which is running a GUI emacs, I have Org 9.1.9.– zckCommented Oct 10, 2019 at 22:08