Clocks: org-clock-into-drawer and CLOCK_INTO_DRAWER !255

merged merged by cmc on 2026-10-11 08:49 UTC · krz/orgstar:clock-into-drawer into main

11 files changed, +156 −30

Layout: unified · split

Sources/OrgApp/EmacsImport.swift +2
@@ -543,6 +543,8 @@ public struct EmacsImport: Sendable {
543543 case "org-clock-idle-time":
544544 // nil is never; a number is minutes.
545545 if value.symbol == "nil" { add(name, .integer(0)) } else if let minutes = value.integer, minutes > 0 { add(name, .integer(minutes)) } else { note("not a number of minutes") }
546 case "org-clock-into-drawer":
547 if let drawer = value.string { add(name, .string(drawer)) } else if let n = value.integer { add(name, .string("\(n)")) } else { add(name, .string(truthy ? "t" : "nil")) }
546548 case "org-clock-history-length":
547549 guard let length = value.integer, length > 0 else { return note("not a positive number") }
548550 add(name, .integer(length))
Sources/OrgApp/OrgPreferences.swift +1
@@ -36,6 +36,7 @@ public enum OrgPreferences {
3636 options.enforceTodoDependencies = bool("enforceTodoDependencies", defaults)
3737 options.enforceTodoCheckboxDependencies = bool("enforceTodoCheckboxDependencies", defaults)
3838 options.archiveLocation = string("archiveLocation", defaults).nonEmpty
39 options.clockIntoDrawer = string("clockIntoDrawer", defaults).nonEmpty
3940 let templates = UserConfig.structureTemplates(defaults)
4041 options.structureTemplates = templates.isEmpty ? nil : StructureTemplate.merged(templates)
4142 options.trackOrderedPropertyWithTag = switch string("trackOrderedTag", defaults) {
Sources/OrgApp/UserConfig.swift +2
@@ -185,6 +185,8 @@ public enum UserConfig {
185185 comment: "minutes of warning before timed entries; APPT_WARNTIME overrides", legacy: "agenda.reminder-lead"),
186186 Setting(section: "", key: "org-clock-idle-time", defaultsKey: "clockIdleTime", kind: .integer, fallback: .integer(0),
187187 comment: "minutes idle with a clock running before asking what to do with the time; 0 never (nil)", legacy: ""),
188 Setting(section: "", key: "org-clock-into-drawer", defaultsKey: "clockIntoDrawer", kind: .string, fallback: .string("t"),
189 comment: "t: clock lines go in the log drawer (LOGBOOK); nil: none; a number: once there are that many; or a drawer name", legacy: ""),
188190 Setting(section: "", key: "org-clock-history-length", defaultsKey: "clockHistoryLength", kind: .integer, fallback: .integer(5),
189191 comment: "recently clocked entries to remember", legacy: ""),
190192 Setting(section: "org-agenda-prefix-format", key: "agenda", defaultsKey: "agendaPrefixAgenda", kind: .string, fallback: .string(PrefixFormat.defaults["agenda"]!),
Sources/OrgCore/Commands/Clock.swift +72 −16
@@ -1,11 +1,46 @@
11import Foundation
22
3// Clocking (org-clock.el, Org 9.8.7) with `org-clock-into-drawer` t (a LOGBOOK drawer),
4// `org-log-states-order-reversed` t (newest first), no rounding, no resume, and zero-time
5// clocks kept.
3// Clocking (org-clock.el, Org 9.8.7) with `org-clock-into-drawer` and the CLOCK_INTO_DRAWER
4// property, `org-log-states-order-reversed` t (newest first), no rounding, no resume, and
5// zero-time clocks kept.
66
77extension EmacsBuffer {
8 static let clockDrawer = "LOGBOOK"
8 /// What `org-clock-into-drawer` comes to for an entry.
9 enum ClockDrawer: Equatable {
10 case none
11 /// Into the drawer once there are this many clock lines.
12 case count(Int)
13 case named(String)
14 }
15
16 /// `org-log-into-drawer` for the entry: the setting, `#+STARTUP: logdrawer` and the
17 /// LOG_INTO_DRAWER property.
18 func logIntoDrawer() -> String? { logSettings().drawer }
19
20 /// `org-clock-into-drawer` (the function): the entry's CLOCK_INTO_DRAWER over the setting.
21 func clockIntoDrawer() -> ClockDrawer {
22 func read(_ value: String) -> ClockDrawer? {
23 switch value.trimmingCharacters(in: .whitespaces) {
24 case "nil": return ClockDrawer.none
25 case "t": return .named(logIntoDrawer() ?? "LOGBOOK")
26 case "": return nil
27 case let text where text.allSatisfy(\.isASCII) && text.allSatisfy(\.isNumber): return .count(Int(text) ?? 0)
28 case let name: return .named(name)
29 }
30 }
31 if let property = inheritedProperty("CLOCK_INTO_DRAWER")?.value, let value = read(property) { return value }
32 return options.clockIntoDrawer.flatMap(read) ?? .named(logIntoDrawer() ?? "LOGBOOK")
33 }
34
35 /// `org-clock-drawer-name`.
36 func clockDrawerName() -> String? {
37 switch clockIntoDrawer() {
38 case .none: nil
39 case .count: logIntoDrawer() ?? "LOGBOOK"
40 case .named(let name): name
41 }
42 }
43
944 static let openClockPattern = "^[ \\t]*CLOCK: \\[([0-9]{4}-[0-9]{2}-[0-9]{2} *[^\\]\\s]+ +[012][0-9]:[0-5][0-9])\\][ \\t]*$"
1045
1146 /// `org-clock-find-position` without `find-unclosed`.
@@ -15,13 +50,17 @@ extension EmacsBuffer {
1550 _ = outlineNextHeading()
1651 return point
1752 }
18 let drawerPattern = "^[ \\t]*:" + Self.clockDrawer + ":[ \\t]*$"
19 point = beg
20 while let match = searchForward(drawerPattern, bound: end, caseInsensitive: false) {
21 if element(at: lineStart(match[0]!.lowerBound))?.kind == .drawer {
22 point = match[0]!.upperBound
23 forwardLine(1)
24 return
53 let into = clockIntoDrawer()
54 let drawer = clockDrawerName()
55 if let drawer {
56 let drawerPattern = "^[ \\t]*:" + NSRegularExpression.escapedPattern(for: drawer) + ":[ \\t]*$"
57 point = beg
58 while let match = searchForward(drawerPattern, bound: end, caseInsensitive: false) {
59 if element(at: lineStart(match[0]!.lowerBound))?.kind == .drawer {
60 point = match[0]!.upperBound
61 forwardLine(1)
62 return
63 }
2564 }
2665 }
2766 point = beg
@@ -34,8 +73,25 @@ extension EmacsBuffer {
3473 if positions.isEmpty {
3574 endOfMetaData()
3675 if !bolp { insertBeforeMarkers("\n") }
37 insertBeforeMarkers(":" + Self.clockDrawer + ":\n:END:\n")
38 forwardLine(-1)
76 let creates: Bool = switch into {
77 case .none: false
78 case .count(let n): n < 2
79 case .named: true
80 }
81 if creates, let drawer {
82 insertBeforeMarkers(":" + drawer + ":\n:END:\n")
83 forwardLine(-1)
84 }
85 return
86 }
87 // Without a drawer, or with fewer clocks than the setting's number, the new clock goes
88 // first.
89 let wraps: Bool = switch into {
90 case .count(let n): positions.count + 1 >= n
91 default: drawer != nil
92 }
93 guard wraps, let drawer else {
94 point = positions.last!
3995 return
4096 }
4197 // Clocks outside a drawer move into a new one.
@@ -58,7 +114,7 @@ extension EmacsBuffer {
58114 let endMarker = marker(point)
59115 defer { release(endMarker) }
60116 point = start
61 saveExcursion { insertBeforeMarkers(":" + Self.clockDrawer + ":\n") }
117 saveExcursion { insertBeforeMarkers(":" + drawer + ":\n") }
62118 forwardLine(1)
63119 }
64120
@@ -136,13 +192,13 @@ extension EmacsBuffer {
136192 /// `org-clock-remove-empty-clock-drawer` for the subtree at point.
137193 func removeEmptyClockDrawer() {
138194 saveExcursion {
139 guard let heading = try? backToHeading() else { return }
195 guard let heading = try? backToHeading(), let drawer = clockDrawerName() else { return }
140196 let end = saveExcursion { () -> Int in
141197 point = heading
142198 return endOfSubtree()
143199 }
144200 point = heading
145 let pattern = "(?i)^[ \\t]*:" + Self.clockDrawer + ":[ \\t]*$"
201 let pattern = "(?i)^[ \\t]*:" + NSRegularExpression.escapedPattern(for: drawer) + ":[ \\t]*$"
146202 while let match = searchForward(pattern, bound: end, caseInsensitive: true) {
147203 removeEmptyDrawer(at: match[0]!.upperBound)
148204 }
Sources/OrgCore/Commands/Command.swift +3
@@ -27,6 +27,9 @@ public struct EditingOptions: Sendable, Equatable, Codable {
2727 public var enforceTodoDependencies = false
2828 /// `org-enforce-todo-checkbox-dependencies`: an entry can't become done with unchecked boxes.
2929 public var enforceTodoCheckboxDependencies = false
30 /// `org-clock-into-drawer` as `config.toml` writes it: `nil`, `t`, a number of clock lines,
31 /// or a drawer name; nil for Org's default, `t`.
32 public var clockIntoDrawer: String?
3033 /// `org-structure-template-alist`, for C-c C-, and `<` completion; nil for Org's.
3134 public var structureTemplates: [StructureTemplate]?
3235 /// `org-archive-location`, for entries without an `ARCHIVE` property or `#+ARCHIVE:`; nil
Tests/OrgAppTests/EmacsImportTests.swift +3 −2
@@ -48,6 +48,7 @@ struct EmacsImportTests {
4848 org-agenda-todo-ignore-scheduled 'future
4949 org-agenda-todo-ignore-deadlines 7
5050 org-agenda-log-mode-items '(closed clock state)
51 org-clock-into-drawer "CLOCKS"
5152 org-agenda-start-day "-3d"
5253 org-clock-idle-time 15
5354 org-clock-history-length 10
@@ -93,7 +94,7 @@ struct EmacsImportTests {
9394 #expect(s["org-agenda-start-on-weekday"] == .string("0"))
9495 #expect(s["org-track-ordered-property-with-tag"] == .string("t"))
9596 #expect(s["org-archive-location"] == .string("archive/%s::"))
96 #expect(s["org-agenda-log-mode-items"] == .string("closed clock state"))
97 #expect(s["org-agenda-log-mode-items"] == .string("closed clock state") && s["org-clock-into-drawer"] == .string("CLOCKS"))
9798 #expect(s["org-agenda-todo-ignore-scheduled"] == .string("future") && s["org-agenda-todo-ignore-deadlines"] == .string("7"))
9899 #expect(s["org-agenda-start-day"] == .string("-3d"))
99100 #expect(s["org-clock-idle-time"] == .integer(15))
@@ -186,7 +187,7 @@ struct EmacsImportTests {
186187 let keymap = folder.appendingPathComponent("keymap.toml")
187188 #expect(KeymapLoader.load(.doom, userFile: keymap).problems.isEmpty)
188189 #expect(KeymapLoader.load(.doom, userFile: keymap).keymap.keyLabels(for: "app.agenda", modes: ["normal"]).contains("C-c a"))
189 #expect(summary.hasPrefix("Imported 26 settings, 3 capture templates, 3 key bindings, 2 structure templates."), "\(summary)")
190 #expect(summary.hasPrefix("Imported 27 settings, 3 capture templates, 3 key bindings, 2 structure templates."), "\(summary)")
190191 #expect(UserConfig.structureTemplates(defaults) == [.init(key: "el", type: "src emacs-lisp"), .init(key: "q", type: "QUOTE")])
191192 #expect(OrgPreferences.options(defaults).structureTemplates?.first { $0.key == "q" }?.type == "QUOTE")
192193 #expect(defaults.string(forKey: "themeFont") == "JetBrains Mono")
Tests/OrgAppTests/OrgPreferencesTests.swift +2 −1
@@ -35,6 +35,7 @@ struct OrgPreferencesTests {
3535 org-agenda-todo-ignore-deadlines = "t"
3636 org-agenda-todo-ignore-scheduled = "-2"
3737 org-agenda-log-mode-items = "closed state"
38 org-clock-into-drawer = "3"
3839 org-M-RET-may-split-line = true
3940 org-hide-emphasis-markers = false
4041 org-pretty-entities = false
@@ -52,7 +53,7 @@ struct OrgPreferencesTests {
5253 #expect(OrgPreferences.options(defaults).trackOrderedPropertyWithTag == "ORDERED")
5354 #expect(OrgPreferences.options(defaults).archiveLocation == "~/org/archive.org::* %s")
5455 let ignoring = OrgPreferences.agendaOptions(AgendaOptions(), defaults)
55 #expect(ignoring.logItems == ["closed", "state"])
56 #expect(ignoring.logItems == ["closed", "state"] && OrgPreferences.options(defaults).clockIntoDrawer == "3")
5657 #expect(ignoring.todoIgnoreDeadlines == .near && ignoring.todoIgnoreScheduled == .days(-2) && ignoring.todoIgnoreTimestamp == .off)
5758 #expect(OrgPreferences.agendaOptions(AgendaOptions(), defaults).deadlineWarningDays == 5)
5859 #expect(!OrgPreferences.reminders(defaults) && OrgPreferences.reminderLead(defaults) == 30)
Tests/OrgCoreTests/ClockTests.swift +52 −7
@@ -21,8 +21,8 @@ struct ClockTests {
2121 return c
2222 }
2323
24 func run(_ command: any OrgCommand, _ text: String, caret: Int, at seconds: Int) -> (text: String, caret: Int, failure: String?) {
25 let context = EditContext(revision: 0, text: text, tree: OrgParser.parse(text), selection: [caret..<caret], now: Date(timeIntervalSince1970: Double(seconds)), calendar: Self.utc)
24 func run(_ command: any OrgCommand, _ text: String, caret: Int, at seconds: Int, options: EditingOptions = .org) -> (text: String, caret: Int, failure: String?) {
25 let context = EditContext(revision: 0, text: text, tree: OrgParser.parse(text), selection: [caret..<caret], now: Date(timeIntervalSince1970: Double(seconds)), calendar: Self.utc, options: options)
2626 switch command.run(in: context) {
2727 case .commit(let result):
2828 var new = text
@@ -35,27 +35,50 @@ struct ClockTests {
3535
3636 @Test(.enabled(if: ProcessInfo.processInfo.environment["ORGSTAR_SKIP_ORACLE"] == nil))
3737 func matchesEmacs() throws {
38 try compare(Self.texts)
39 }
40
41 /// `org-clock-into-drawer` values, `org-log-into-drawer`, and the CLOCK_INTO_DRAWER and
42 /// LOG_INTO_DRAWER properties.
43 @Test(.enabled(if: ProcessInfo.processInfo.environment["ORGSTAR_SKIP_ORACLE"] == nil))
44 func intoDrawerMatchesEmacs() throws {
45 let texts = Self.texts + [
46 "* Task\nCLOCK: [2026-10-03 Sat 09:00]--[2026-10-03 Sat 10:00] => 1:00\nCLOCK: [2026-10-04 Sun 09:00]--[2026-10-04 Sun 10:00] => 1:00\n",
47 "* Task\n:PROPERTIES:\n:CLOCK_INTO_DRAWER: nil\n:END:\nBody\n",
48 "* Parent\n:PROPERTIES:\n:CLOCK_INTO_DRAWER: TIMES\n:END:\n** Task\nBody\n",
49 "* Task\n:PROPERTIES:\n:CLOCK_INTO_DRAWER: 2\n:END:\nCLOCK: [2026-10-04 Sun 09:00]--[2026-10-04 Sun 10:00] => 1:00\n",
50 "* Task\n:PROPERTIES:\n:CLOCK_INTO_DRAWER: t\n:LOG_INTO_DRAWER: NOTES\n:END:\n",
51 ]
52 for (lisp, value, log) in [("nil", "nil", nil), ("2", "2", nil), ("3", "3", nil), ("\"CLOCKS\"", "CLOCKS", nil), ("t", nil, "NOTES"), ("2", "2", "NOTES")] as [(String, String?, String?)] {
53 var options = EditingOptions.org
54 options.clockIntoDrawer = value
55 options.logIntoDrawer = log
56 try compare(texts, lisp: lisp, log: log.map { "\"\($0)\"" } ?? "nil", options: options)
57 }
58 }
59
60 func compare(_ texts: [String], lisp: String = "t", log: String = "nil", options: EditingOptions = .org) throws {
3861 let t1 = 1_789_000_000 // Thu 2026-09-10 00:26
3962 let t2 = t1 + 3 * 3600 + 17 * 60 + 42
4063 var cases: [EmacsOracle.Case] = []
4164 var ours: [(String, String)] = []
42 for text in Self.texts {
65 for text in texts {
4366 let caret = (text as NSString).range(of: "Task").location
4467 for mode in ["out", "cancel"] {
4568 // Clock in at t1, then out (or cancel) at t2.
46 let first = run(ClockIn(), text, caret: caret, at: t1)
69 let first = run(ClockIn(), text, caret: caret, at: t1, options: options)
4770 guard let start = ClockIn.runningStart(in: first.text, near: caret) else {
4871 ours.append(("no running clock: \(first.failure ?? "")", text))
4972 cases.append(EmacsOracle.Case(text: text, point: 1, form: "nil"))
5073 continue
5174 }
52 let second = run(ClockOut(start: start, cancel: mode == "cancel"), first.text, caret: first.caret, at: t2)
75 let second = run(ClockOut(start: start, cancel: mode == "cancel"), first.text, caret: first.caret, at: t2, options: options)
5376 ours.append((second.text, first.text))
5477 let out = mode == "cancel" ? "(org-clock-cancel)" : "(org-clock-out)"
5578 cases.append(EmacsOracle.Case(text: text, point: EmacsOracle.point(caret, in: text), form: """
5679 (progn
5780 (require 'org-clock)
58 (setq org-clock-persist nil org-clock-idle-time nil org-clock-auto-clock-resolution nil org-clock-into-drawer t)
81 (setq org-clock-persist nil org-clock-idle-time nil org-clock-auto-clock-resolution nil org-clock-into-drawer \(lisp) org-log-into-drawer \(log))
5982 \(frozenClock(t1, "(org-clock-in)"))
6083 (setq orgstar-after-in (buffer-substring-no-properties (point-min) (point-max)))
6184 \(frozenClock(t2, out)))
@@ -64,7 +87,7 @@ struct ClockTests {
6487 }
6588 let emacs = try EmacsOracle.run(cases)
6689 for (i, (mine, theirs)) in zip(ours, emacs).enumerated() {
67 #expect(mine.0 == theirs.text, "case \(i) \(cases[i].form.contains("cancel") ? "cancel" : "out")\n\(cases[i].text.debugDescription)\nafter in (ours): \(mine.1.debugDescription)\nours: \(mine.0.debugDescription)\nemacs: \(theirs.text.debugDescription) \(theirs.error)")
90 #expect(mine.0 == theirs.text, "case \(i) \(lisp) \(cases[i].form.contains("cancel") ? "cancel" : "out")\n\(cases[i].text.debugDescription)\nafter in (ours): \(mine.1.debugDescription)\nours: \(mine.0.debugDescription)\nemacs: \(theirs.text.debugDescription) \(theirs.error)")
6891 }
6992 }
7093}
@@ -139,3 +162,25 @@ struct ClockReportTests {
139162 }
140163 }
141164}
165
166struct ClockDrawerStartupTests {
167 @Test(.enabled(if: ProcessInfo.processInfo.environment["ORGSTAR_SKIP_ORACLE"] == nil))
168 func startupLogdrawerMatchesEmacs() throws {
169 let text = "#+STARTUP: nologdrawer\n* Task\nBody\n"
170 let caret = (text as NSString).range(of: "Task").location
171 let t1 = 1_789_000_000
172 var options = EditingOptions.org
173 options.logIntoDrawer = "NOTES"
174 let context = EditContext(revision: 0, text: text, tree: OrgParser.parse(text), selection: [caret..<caret], now: Date(timeIntervalSince1970: Double(t1)), calendar: ClockTests.utc, options: options)
175 guard case .commit(let result) = ClockIn().run(in: context) else { Issue.record("no commit"); return }
176 let ours = result.edits.sorted { $0.range.lowerBound > $1.range.lowerBound }.reduce(text) { $1.apply(to: $0) }
177 let emacs = try EmacsOracle.run([EmacsOracle.Case(text: text, point: EmacsOracle.point(caret, in: text), form: """
178 (progn (require 'org-clock)
179 (setq org-clock-persist nil org-clock-idle-time nil org-clock-auto-clock-resolution nil org-clock-into-drawer t)
180 (setq-default org-log-into-drawer "NOTES")
181 (org-mode)
182 \(frozenClock(t1, "(org-clock-in)")))
183 """)])
184 #expect(ours == emacs[0].text, "ours: \(ours.debugDescription)\nemacs: \(emacs[0].text.debugDescription) \(emacs[0].error)")
185 }
186}
docs/manual/guide/06-dates-and-clocking.org +15 −3
@@ -226,7 +226,7 @@ orgstar has no =C-u= forms of these commands. Clock In to Recent Entry… and Go
226226
227227** Clocking in and out
228228
229Clock 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:
229Clock 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):
230230
231231#+BEGIN_SRC org
232232,* TODO Write the report
@@ -250,8 +250,20 @@ orgstar remembers the running clock and the clock history across restarts, in =c
250250These parts of Org's clocking are not implemented:
251251
252252- sharing the running clock with Emacs: orgstar does not read or write Emacs's =org-clock-persist= file, so a clock started in one is not known to the other, although both see the open =CLOCK:= line;
253- rounding, changing the TODO state on clock-in (=org-clock-in-switch-to-state=), and clocking out when the entry is marked done (=org-clock-out-when-done=): the clock keeps running;
254- a =CLOCK_INTO_DRAWER= property or another drawer name: clocks always go into =LOGBOOK=.
253- rounding, changing the TODO state on clock-in (=org-clock-in-switch-to-state=), and clocking out when the entry is marked done (=org-clock-out-when-done=): the clock keeps running.
254
255** The clock drawer
256
257Where clock lines go follows =org-clock-into-drawer= in =config.toml=, or an entry's =CLOCK_INTO_DRAWER= property, which its subtree inherits:
258
259| Value | Clock lines go |
260|----------------+-----------------------------------------------------------------------------------------------------|
261| =t= (default) | into the drawer =org-log-into-drawer= (or a =LOG_INTO_DRAWER= property) names, else =LOGBOOK= |
262| =nil= | under the heading, newest first, without a drawer |
263| a number /n/ | under the heading until there would be /n/ of them; then all of them move into the log drawer |
264| a drawer name | into that drawer |
265
266An existing drawer of that name always takes the new line.
255267
256268** The running clock
257269
docs/manual/guide/13-configuration.org +3
@@ -162,6 +162,7 @@ These settings have no control in the Settings window. Some are in the View menu
162162| =org-agenda-skip-scheduled-if-done= | |
163163| =org-agenda-skip-deadline-if-done= | |
164164| =org-agenda-log-mode-items= | |
165| =org-clock-into-drawer= | |
165166| =org-agenda-todo-ignore-with-date=, =org-agenda-todo-ignore-scheduled=, =org-agenda-todo-ignore-deadlines=, =org-agenda-todo-ignore-timestamp=, =org-agenda-tags-todo-honor-ignore-options= | |
166167| =org-agenda-search-view-always-boolean= | |
167168| =org-agenda-search-view-force-full-words= | |
@@ -223,6 +224,7 @@ A key you remove from the file goes back to its default. A key that isn't in the
223224| =org-agenda-dim-blocked-tasks= | string | ="t"= | =t= dims entries the two enforce settings block, =invisible= hides them (entries blocked only by checkboxes are still dimmed), =nil= shows them as usual. Mirrors =org-agenda-dim-blocked-tasks=. |
224225| =appt-message-warning-time= | integer | =12= | Minutes of warning before timed entries. An entry's =APPT_WARNTIME= property overrides it. Mirrors =appt-message-warning-time=. |
225226| =org-clock-idle-time= | integer | =0= | Minutes without keyboard or mouse input, with a clock running, before orgstar asks what to do with the idle time. =0= never asks (Emacs's =nil=). Mac only. Mirrors =org-clock-idle-time=. |
227| =org-clock-into-drawer= | string | ="t"= | Where clock lines go: ="t"= the log drawer (=LOGBOOK=), ="nil"= no drawer, ="N"= a drawer once there are N clock lines, or a drawer's name. An entry's =CLOCK_INTO_DRAWER= property overrides it. Mirrors =org-clock-into-drawer=. |
226228| =org-clock-history-length= | integer | =5= | How many recently clocked entries orgstar remembers. Mirrors =org-clock-history-length=. |
227229
228230The default =org-todo-keywords= is the first sequence of Doom Emacs's default:
@@ -471,6 +473,7 @@ Only variables whose names start with =org-=, =appt-=, =display-line-numbers=, =
471473| =org-agenda-span= | A number, or =day= (1), =week= (7), =fortnight= (14), =month= (30), =year= (365) |
472474| =org-clock-idle-time= | Minutes; =nil= becomes =0= (never) |
473475| =org-clock-history-length= | The same key, when the value is a positive number |
476| =org-clock-into-drawer= | A drawer name as given, a number as a string, =t= or =nil= |
474477| =org-agenda-start-day= | A day offset such as ="-3d"=; =nil= becomes ="+0d"=. Other forms aren't supported. |
475478| =org-agenda-start-on-weekday= | ="0"= to ="6"=, or ="nil"= |
476479| =org-agenda-log-mode-items= | The symbols =closed=, =clock= and =state= of the list, separated by spaces |
docs/manual/guide/14-ios.org +1 −1
@@ -354,7 +354,7 @@ These settings from =config.toml= apply on iOS:
354354- =org-agenda-span=, =org-agenda-start-day=, =org-agenda-start-on-weekday=, =org-deadline-warning-days=, =agenda-include-subfolders=, =org-agenda-show-all-dates=, =org-agenda-skip-scheduled-if-done=, =org-agenda-skip-deadline-if-done=, =org-agenda-search-view-always-boolean=, =org-agenda-search-view-force-full-words=, =org-agenda-log-mode-items=, the =org-agenda-todo-ignore-= settings, =org-agenda-tags-todo-honor-ignore-options=
355355- =calendar-events=, =calendar-event-calendars=
356356- =reminders=, =appt-message-warning-time=
357- =org-clock-history-length=
357- =org-clock-history-length=, =org-clock-into-drawer=
358358
359359=capture.toml= and =views.toml= in the folder apply too. Other settings, including =keymap=, =save= and =org-clock-idle-time=, don't apply on iOS. See [[file:13-configuration.org][Configuration]].
360360