docs/manual/guide/06-dates-and-clocking.org

v1.1.0
orgstar/docs/manual/guide/06-dates-and-clocking.org rendered · source · history · blame · raw

567 lines · 41373 bytes

  1#+TITLE: Dates, scheduling and clocking
  2#+DESCRIPTION: Timestamps, the date prompt, SCHEDULED and DEADLINE, repeating tasks, effort, clocking, clock tables, habits and reminders in orgstar.
  3#+LEDE: Put dates on entries, plan work with scheduled dates and deadlines, and record the time you spend.
  4
  5* Timestamps
  6
  7A timestamp is a date, optionally with a time, in angle brackets (active) or square brackets (inactive):
  8
  9#+BEGIN_SRC org
 10<2026-10-07 Wed>
 11<2026-10-07 Wed 14:30>
 12<2026-10-07 Wed 10:00-11:30>
 13<2026-10-07 Wed>--<2026-10-09 Fri>
 14[2026-10-07 Wed 09:12]
 15#+END_SRC
 16
 17- Active timestamps put the entry on the agenda for that day. Inactive ones are records only.
 18- =10:00-11:30= is a time range within one day. =<…>--<…>= is a range of days; both ends must be of the same kind.
 19- orgstar writes day names in English. When reading, it accepts a day name in any language, as Org does.
 20
 21** Repeaters and warning periods
 22
 23After the date and time, a timestamp can carry a repeater and a warning or delay:
 24
 25#+BEGIN_SRC org
 26<2026-10-07 Wed +1w>
 27<2026-10-07 Wed 08:00 ++1d>
 28<2026-10-07 Wed .+2w>
 29<2026-10-31 Sat -3d>
 30<2026-10-31 Sat +1m -5d>
 31<2026-10-07 Wed .+2d/4d>
 32#+END_SRC
 33
 34| Element  | Meaning                                                                 |
 35|----------+-------------------------------------------------------------------------|
 36| =+1w=    | Repeat every week, counted from the date in the timestamp               |
 37| =++1w=   | Repeat every week, moving the date past today when the task is done     |
 38| =.+1w=   | Repeat one week after the day the task is done                          |
 39| =-3d=    | On a deadline, start warning 3 days before; on a scheduled date, hide it from the agenda until 3 days after |
 40| =--3d=   | As =-3d=, for the first occurrence only; it is dropped when the task repeats |
 41| =/4d=    | After a repeater, the longest interval a habit allows (see "Habits")    |
 42
 43Units are =h= (hours), =d=, =w=, =m= and =y=. What happens when a repeating task is done is described under "Repeating tasks".
 44
 45** Diary sexps
 46
 47The agenda also reads =<%%(…)>= timestamps and =%%(…)= lines with Emacs diary expressions such as =diary-float=, =diary-anniversary=, =diary-block= and =diary-cyclic=, and their =org-= counterparts. See [[file:07-agenda.org][The agenda]] for the functions that are supported. orgstar does not insert or edit these.
 48
 49* Inserting timestamps
 50
 51| Command                     | Org command          | Emacs, Doom | Mac   | Doom leader |
 52|-----------------------------+----------------------+-------------+-------+-------------|
 53| Insert Timestamp            | =org-timestamp=      | =C-c .=     | ⌃⌘.   | =SPC m d t= |
 54| Insert Inactive Timestamp   | =org-timestamp-inactive= | =C-c != | ⌃⌥⌘.  | =SPC m d T= |
 55
 56Both ask for a date in the echo area (see "The date prompt"). With the caret on an existing timestamp, they replace it with the date you give, keep its repeater, and start from its date and time. In a range of days, the caret picks the end: with the caret between the two dashes of =--= or after them, the second timestamp is replaced and the prompt starts from its date; before that, the first. Run the command again right after inserting a timestamp to add a second one and make a range, =<…>--<…>=; the second date starts from the timestamp at the caret.
 57
 58Org's prefix arguments are not available: to include the current time, type it, or use a relative time such as =+0h= (see below).
 59
 60* The date prompt
 61
 62Every command that asks for a date shows the same prompt (=org-read-date=): a text field, the date the text reads as, and a month calendar.
 63
 64- Type a date in any of the forms below. The line above the field shows the result, such as =<2026-10-09 Fri 15:00>=, as you type; for an inactive timestamp it is in square brackets, =[2026-10-09 Fri 15:00]=.
 65- Click a day in the calendar to answer with that day. A time you typed is kept.
 66- =S-<left>= and =S-<right>= in the field move the answer one day; =S-<up>= and =S-<down>= move it one week.
 67- =RET= accepts. An empty answer takes the default: the date of the timestamp being changed, or today.
 68- =Esc= cancels.
 69
 70orgstar reads the answer as Org 9.8 does, with =org-read-date-prefer-future= =t=: a date given without a year, or without a month, is taken to be the next such date from today.
 71
 72| You type           | Result                                                    |
 73|--------------------+-----------------------------------------------------------|
 74| =.=                | Today                                                     |
 75| =+0=               | Today                                                     |
 76| =+1=, =+2d=        | Tomorrow, two days from today                             |
 77| =-3d=              | Three days ago                                            |
 78| =+1w=, =+2m=, =-1y= | One week, two months from today; one year ago            |
 79| =++3=              | Three days after the default date, not after today       |
 80| =+3h=              | Three hours after the default time; sets a time           |
 81| =fri=, =mon=       | The next Friday or Monday, the default date included      |
 82| =+fri=             | The next Friday after today                               |
 83| =-fri=             | The last Friday before today                              |
 84| =+2fri=            | The second Friday from today                              |
 85| =today=, =tomorrow=, =yesterday= | Those days. orgstar's additions; Org's prompt ignores them |
 86| =next week=, =last week= | Seven days from today, forward or back. orgstar's additions |
 87| =2026-10-07=, =2026-10-7= | That date                                          |
 88| =10-7=             | 7 October, the next one                                   |
 89| =7.10.=, =7.10.2027= | 7 October (day first)                                   |
 90| =10/7=, =10/7/27=  | 7 October (month first)                                   |
 91| =15=               | The 15th, this month or next                              |
 92| =sep 15=, =15 sep= | 15 September, the next one                                |
 93| =dec 25 2027=      | 25 December 2027                                          |
 94| =w42=, =2027-w01=, =w3-5= | Monday of ISO week 42; Monday of week 1 of 2027; Friday of week 3 |
 95| =10:00=, =9:30=    | The default date at that time                             |
 96| =10am=, =3pm=, =12:30pm= | 12-hour times                                       |
 97| =10h=, =10h30=, =h45= | 10:00, 10:30, 00:45                                    |
 98| =10:00-11:30=      | A time range                                              |
 99| =10:00+1:30=       | 10:00-11:30                                               |
100| =fri 10:00=, =+2d 9:00= | A date and a time together                           |
101
102Forms without a sign, such as =fri=, =15= or =10:00=, fill in what is missing from the default date: the date of the timestamp being changed, or today. Forms with a single sign count from today; =++= counts from the default date. Two-digit years are read relative to the current year. Other words the prompt does not recognize are ignored and give the default date. =today=, =tomorrow=, =yesterday=, =next week= and =last week= are orgstar's additions, read before the rest of the answer; Org's prompt ignores them.
103
104* Changing dates
105
106| Command                      | Org command              | Emacs, Doom   | Mac  |
107|------------------------------+--------------------------+---------------+------|
108| Increase Timestamp Part      | =org-timestamp-up=       | =S-<up>=      | ⌃⌘↑  |
109| Decrease Timestamp Part      | =org-timestamp-down=     | =S-<down>=    | ⌃⌘↓  |
110| Timestamp One Day Later      | =org-timestamp-up-day=   | =S-<right>=   | ⌃⌘→  |
111| Timestamp One Day Earlier    | =org-timestamp-down-day= | =S-<left>=    | ⌃⌘←  |
112| Evaluate Time Range          | =org-evaluate-time-range= | =C-c C-y=    |      |
113
114These keys act on the timestamp when the caret is in one. Elsewhere the same keys do other things, such as changing the TODO keyword or priority on a heading line ([[file:05-todos-and-tags.org][TODOs and tags]]). In the Doom preset they work in normal and insert state, and =C-S-h=, =C-S-j=, =C-S-k= and =C-S-l= do the same as =S-<left>=, =S-<down>=, =S-<up>= and =S-<right>=.
115
116=S-<up>= and =S-<down>= change the part of the timestamp under the caret:
117
118- the year, month or day (on the day name, the day);
119- the hour, or the minute in steps of 5 (=org-time-stamp-rounding-minutes=), first rounding to a multiple of 5;
120- in a time range, the end time; changing the start time moves the end time with it;
121- the number or unit of a repeater or warning (the unit cycles =d=, =w=, =m=, =y=);
122- on the opening or closing bracket, the timestamp switches between active and inactive.
123
124=S-<left>= and =S-<right>= move the whole timestamp by a day, wherever the caret is in it. The day name is rewritten after every change. In a range of days, each end changes on its own.
125
126=C-c C-c= on a timestamp rewrites its day name to match its date. =C-c C-y= shows the length of the range at the caret, or of the first range on the line, such as =2 days 3 hours=; on a clock line it recomputes the clock's duration.
127
128* SCHEDULED and DEADLINE
129
130A planning line goes directly under the heading:
131
132#+BEGIN_SRC org
133,* TODO Submit the tax return
134DEADLINE: <2026-10-31 Sat -7d> SCHEDULED: <2026-10-20 Tue>
135#+END_SRC
136
137- =SCHEDULED= is the day you plan to start. The agenda shows the entry from that day until it is done.
138- =DEADLINE= is the day it is due. The agenda warns about it 14 days ahead (=org-deadline-warning-days= in =config.toml=), or as the timestamp's own =-Nd= says.
139
140| Command          | Org command      | Emacs, Doom | Mac  | Doom leader |
141|------------------+------------------+-------------+------+-------------|
142| Schedule         | =org-schedule=   | =C-c C-s=   | ⌃⌘S  | =SPC m d s= |
143| Set Deadline     | =org-deadline=   | =C-c C-d=   | ⌃⌘E  | =SPC m d d= |
144| Remove Schedule  | =org-schedule= with =C-u= | =C-u C-c C-s= | ⌃⌥⌘S | =SPC u SPC m d s= |
145| Remove Deadline  | =org-deadline= with =C-u= | =C-u C-c C-d= | ⌃⌥⌘E | =SPC u SPC m d d= |
146
147Schedule and Set Deadline ask for a date, starting from the entry's current one and its time. They replace an existing date, keep its repeater and warning, and remove a =CLOSED= stamp from the entry. Remove Schedule and Remove Deadline are bound to Org's =C-u= forms as separate sequences, and are in the Org menu and the command palette ([[file:03-keys.org][Keys]]).
148
149With =org-log-reschedule= or =org-log-redeadline= set to =time= or =note= in =config.toml=, or the matching =#+STARTUP= words, orgstar logs each change of an existing date and each removal:
150
151#+BEGIN_SRC org
152,* TODO Submit the tax return
153SCHEDULED: <2026-10-22 Thu>
154- Rescheduled from "[2026-10-20 Tue]" on [2026-10-19 Mon 08:40]
155#+END_SRC
156
157Where these notes go, and the =#+STARTUP= words, are covered in [[file:05-todos-and-tags.org][TODOs and tags]].
158
159* Repeating tasks
160
161When an entry with a repeater in an active timestamp changes from an active TODO keyword to a done one (=org-auto-repeat-maybe=), orgstar does not leave it done:
162
1631. The keyword returns to the first keyword of its sequence. In a =#+TYP_TODO= sequence it returns to the keyword it had. A =REPEAT_TO_STATE= property, inherited from ancestors, names another keyword to use.
1642. =CLOSED= is removed.
1653. With =org-log-repeat= on (the default, =time=), the =LAST_REPEAT= property is set to the current time and a state note is logged, such as =- State "DONE" from "TODO" [2026-10-07 Wed 18:02]=.
1664. A =SCHEDULED= date without a repeater is removed.
1675. Every active timestamp with a repeater in the entry moves forward:
168   - =+N= moves it by N once, which may leave it in the past.
169   - =++N= moves it by N until it is after today (for hours, after now).
170   - =.+N= sets it to today and then moves it by N. With hours, =.+Nh=, the new time is N hours after the current time, to the minute, and a time range loses its end time.
1716. =--= delays in those timestamps are removed.
172
173#+BEGIN_SRC org
174,* TODO Water the plants
175SCHEDULED: <2026-10-07 Wed .+3d>
176#+END_SRC
177
178Marking this done on 7 October gives:
179
180#+BEGIN_SRC org
181,* TODO Water the plants
182SCHEDULED: <2026-10-10 Sat .+3d>
183:PROPERTIES:
184:LAST_REPEAT: [2026-10-07 Wed 18:02]
185:END:
186- State "DONE"       from "TODO"       [2026-10-07 Wed 18:02]
187#+END_SRC
188
189A repeater of =0= (=+0d=) does not repeat. An hourly repeater needs a time in the timestamp; without one, orgstar reports "Cannot repeat in N hour(s) because no hour has been set". Inactive timestamps never repeat.
190
191To turn the repeat note off for a file, use =#+STARTUP: nologrepeat=; =lognoterepeat= asks for a note instead.
192
193* Effort
194
195Effort estimates live in the =Effort= property.
196
197| Command     | Org command      | Emacs, Doom   | Mac    | Doom leader   | Speed key |
198|-------------+------------------+---------------+--------+---------------+-----------|
199| Set Effort  | =org-set-effort= | =C-c C-x e=   | =⌃⇧⌘E= | =SPC m c E=   | =e=       |
200
201Set Effort asks for a value, such as =0:30= or =2:00=, starting with the current one. If the entry, an ancestor, or a =#+PROPERTY: Effort_ALL= line defines =Effort_ALL=, its values are offered as choices; you can also type another value.
202
203#+BEGIN_SRC org
204,#+PROPERTY: Effort_ALL 0:15 0:30 1:00 2:00 4:00
205#+END_SRC
206
207Effort appears in column view and in clock tables with =:properties ("Effort")=. The mode line does not show the effort beside the running clock; a notification is posted when the time clocked passes it (see /Clocking/ below).
208
209* Timers
210
211orgstar has Org's relative timer, which counts up from when it starts, and its countdown
212timer (org-timer). One timer runs at a time, for every file; it shows in the mode line as
213=<0:01:23>= (above the text on iOS) and stops when orgstar quits.
214
215| Command | Emacs | What it does |
216|-+-+-|
217| Start Timer | =C-c C-x 0= | Starts the relative timer at 0:00:00. |
218| Start Timer with Offset… | =C-u C-c C-x 0= | Asks for a value to start from, =h:mm:ss= or a shorter =m:ss= or seconds; empty takes the timer value at the caret, or 0:00:00. |
219| Insert Timer Value | =C-c C-x .= | Inserts the timer's value, as =0:01:23 =; starts the timer first when none is running. |
220| Insert Timer Item | =C-c C-x -= | Inserts a timer item, =- 0:01:23 :: =: a new item in a timer list, or a new list elsewhere. |
221| Pause or Continue Timer | =C-c C-x ,= | Pauses the timer, or lets a paused one go on. |
222| Stop Timer | =C-c C-x _=, =C-u C-c C-x ,= | Stops the timer. |
223| Set Countdown Timer… | =C-c C-x ;= | Starts a countdown for the entry's =Effort=, or asks how long: minutes, or =h:mm:ss=. |
224| Show Remaining Countdown Time | — | Says how long the countdown has left. |
225| Shift Timer Values in Region… | =C-u C-u C-c C-x 0= | Adds a difference to every =h:mm:ss= in the selection; empty makes the first one 0:00:00. |
226
227M-RET in a timer list inserts a timer item, so notes taken in a meeting can be stamped as
228they're written:
229
230#+BEGIN_SRC org
231- 0:00:05 :: Introductions
232- 0:04:40 :: Budget
233#+END_SRC
234
235When a countdown ends, orgstar shows =Heading: time out=, and a notification when it isn't
236in front. Starting a relative timer during a countdown, or a countdown during a relative
237timer, is refused until the other is stopped. =org-timer-format= (="%s "=) sets what Insert
238Timer Value writes, and =org-timer-default-timer= the countdown Set Countdown Timer… offers;
239see [[file:13-configuration.org][Configuration]].
240
241* Clocking
242
243Clocking records the time you work on an entry as =CLOCK:= lines in its =LOGBOOK= drawer.
244
245| Command                     | Org command                   | Emacs, Doom     | Mac     | Doom leader | Speed key |
246|-----------------------------+-------------------------------+-----------------+---------+-------------+-----------|
247| Clock In                    | =org-clock-in=                | =C-c C-x C-i=   | =⌃⌘I=   | =SPC m c i= | =I=       |
248| Clock In to Recent Entry…   | =org-clock-in= with =C-u=     |                 | =⌃⌥⌘I=  |             |           |
249| Clock In to Last Entry      | =org-clock-in-last=           | =C-c C-x C-x=   |         | =SPC m c I= |           |
250| Clock Out                   | =org-clock-out=               | =C-c C-x C-o=   | =⌃⇧⌘I=  | =SPC m c o= | =O=       |
251| Cancel Clock                | =org-clock-cancel=            | =C-c C-x C-q=   | =⌃⌘K=   | =SPC m c c= |           |
252| Go to Clocked Entry         | =org-clock-goto=              | =C-c C-x C-j=   | =⌃⌘J=   | =SPC m c g= |           |
253| Go to Recent Clocked Entry… | =org-clock-goto= with =C-u=   |                 | =⌃⌥⌘J=  | =SPC m c G= |           |
254| Mark as Default Clock Task  | =org-clock-mark-default-task= |                 |         | =SPC m c d= |           |
255| Resolve Open Clocks…        | =org-resolve-clocks=          | =C-c C-x C-z=   |         | =SPC m c r= |           |
256
257The Emacs keys are Org's own, and work in the Doom preset too, as every =C-c= key does. Commands without a key in your preset are in the command palette and in Org ▸ Clock, which lists every clock command with its keys, followed by the recent entries. In the agenda, =I=, =O= and =X= clock in, out and cancel for the entry at the line ([[file:07-agenda.org][The agenda]]). Capture templates can clock in too ([[file:08-capture.org][Capture]]).
258
259orgstar has no =C-u= forms of these commands. Clock In to Recent Entry… and Go to Recent Clocked Entry… stand for =C-u C-c C-x C-i= and =C-u C-c C-x C-j=.
260
261** Clocking in and out
262
263Clock In starts a clock on the heading at the caret and inserts a line at the top of its =LOGBOOK= drawer, creating the drawer after the planning line and property drawer if needed (see "The clock drawer" below for other drawers):
264
265#+BEGIN_SRC org
266,* TODO Write the report
267:LOGBOOK:
268CLOCK: [2026-10-07 Wed 09:00]
269CLOCK: [2026-10-06 Tue 14:00]--[2026-10-06 Tue 15:30] =>  1:30
270:END:
271#+END_SRC
272
273- Only one clock runs at a time. Clocking in while another clock runs clocks that one out first, and remembers it as the interrupted task (=i= in the selection below).
274- Clocking in on the entry whose clock is running changes nothing and says =Clock continues in "Write the report"=.
275- =CLOCK:= lines outside a drawer move into the new drawer the first time you clock in on that entry.
276- With =org-clock-in-switch-to-state= set to a keyword in =config.toml=, Clock In gives the entry that keyword first (unless it has it), logging and checking dependencies as =C-c C-t= does. A file without the keyword can't be clocked in, as in Org: "State `NEXT' not valid in this file".
277- Clock Out completes the line with the end time and the duration in hours and minutes. Clocks of zero minutes are kept, unless =org-clock-out-remove-zero-time-clocks= is =true=; then the line goes and the message ends with "LINE REMOVED".
278- With =org-clock-rounding-minutes= set to N, the clock starts at the multiple of N minutes nearest now that isn't later, and stops at the nearest multiple; with 5, clocking in at 14:47 starts at 14:45.
279- Marking the clocked entry done clocks out (=org-clock-out-when-done=, on by default as in Org; set it to ="nil"= to keep the clock running, or to keywords that clock out). orgstar watches the entry's heading line, so typing a done keyword yourself clocks out too.
280- When the entry has an =Effort=, a notification says "Task `…' should be finished by now. (1:00)" once the time clocked on it and its subtree passes it, counting earlier clocks as =org-clock-mode-line-total= =auto= does (since =LAST_REPEAT= for a repeating task) or as its =CLOCK_MODELINE_TOTAL= says.
281- Cancel Clock removes the running clock's line, and the drawer if it is left empty.
282- Go to Clocked Entry opens the file and moves the caret to the running clock's line. With no clock running, it goes to the most recently clocked entry and says "No running clock, this is the most recently clocked task".
283
284With no clock running, Clock In first asks about open clocks; see Open clocks below. So do the agenda's =I= and a capture template's =clock-in=.
285
286orgstar remembers the running clock and the clock history across restarts, in =clock.json= in =~/Library/Application Support/Orgstar=. If the open =CLOCK:= line is deleted from the file, Clock Out reports "Clock start time is gone" and forgets the clock.
287
288orgstar follows the open =CLOCK:= lines in the files, so a clock started or stopped in Emacs, or on another device, is the one it shows:
289
290- At launch, and as your folders load, it looks for open clock lines in the agenda files; when a file changes on disk, in that file.
291- With no clock running, the most recently started open clock it hasn't seen before becomes the running clock, and the status line says so. Older open clocks stay dangling; Clock In asks about them, as described in Open clocks below.
292- When the running clock's line is closed (Emacs clocked out) or removed, the clock stops here too, with the message "The clock in … was stopped elsewhere".
293
294Clocking out in orgstar closes the line as Org does, so Emacs sees a finished clock when it reverts the file. orgstar does not read Emacs's =org-clock-persist= file, so Emacs learns of a clock started here only from the line, when it next resolves clocks.
295
296These parts of Org's clocking are not implemented:
297
298- =org-clock-in-switch-to-state= and =org-clock-out-switch-to-state= as functions, and =org-clock-sound=: the notification uses the system's sound.
299
300** The clock drawer
301
302Where clock lines go follows =org-clock-into-drawer= in =config.toml=, or an entry's =CLOCK_INTO_DRAWER= property, which its subtree inherits:
303
304| Value          | Clock lines go                                                                                      |
305|----------------+-----------------------------------------------------------------------------------------------------|
306| =t= (default)  | into the drawer =org-log-into-drawer= (or a =LOG_INTO_DRAWER= property) names, else =LOGBOOK=          |
307| =nil=          | under the heading, newest first, without a drawer                                                   |
308| a number /n/   | under the heading until there would be /n/ of them; then all of them move into the log drawer        |
309| a drawer name  | into that drawer                                                                                    |
310
311An existing drawer of that name always takes the new line.
312
313** The running clock
314
315While a clock runs, orgstar shows it in three places, refreshed every 30 seconds:
316
317- the mode line under the editor: =⏱ 0:42 Write the report=;
318- the window's toolbar;
319- the macOS menu bar, with the elapsed time.
320
321The time shown is the time since you clocked in, not the entry's total. Each of them opens a menu with Clock Out, Cancel Clock and Go to Clocked Entry. The toolbar's menu also has Clock In to Recent Entry…, Go to Recent Clocked Entry… and the recent entries. The menu bar item also has Clock In to Recent Entry…, Clock Report and a Recent Entries section. Choosing a recent entry clocks in to it.
322
323** Recent entries
324
325orgstar keeps a clock history, as =org-clock-history=. Every clock-in, including one from the agenda or a capture template, puts the entry first in the history and removes its other entries there. The history holds =org-clock-history-length= entries (5 by default); the oldest go first.
326
327Entries are found again after edits by their =ID= property, else by the heading's position among the file's headings together with its title, else by the title alone. An entry that can't be found is dropped from the history the next time an entry is added, and left out of the selection.
328
329Clock In to Recent Entry… and Go to Recent Clocked Entry… ask for an entry in the echo area, as =org-clock-select-task= does. Each line shows its key, the entry's category padded to 12 characters, and the heading with its TODO keyword and priority, under these sections:
330
331| Key                  | Section                                         |
332|----------------------+-------------------------------------------------|
333| =d=                  | Default Task: the entry marked with Mark as Default Clock Task |
334| =i=                  | The task interrupted by starting the last one   |
335| =c=                  | Current Clocking Task                           |
336| =1= … =9=, =A=, =B=, … | Recent Tasks, most recent first               |
337
338Type a key to choose. =q=, =x= or =Esc= leave the question. With an empty history the commands say "No recent clock"; a key that isn't listed says "Invalid task choice X".
339
340Clock In to Last Entry clocks in to the first entry of the history, the same as =1=. With no clock running it says "Clocking back: Write the report (in work.org)"; with an empty history, "No last clock".
341
342Mark as Default Clock Task makes the heading at the caret the =d= entry and says "Default clock task: Write the report"; Org sets it without a message. As in Org, the default task lasts until you quit orgstar.
343
344** Open clocks
345
346An open clock is a =CLOCK:= line with a start and no end. Org calls one that isn't the running clock dangling, for example after orgstar or Emacs quit while it ran, or a line synced from another machine.
347
348When you clock in with no clock running, orgstar first looks for open clocks in the org files of your folders and in the open buffers (=org-clock-auto-clock-resolution= set to =when-no-clock-is-running=), and asks about each one:
349
350#+BEGIN_EXAMPLE
351Dangling clock started 95 mins ago [jkKtTgGSscCiq]?
352#+END_EXAMPLE
353
354Clocking in from the agenda (=I=) or from a capture template with =clock-in= asks too, as =org-clock-in= does in Org. A capture template resolves open clocks as of when the capture began, which is when its clock starts. On the Mac, the questions for an agenda or capture clock-in are asked in the main window's echo area.
355
356Resolve Open Clocks… asks the same about every open clock, the running one included, and says "No open clocks" when there are none.
357
358Unlike Org, orgstar doesn't show the clock's line while it asks; =j= opens it afterwards, except while clocking in.
359
360The answer is a key, as in =org-clock-resolve=. The idle time is the time since the clock started, for an open clock, or since you stopped using the Mac, for an idle one (see Idle time below).
361
362| Key            | What happens to the =CLOCK:= line                                                                   |
363|----------------+-----------------------------------------------------------------------------------------------------|
364| =j=            | Nothing; the line opens in the editor to adjust by hand (after the clock-in, when you were clocking in). |
365| =J=            | Ends the line now, then opens it in the editor.                                                     |
366| =k=            | Asks how many minutes of the idle time to keep, all of them by default. With all, the clock keeps running. With fewer, the line ends that many minutes after the idle time began, and a new clock starts now. |
367| =K=            | Asks the same, then ends the line after the minutes kept and leaves you clocked out.               |
368| =t=            | Like =k=, but asks for the date and time you got distracted; the line ends then.                    |
369| =T=            | Like =t=, then leaves you clocked out.                                                              |
370| =g=            | Asks how many minutes ago you got back, all of the idle time by default. The line ends when the idle time began, and a new clock starts that many minutes ago. |
371| =G=            | Like =g=, but leaves you clocked out: the line ends when the idle time began.                       |
372| =s=            | Subtracts the idle time: the line ends when the idle time began, and a new clock starts now.        |
373| =S=            | Subtracts the idle time and leaves you clocked out.                                                 |
374| =C=            | Removes the line, as though you never clocked in.                                                   |
375| =i=, =q=, =Esc= | Leaves the line as it is, keeping all the idle time.                                               |
376
377- =k=, =K=, =g= and =G= ask for minutes with the default in the question, as =Keep how many minutes (default 95):=; Return with an empty field takes the default.
378- =t= and =T= ask =Date+time:= with Org's date syntax, as =14:00= or =-1h=.
379- If the clock ran less than 45 seconds before the idle time began, =s= removes the line and starts a new clock now, and =S= removes it. For an open clock all its time is idle time, so =s= and =S= remove its line.
380- Any other key asks again.
381
382While clocking in, an answer never restarts the clock it resolves: where a key would start a new clock or keep one running, the line ends instead, and the clock you asked for starts. Resolving an open clock that isn't running with =k= and all the minutes, outside a clock-in, makes it the running clock.
383
384When =K=, =T= or =S= ends a clock outside a clock-in, the next clock-in, from the agenda or a capture template too, asks:
385
386#+BEGIN_EXAMPLE
387You stopped another clock 12 mins ago; start this one from then? (y or n)
388#+END_EXAMPLE
389
390=y= starts the new clock when the old one ended.
391
392** Idle time
393
394On the Mac, set =org-clock-idle-time= to a number of minutes, or turn on Settings ▸ Agenda ▸ "Ask what to do with idle time while clocked in", to be asked about time away from the Mac. The default, =0=, never asks, as =nil= does in Emacs.
395
396While a clock runs, orgstar checks every minute how long the Mac has had no keyboard or mouse input, in any app. Past the limit, it requests your attention, which bounces its Dock icon while another app is active, and asks in the echo area:
397
398#+BEGIN_EXAMPLE
399Clocked in & idle for 17.3 mins [jkKtTgGSscCiq]?
400#+END_EXAMPLE
401
402The keys are those in the table above, with the idle time starting when input stopped. The iOS app has no idle detection.
403
404** Editing clock lines
405
406You can edit clock lines by hand. =S-<up>=, =S-<down>=, =S-<left>= and =S-<right>= change their timestamps as anywhere else, and then write the duration after ~=>~ again, as =H:MM=. After typing changes yourself, press =C-c C-c= (or =C-c C-y=) on the line: orgstar fixes both day names and writes the duration again (=org-clock-update-time-maybe=).
407
408=C-c .= on a clock line's range replaces one of its timestamps, as in any range of days (see "Inserting timestamps").
409
410A line of the form ~CLOCK: => 1:15~, with only a duration, counts towards clock tables.
411
412* Clock summaries
413
414** The inspector
415
416View ▸ Show or Hide Columns and Clock opens the inspector beside the editor. Its Clock tab lists the clocked time per heading in the open file for Today, This Week (weeks start on Monday) or All, with a total. Clicking a heading moves to it. Only finished clocks count.
417
418** The clock report window
419
420Clock Report (=SPC m c R= and =SPC z t= in Doom, the command palette, or the clock menus) opens a window that totals time across files. Choose files on the left; files with clock lines are selected when the window opens. Turn on From to limit the report to a range of dates. The report is an Org table of time per date and heading, with a total after each ISO week:
421
422#+BEGIN_SRC org
423,#+title: Time Report
424
425| Date         | Code                                          | Hours |
426|--------------+-----------------------------------------------+-------|
427| 2026-10-05   | Write the report                              |  2:15 |
428| 2026-10-06   | Write the report                              |  1:30 |
429|--------------+-----------------------------------------------+-------|
430| 2026-W41     | WEEK TOTAL                                    |  3:45 |
431#+END_SRC
432
433Copy puts it on the clipboard; Save writes it to a file.
434
435* Clock tables
436
437A clock table is a dynamic block that orgstar fills with a summary of clocked time (=org-clocktable-write-default=).
438
439| Command                         | Org command          | Emacs, Doom     |
440|---------------------------------+----------------------+-----------------|
441| Insert or Update Clock Table    | =org-clock-report=   | =C-c C-x C-r=   |
442| Update Dynamic Block            | =org-update-dblock=  | =C-c C-x C-u=   |
443
444=C-c C-c= on the =#+BEGIN:= line also updates the block; in the Mac preset, =⌃⌘X= does.
445
446Insert or Update Clock Table updates the clock table at the caret. Elsewhere it inserts a new one, with =:scope subtree= inside an entry or =:scope file= before the first heading, and fills it:
447
448#+BEGIN_SRC org
449,#+BEGIN: clocktable :scope file :maxlevel 2 :block thisweek
450,#+CAPTION: Clock summary at [2026-10-07 Wed 17:00], for week 2026-W41.
451| Headline         | Time   |      |
452|------------------+--------+------|
453| *Total time*     | *5:15* |      |
454|------------------+--------+------|
455| Project Alpha    | 5:15   |      |
456| \_  Design       |        | 3:00 |
457| \_  Write code   |        | 2:15 |
458,#+END:
459#+END_SRC
460
461Times are written as =H:MM=, with a day count such as =2d= before them for a day or more. A heading's time includes its subtree's. Only finished clock lines and ~CLOCK: => H:MM~ lines count; a running clock does not. A =COMMENT= prefix is left out of headlines.
462
463** Parameters
464
465| Parameter         | Values                                         | Default   |
466|-------------------+------------------------------------------------+-----------|
467| =:scope=          | =file= (or =nil=), =subtree=, =tree=, =treeN=, =agenda=, =agenda-with-archives=, =file-with-archives=, or a list of files such as =("work.org" "~/notes/")= | =file= |
468| =:maxlevel=       | Deepest heading level listed                   | =2=       |
469| =:block=          | A time block (see below)                       | none      |
470| =:tstart=, =:tend= | Start and end, such as ="<2026-09-01>"=, ="<today>"=, ="<-1w>"= | none |
471| =:wstart=         | First day of the week for =:block= weeks, =1= is Monday | =1=  |
472| =:mstart=         | First day of the month for =:block= months     | =1=       |
473| =:link=           | =t=: headlines link to their headings          | =nil=     |
474| =:narrow=         | =N= adds a =<N>= width cookie; =N!= cuts headlines to N characters | =40!= |
475| =:indent=         | =t=: indent sublevels with =\_=                | =t=       |
476| =:compact=        | =t=: one time column, indented, cut to 40 characters | =nil= |
477| =:emphasize=      | =t=: level 1 bold, level 2 italic              | =nil=     |
478| =:lang=           | The language of the caption and column titles: =en=, =de=, =es=, =fr=, =nl=, =nn=, =pl=, =pt-BR= or =sk= (=org-clock-clocktable-language-setup=); others are English | =org-export-default-language= |
479| =:level=          | =t=: a column with the level                   | =nil=     |
480| =:tags=           | =t=: a column with the tags, inherited ones first | =nil=  |
481| =:properties=     | A list of property names, such as =("Effort")=, one column each | none |
482| =:tcolumns=       | Number of time columns                         | up to =:maxlevel= |
483| =:formula=        | =%= adds a percentage column; a string becomes the table's =#+TBLFM= | none |
484| =:match=          | A tag and property match, as for the agenda; only matching headings' own time counts | none |
485| =:step=           | =day=, =week=, =semimonth=, =month=, =quarter= or =year=: a table per step of =:block= or =:tstart= to =:tend= | none |
486| =:stepskip0=      | =t=: leave out steps without time              | =nil=     |
487| =:fileskip0=      | =t=: leave out files without time              | =nil=     |
488| =:hidefiles=      | =t=: no File column over several files         | =nil=     |
489| =:filetitle=      | =t=: name files by their =#+TITLE=             | =nil=     |
490| =:header=         | Text written in place of the =#+CAPTION= line  | none      |
491
492=:scope tree= covers the top-level tree around the block; =tree2= the tree from its level-2 ancestor, and so on. =:block= takes precedence over =:tstart= and =:tend=. Clocks that cross the start or end of the range count only the part inside it.
493
494=:block= values:
495
496| Value                                     | Range                                   |
497|-------------------------------------------+-----------------------------------------|
498| =today=, =yesterday=, =today-N=           | One day                                 |
499| =thisweek=, =lastweek=, =thisweek-N=      | One week, from =:wstart=                |
500| =thismonth=, =lastmonth=, =thismonth-N=   | One month, from =:mstart=               |
501| =thisyear=, =lastyear=, =thisyear-N=      | One year                                |
502| =2026=, =2026-10=, =2026-W41=, =2026-10-07= | That year, month, ISO week or day     |
503
504=week=, =month= and =year= are the same as =thisweek=, =thismonth= and =thisyear=, and a =+N= suffix moves forward.
505
506A =#+TBLFM= line already under the table is kept when the table is updated, unless =:formula= gives one.
507
508** Other files
509
510=:scope agenda= sums the agenda files (see [[file:07-agenda.org][The agenda]]), and =agenda-with-archives= adds each one's archive files: the one its =#+ARCHIVE:= or =org-archive-location= names, and those its =ARCHIVE= properties name, where they exist. =file-with-archives= is this file with its archives, summed as one file. A list names files, relative to this file's folder; a folder in the list gives its =.org= files, which Org doesn't do. Over several files the table gets a File column and a row with each file's total before its headings:
511
512#+BEGIN_SRC org
513| File     | Headline         | Time   |      |
514|----------+------------------+--------+------|
515|          | ALL *Total time* | *3:30* |      |
516|----------+------------------+--------+------|
517| work.org | *File time*      | *1:30* |      |
518|          | Project Alpha    | 1:30   |      |
519|          | \_  Design       |        | 0:30 |
520#+END_SRC
521
522Other files are read from disk, so unsaved edits in another open file don't count; this file's buffer does. With =:link t=, headlines link to =file:PATH::*Heading=.
523
524** Steps
525
526=:step= writes a table for each day, week (from =:wstart=), half month, month (from =:mstart=), quarter or year of the range, each after a line such as =Daily report: [2026-10-05 Mon]= or =Weekly report starting on: [2026-10-05 Mon]=, without captions. It needs =:block=, or both =:tstart= and =:tend=.
527
528=:match= takes a match such as ="work"=, ="-home"= or ~"TODO=\"DONE\""~. Headings that don't match add none of their own time, but the headings above a matching one are still listed with its time.
529
530Not supported: =:formatter=, which is ignored along with other unknown parameters, and scopes given as functions. Labels are in English only.
531
532* Habits
533
534A habit is a repeating task whose history the agenda shows as a consistency graph (=org-habit=). Define one with the =STYLE= property and a =SCHEDULED= date with a repeater:
535
536#+BEGIN_SRC org
537,* TODO Go for a run
538SCHEDULED: <2026-10-07 Wed .+2d/4d>
539:PROPERTIES:
540:STYLE:    habit
541:END:
542:LOGBOOK:
543- State "DONE"       from "TODO"       [2026-10-05 Mon 07:30]
544- State "DONE"       from "TODO"       [2026-10-03 Sat 07:10]
545:END:
546#+END_SRC
547
548- The repeater sets the interval you aim for. Use =.+= for most habits, so the next date counts from when you last did it.
549- The optional =/4d= sets the longest acceptable interval. It must be longer than the repeater.
550- The repeater's unit must be =d=, =w=, =m= or =y=. A month counts as 30.4 days and a year as 365.25.
551- The history comes from the entry's state notes for done keywords and its =CLOSING NOTE= lines, up to 28 of them. Those are written when the task repeats, as long as =org-log-repeat= is on (the default), or when =org-log-done= is =note=.
552
553How habits appear in the agenda, with the graph covering 21 days back and 7 ahead, is described in [[file:07-agenda.org][The agenda]].
554
555* Reminders
556
557orgstar can post a macOS notification before entries that have a time of day, as Emacs's =appt= does with =org-agenda-to-appt=.
558
559- It covers the agenda's files and the next 7 days: scheduled items, deadlines, plain active timestamps and date ranges with a time, that are not done.
560- Each reminder comes the lead time before the entry's time: 12 minutes by default (=appt-message-warning-time=). An =APPT_WARNTIME= property on the entry, in minutes, overrides it.
561- If the warning time has already passed when orgstar sets a reminder but the entry has not started, the notification comes at once.
562- At most 64 reminders are pending at a time, the earliest first.
563- The notification shows the entry's text, its time, and its category. Clicking it opens the entry. Notifications also show while orgstar is the active app.
564
565orgstar updates the reminders a couple of seconds after you stop editing, when files change, and every hour. The agenda window shows how far ahead reminders are set. Reminders already set still arrive after you quit orgstar; changes to your files are taken into account the next time it runs.
566
567Turn reminders on or off, and set the lead time from 0 to 120 minutes, in Settings ▸ Agenda; in =config.toml= the keys are =reminders= under =[orgstar]= (default =true=) and =appt-message-warning-time=. The first time, macOS asks whether orgstar may post notifications; if you decline, the agenda says so, and you can change it in System Settings ▸ Notifications. The iOS app's reminders are described in [[file:14-ios.org][iOS]].