Commit b1386df42f

b1386df42f010ab1c5cd9ffa72bd25f654e103f3

parent: 084ca507e2

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-12 01:01 UTC

Setting for org-habit-show-habits-only-for-today

On by default, as in Org. Off, habits also show on the later days they
are scheduled for. In config.toml, the Mac and iOS settings, and the
Emacs config import.

Layout: unified · split

Sources/OrgApp/EmacsImport.swift +2 −1
@@ -506,7 +506,8 @@ public struct EmacsImport: Sendable {
506 "org-startup-indented", "org-hide-leading-stars", "org-startup-align-all-tables", "org-startup-truncated", "auto-fill-mode", 506 "org-startup-indented", "org-hide-leading-stars", "org-startup-align-all-tables", "org-startup-truncated", "auto-fill-mode",
507 "org-enforce-todo-dependencies", "org-enforce-todo-checkbox-dependencies", 507 "org-enforce-todo-dependencies", "org-enforce-todo-checkbox-dependencies",
508 "org-agenda-todo-ignore-with-date", "org-agenda-tags-todo-honor-ignore-options", "org-clock-out-remove-zero-time-clocks", 508 "org-agenda-todo-ignore-with-date", "org-agenda-tags-todo-honor-ignore-options", "org-clock-out-remove-zero-time-clocks",
509 "org-agenda-sort-notime-is-late", "org-agenda-sort-noeffort-is-high", "org-agenda-use-time-grid", "org-agenda-show-current-time-in-grid": 509 "org-agenda-sort-notime-is-late", "org-agenda-sort-noeffort-is-high", "org-agenda-use-time-grid", "org-agenda-show-current-time-in-grid",
510 "org-habit-show-habits-only-for-today":
510 add(name, .bool(truthy)) 511 add(name, .bool(truthy))
511 case "org-archive-location": 512 case "org-archive-location":
512 guard let location = value.string, location.contains("::") else { return note("not a file::heading location") } 513 guard let location = value.string, location.contains("::") else { return note("not a file::heading location") }
Sources/OrgApp/OrgPreferences.swift +2
@@ -90,6 +90,7 @@ public enum OrgPreferences {
90 /// `org-agenda-show-all-dates`: days without entries show. 90 /// `org-agenda-show-all-dates`: days without entries show.
91 public static func agendaShowAllDates(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaShowAllDates", defaults) } 91 public static func agendaShowAllDates(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaShowAllDates", defaults) }
92 public static func agendaSkipScheduledIfDone(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSkipScheduledIfDone", defaults) } 92 public static func agendaSkipScheduledIfDone(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSkipScheduledIfDone", defaults) }
93 public static func habitsOnlyForToday(_ defaults: UserDefaults = .standard) -> Bool { bool("habitsOnlyForToday", defaults) }
93 public static func agendaSkipDeadlineIfDone(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSkipDeadlineIfDone", defaults) } 94 public static func agendaSkipDeadlineIfDone(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSkipDeadlineIfDone", defaults) }
94 public static func agendaSearchAlwaysBoolean(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSearchAlwaysBoolean", defaults) } 95 public static func agendaSearchAlwaysBoolean(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSearchAlwaysBoolean", defaults) }
95 public static func agendaSearchForceFullWords(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSearchForceFullWords", defaults) } 96 public static func agendaSearchForceFullWords(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSearchForceFullWords", defaults) }
@@ -99,6 +100,7 @@ public enum OrgPreferences {
99 options.deadlineWarningDays = integer("deadlineWarningDays", defaults) 100 options.deadlineWarningDays = integer("deadlineWarningDays", defaults)
100 options.skipScheduledIfDone = agendaSkipScheduledIfDone(defaults) 101 options.skipScheduledIfDone = agendaSkipScheduledIfDone(defaults)
101 options.skipDeadlineIfDone = agendaSkipDeadlineIfDone(defaults) 102 options.skipDeadlineIfDone = agendaSkipDeadlineIfDone(defaults)
103 options.habitsOnlyForToday = habitsOnlyForToday(defaults)
102 options.searchAlwaysBoolean = agendaSearchAlwaysBoolean(defaults) 104 options.searchAlwaysBoolean = agendaSearchAlwaysBoolean(defaults)
103 options.searchForceFullWords = agendaSearchForceFullWords(defaults) 105 options.searchForceFullWords = agendaSearchForceFullWords(defaults)
104 options.enforceTodoDependencies = bool("enforceTodoDependencies", defaults) 106 options.enforceTodoDependencies = bool("enforceTodoDependencies", defaults)
Sources/OrgApp/UserConfig.swift +2
@@ -201,6 +201,8 @@ public enum UserConfig {
201 comment: "leave done entries out of the agenda even on the day they are scheduled", legacy: ""), 201 comment: "leave done entries out of the agenda even on the day they are scheduled", legacy: ""),
202 Setting(section: "", key: "org-agenda-skip-deadline-if-done", defaultsKey: "agendaSkipDeadlineIfDone", kind: .bool, fallback: .bool(false), 202 Setting(section: "", key: "org-agenda-skip-deadline-if-done", defaultsKey: "agendaSkipDeadlineIfDone", kind: .bool, fallback: .bool(false),
203 comment: "leave done entries out of the agenda even on the day they are due", legacy: ""), 203 comment: "leave done entries out of the agenda even on the day they are due", legacy: ""),
204 Setting(section: "", key: "org-habit-show-habits-only-for-today", defaultsKey: "habitsOnlyForToday", kind: .bool, fallback: .bool(true),
205 comment: "habits show only on today's agenda, not on the later days they are scheduled for", legacy: ""),
204 Setting(section: "", key: "org-agenda-log-mode-items", defaultsKey: "agendaLogModeItems", kind: .string, fallback: .string("closed clock"), 206 Setting(section: "", key: "org-agenda-log-mode-items", defaultsKey: "agendaLogModeItems", kind: .string, fallback: .string("closed clock"),
205 comment: "what log mode shows, separated by spaces: closed, clock, state", legacy: ""), 207 comment: "what log mode shows, separated by spaces: closed, clock, state", legacy: ""),
206 Setting(section: "", key: "org-agenda-todo-ignore-with-date", defaultsKey: "agendaTodoIgnoreWithDate", kind: .bool, fallback: .bool(false), 208 Setting(section: "", key: "org-agenda-todo-ignore-with-date", defaultsKey: "agendaTodoIgnoreWithDate", kind: .bool, fallback: .bool(false),
Sources/OrgCore/Agenda/Agenda.swift +6 −2
@@ -112,6 +112,9 @@ public struct AgendaOptions: Sendable, Equatable {
112 /// `org-agenda-skip-scheduled-if-done`: done entries' scheduled items are left out even 112 /// `org-agenda-skip-scheduled-if-done`: done entries' scheduled items are left out even
113 /// on the day they are scheduled. 113 /// on the day they are scheduled.
114 public var skipScheduledIfDone = false 114 public var skipScheduledIfDone = false
115 /// `org-habit-show-habits-only-for-today`: habits show only on today's agenda, not on the
116 /// later days they are scheduled for.
117 public var habitsOnlyForToday = true
115 /// `org-agenda-skip-deadline-if-done`: done entries' deadlines are left out even on the day due. 118 /// `org-agenda-skip-deadline-if-done`: done entries' deadlines are left out even on the day due.
116 public var skipDeadlineIfDone = false 119 public var skipDeadlineIfDone = false
117 /// `org-agenda-search-view-always-boolean`: search strings are always `+word -word` snippets. 120 /// `org-agenda-search-view-always-boolean`: search strings are always `+word -word` snippets.
@@ -283,8 +286,9 @@ public enum Agenda {
283 continue 286 continue
284 } 287 }
285 if heading.isDone, options.skipScheduledIfDone || schedule != current { continue } 288 if heading.isDone, options.skipScheduledIfDone || schedule != current { continue }
286 // org-habit: habits only on today's agenda, and not when done. 289 // org-habit: done habits never show, others only on today's agenda unless
287 if heading.isHabit, heading.isDone || !isToday { continue } 290 // `org-habit-show-habits-only-for-today` is off.
291 if heading.isHabit, heading.isDone || (options.habitsOnlyForToday && !isToday) { continue }
288 let time: Dotime? = !heading.isHabit && current != schedule && current != repeat_ ? nil : (timeIn(s).map { .string($0) } ?? .headline) 292 let time: Dotime? = !heading.isHabit && current != schedule && current != repeat_ ? nil : (timeIn(s).map { .string($0) } ?? .headline)
289 let extra = heading.isHabit ? "" : isToday && past ? String(format: "Sched.%2dx: ", diff) : "Scheduled: " 293 let extra = heading.isHabit ? "" : isToday && past ? String(format: "Sched.%2dx: ", diff) : "Scheduled: "
290 let habit = heading.isHabit ? heading.habit : nil 294 let habit = heading.isHabit ? heading.habit : nil
Sources/Orgstar/OrgstarApp.swift +2
@@ -587,6 +587,7 @@ struct SettingsView: View {
587 @AppStorage("agendaStartOffset") private var agendaStartOffset = 0 587 @AppStorage("agendaStartOffset") private var agendaStartOffset = 0
588 @AppStorage("agendaSubfolders") private var agendaSubfolders = false 588 @AppStorage("agendaSubfolders") private var agendaSubfolders = false
589 @AppStorage("agendaShowAllDates") private var agendaShowAllDates = false 589 @AppStorage("agendaShowAllDates") private var agendaShowAllDates = false
590 @AppStorage("habitsOnlyForToday") private var habitsOnlyForToday = true
590 @AppStorage("agendaDimBlockedTasks") private var agendaDimBlockedTasks = "t" 591 @AppStorage("agendaDimBlockedTasks") private var agendaDimBlockedTasks = "t"
591 @AppStorage("calendarEvents") private var calendarEvents = false 592 @AppStorage("calendarEvents") private var calendarEvents = false
592 @AppStorage("calendarEventCalendars") private var calendarEventCalendars = "" 593 @AppStorage("calendarEventCalendars") private var calendarEventCalendars = ""
@@ -766,6 +767,7 @@ struct SettingsView: View {
766 Stepper(agendaStartOffset == 0 ? "Agenda starts today" : "Agenda starts \(-agendaStartOffset) days before today", value: $agendaStartOffset, in: -14...0) 767 Stepper(agendaStartOffset == 0 ? "Agenda starts today" : "Agenda starts \(-agendaStartOffset) days before today", value: $agendaStartOffset, in: -14...0)
767 Toggle("Include files in subfolders", isOn: $agendaSubfolders) 768 Toggle("Include files in subfolders", isOn: $agendaSubfolders)
768 Toggle("Show days without entries", isOn: $agendaShowAllDates) 769 Toggle("Show days without entries", isOn: $agendaShowAllDates)
770 Toggle("Habits only today", isOn: $habitsOnlyForToday)
769 Picker("Blocked entries", selection: $agendaDimBlockedTasks) { 771 Picker("Blocked entries", selection: $agendaDimBlockedTasks) {
770 Text("Dimmed").tag("t") 772 Text("Dimmed").tag("t")
771 Text("Hidden").tag("invisible") 773 Text("Hidden").tag("invisible")
Sources/OrgstarMobile/SettingsScreen.swift +3
@@ -45,6 +45,9 @@ struct SettingsScreen: View {
45 Toggle("Show days without entries", isOn: Binding { 45 Toggle("Show days without entries", isOn: Binding {
46 OrgPreferences.agendaShowAllDates() 46 OrgPreferences.agendaShowAllDates()
47 } set: { model.set("agendaShowAllDates", to: .bool($0)) }) 47 } set: { model.set("agendaShowAllDates", to: .bool($0)) })
48 Toggle("Habits only today", isOn: Binding {
49 OrgPreferences.habitsOnlyForToday()
50 } set: { model.set("habitsOnlyForToday", to: .bool($0)) })
48 Picker("Blocked entries", selection: Binding { 51 Picker("Blocked entries", selection: Binding {
49 UserDefaults.standard.string(forKey: "agendaDimBlockedTasks") ?? "t" 52 UserDefaults.standard.string(forKey: "agendaDimBlockedTasks") ?? "t"
50 } set: { model.set("agendaDimBlockedTasks", to: .string($0)) }) { 53 } set: { model.set("agendaDimBlockedTasks", to: .string($0)) }) {
Tests/OrgAppTests/EmacsImportTests.swift +3 −2
@@ -21,7 +21,7 @@ struct EmacsImportTests {
21 (setq org-log-done 'note org-log-into-drawer t org-log-reschedule 'time) 21 (setq org-log-done 'note org-log-into-drawer t org-log-reschedule 'time)
22 (setq org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% s%b") (todo . " %-8:c"))) 22 (setq org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% s%b") (todo . " %-8:c")))
23 (setq org-agenda-sorting-strategy '((agenda time-up priority-down) (todo . (alpha-up))) org-agenda-sort-notime-is-late nil) 23 (setq org-agenda-sorting-strategy '((agenda time-up priority-down) (todo . (alpha-up))) org-agenda-sort-notime-is-late nil)
24 (setq org-agenda-time-grid '((daily today) (800 1300) "......" "----") org-agenda-use-time-grid nil) 24 (setq org-agenda-time-grid '((daily today) (800 1300) "......" "----") org-agenda-use-time-grid nil org-habit-show-habits-only-for-today nil)
25 (setq org-stuck-projects '("+project/-DONE" ("NEXT" "TODO") ("errand") "\\<IGNORE\\>")) 25 (setq org-stuck-projects '("+project/-DONE" ("NEXT" "TODO") ("errand") "\\<IGNORE\\>"))
26 (setq org-agenda-custom-commands 26 (setq org-agenda-custom-commands
27 '(("d" "Daily" ((agenda "" ((org-agenda-span 'day) (org-agenda-overriding-header "Today"))) 27 '(("d" "Daily" ((agenda "" ((org-agenda-span 'day) (org-agenda-overriding-header "Today")))
@@ -113,6 +113,7 @@ struct EmacsImportTests {
113 #expect(s["org-agenda-time-grid.when"] == .string("daily today")) 113 #expect(s["org-agenda-time-grid.when"] == .string("daily today"))
114 #expect(s["org-agenda-time-grid.times"] == .string("800 1300")) 114 #expect(s["org-agenda-time-grid.times"] == .string("800 1300"))
115 #expect(s["org-agenda-use-time-grid"] == .bool(false)) 115 #expect(s["org-agenda-use-time-grid"] == .bool(false))
116 #expect(s["org-habit-show-habits-only-for-today"] == .bool(false))
116 #expect(s["org-agenda-files"] == .string("~/notes/\n~/work/plan.org")) 117 #expect(s["org-agenda-files"] == .string("~/notes/\n~/work/plan.org"))
117 #expect(s["org-refile-targets"] == .string("((nil :maxlevel . 2) (org-agenda-files :tag . \"project\"))")) 118 #expect(s["org-refile-targets"] == .string("((nil :maxlevel . 2) (org-agenda-files :tag . \"project\"))"))
118 #expect(s["org-refile-use-outline-path"] == .string("title")) 119 #expect(s["org-refile-use-outline-path"] == .string("title"))
@@ -351,7 +352,7 @@ struct EmacsImportTests {
351 let keymap = folder.appendingPathComponent("keymap.toml") 352 let keymap = folder.appendingPathComponent("keymap.toml")
352 #expect(KeymapLoader.load(.doom, userFile: keymap).problems.isEmpty) 353 #expect(KeymapLoader.load(.doom, userFile: keymap).problems.isEmpty)
353 #expect(KeymapLoader.load(.doom, userFile: keymap).keymap.keyLabels(for: "app.agenda", modes: ["normal"]).contains("C-c a")) 354 #expect(KeymapLoader.load(.doom, userFile: keymap).keymap.keyLabels(for: "app.agenda", modes: ["normal"]).contains("C-c a"))
354 #expect(summary.hasPrefix("Imported 47 settings, 3 capture templates, 3 key bindings, 2 structure templates, 3 agenda views."), "\(summary)") 355 #expect(summary.hasPrefix("Imported 48 settings, 3 capture templates, 3 key bindings, 2 structure templates, 3 agenda views."), "\(summary)")
355 let views = AgendaViewLoader.load(userFile: folder.appendingPathComponent("views.toml")) 356 let views = AgendaViewLoader.load(userFile: folder.appendingPathComponent("views.toml"))
356 #expect(views.problems.isEmpty, "\(views.problems)") 357 #expect(views.problems.isEmpty, "\(views.problems)")
357 #expect(views.views.dropFirst(3).map(\.name) == ["Daily", "Work", "Stuck"]) 358 #expect(views.views.dropFirst(3).map(\.name) == ["Daily", "Work", "Stuck"])
Tests/OrgCoreTests/AgendaTests.swift +19 −1
@@ -115,7 +115,8 @@ enum AgendaOracle {
115 115
116 static func compare( 116 static func compare(
117 files: [(name: String, text: String)], start: Int, span: Int, today: Int, hour: Int = 9, minute: Int = 30, 117 files: [(name: String, text: String)], start: Int, span: Int, today: Int, hour: Int = 9, minute: Int = 30,
118 prefix: [String: String]? = nil, logMode: Bool = false, logItems: Set<String>? = nil, skipIfDone: Bool = false 118 prefix: [String: String]? = nil, logMode: Bool = false, logItems: Set<String>? = nil, skipIfDone: Bool = false,
119 habitsOnlyForToday: Bool = true
119 ) throws { 120 ) throws {
120 let date = Days.date(start) 121 let date = Days.date(start)
121 var form = "(org-agenda-list nil \"\(String(format: "%04d-%02d-%02d", date.year, date.month, date.day))\" \(span))" 122 var form = "(org-agenda-list nil \"\(String(format: "%04d-%02d-%02d", date.year, date.month, date.day))\" \(span))"
@@ -123,6 +124,7 @@ enum AgendaOracle {
123 if logMode { form = "(let ((org-agenda-start-with-log-mode t)) \(form))" } 124 if logMode { form = "(let ((org-agenda-start-with-log-mode t)) \(form))" }
124 if let logItems { form = "(let ((org-agenda-log-mode-items '(\(logItems.sorted().joined(separator: " "))))) \(form))" } 125 if let logItems { form = "(let ((org-agenda-log-mode-items '(\(logItems.sorted().joined(separator: " "))))) \(form))" }
125 if skipIfDone { form = "(let ((org-agenda-skip-scheduled-if-done t) (org-agenda-skip-deadline-if-done t)) \(form))" } 126 if skipIfDone { form = "(let ((org-agenda-skip-scheduled-if-done t) (org-agenda-skip-deadline-if-done t)) \(form))" }
127 if !habitsOnlyForToday { form = "(let ((org-habit-show-habits-only-for-today nil)) \(form))" }
126 form = "(let ((org-agenda-sorting-strategy '((agenda \(AgendaSort.defaults["agenda"]!.joined(separator: " ")))))) \(form))" 128 form = "(let ((org-agenda-sorting-strategy '((agenda \(AgendaSort.defaults["agenda"]!.joined(separator: " ")))))) \(form))"
127 let emacs = try run(files: files, form: form, today: today, hour: hour, minute: minute) 129 let emacs = try run(files: files, form: form, today: today, hour: hour, minute: minute)
128 let defaults = OrgSettings.default.withTodoKeywords(keywords)! 130 let defaults = OrgSettings.default.withTodoKeywords(keywords)!
@@ -133,6 +135,7 @@ enum AgendaOracle {
133 if let logItems { options.logItems = logItems } 135 if let logItems { options.logItems = logItems }
134 options.skipScheduledIfDone = skipIfDone 136 options.skipScheduledIfDone = skipIfDone
135 options.skipDeadlineIfDone = skipIfDone 137 options.skipDeadlineIfDone = skipIfDone
138 options.habitsOnlyForToday = habitsOnlyForToday
136 let ours = Agenda.list(sources, start: start, days: span, today: today, now: (hour, minute), options: options) 139 let ours = Agenda.list(sources, start: start, days: span, today: today, now: (hour, minute), options: options)
137 #expect(ours.count == emacs.count) 140 #expect(ours.count == emacs.count)
138 for (o, e) in zip(ours, emacs) { 141 for (o, e) in zip(ours, emacs) {
@@ -339,6 +342,21 @@ struct AgendaTests {
339 try AgendaOracle.compare(files: files, start: day + 1, span: 1, today: day) 342 try AgendaOracle.compare(files: files, start: day + 1, span: 1, today: day)
340 } 343 }
341 344
345 @Test(.enabled(if: ProcessInfo.processInfo.environment["ORGSTAR_SKIP_ORACLE"] == nil))
346 func habitsOnLaterDaysMatchEmacs() throws {
347 let files = [("h.org", HabitTests.habits)]
348 for today in [(2026, 10, 5), (2026, 10, 8)] {
349 let day = Days.absolute(year: today.0, month: today.1, day: today.2)
350 for only in [true, false] {
351 try AgendaOracle.compare(files: files, start: day - 2, span: 10, today: day, habitsOnlyForToday: only)
352 }
353 var options = AgendaOptions.terminal
354 options.habitsOnlyForToday = false
355 let later = Agenda.list([AgendaSource(path: "h.org", text: HabitTests.habits)], start: day + 1, days: 7, today: day, now: (9, 30), options: options)
356 #expect(later.flatMap(\.items).contains { $0.habit != nil })
357 }
358 }
359
342 static let doneEntries = """ 360 static let doneEntries = """
343 * DONE Scheduled today 361 * DONE Scheduled today
344 SCHEDULED: <2026-10-05 Mon> 362 SCHEDULED: <2026-10-05 Mon>
docs/manual/guide/07-agenda.org +3 −3
@@ -103,7 +103,7 @@ The entries follow =org-agenda-get-day-entries= with Org's default entry types.
103| Repeating timestamp =<… +1w>= | On each occurrence within the span | =All day= | 103| Repeating timestamp =<… +1w>= | On each occurrence within the span | =All day= |
104| Date range =<…>--<…>= | On every day of the range | =Day 2/5= (day 2 of 5) | 104| Date range =<…>--<…>= | On every day of the range | =Day 2/5= (day 2 of 5) |
105| Diary sexp =%%(…)= line or =<%%(…)>= | On each day the sexp applies; see [[*Diary sexps][Diary sexps]] | =All day= | 105| Diary sexp =%%(…)= line or =<%%(…)>= | On each day the sexp applies; see [[*Diary sexps][Diary sexps]] | =All day= |
106| Habit (=STYLE: habit=) | On today only, while not done; see [[*Habits][Habits]] | =Habit=, with a consistency graph | 106| Habit (=STYLE: habit=) | On today only, while not done, unless habits only today is off; see [[*Habits][Habits]] | =Habit=, with a consistency graph |
107 107
108An entry with a time of day shows the time instead of the status: =08:00=, or =13:50–14:30= with an end time. 108An entry with a time of day shows the time instead of the status: =08:00=, or =13:50–14:30= with an end time.
109 109
@@ -132,7 +132,7 @@ Days with a time grid show dotted lines at the grid's times among the timed entr
132 132
133** Sorting 133** Sorting
134 134
135Lines are sorted by =org-agenda-sorting-strategy=, set per kind of view in the =[org-agenda-sorting-strategy]= table of =config.toml= (see [[file:13-configuration.org][Configuration]]) or for one view in =views.toml=. The defaults are Org's: =habit-down time-up urgency-down category-keep= for days, =urgency-down category-keep= for the TODO list and matches, and =category-keep= for text search. With those, habits go last; timed entries come first, earliest first; the rest by urgency, which combines priority with how overdue an entry is; ties keep file order. Calendar events go among them as described in [[*Calendar events][Calendar events]]. 135Lines are sorted by =org-agenda-sorting-strategy=, set per kind of view in the =[org-agenda-sorting-strategy]= table of =config.toml= (see [[file:13-configuration.org][Configuration]]) or for one view in =views.toml=. The defaults are =time-up habit-down urgency-down category-keep= for days, =urgency-down category-keep= for the TODO list and matches, and =category-keep= for text search. With those, timed entries come first, earliest first, timed habits among them; then untimed entries, habits last, by urgency, which combines priority with how overdue an entry is; ties keep file order. Calendar events go among them as described in [[*Calendar events][Calendar events]].
136 136
137Each key compares two lines, and the next key is tried when they tie: 137Each key compares two lines, and the next key is tried when they tie:
138 138
@@ -315,7 +315,7 @@ To make every entry of a file a habit, put =#+PROPERTY: STYLE habit= at the top
315 315
316The repeater can be =+=, =++= or =.+=, with an optional =/Nd= maximum interval. Days the habit was done are read from =- State "DONE" … [date]= lines (for any done keyword) and =CLOSING NOTE [date]= lines in the entry. 316The repeater can be =+=, =++= or =.+=, with an optional =/Nd= maximum interval. Days the habit was done are read from =- State "DONE" … [date]= lines (for any done keyword) and =CLOSING NOTE [date]= lines in the entry.
317 317
318A habit appears only on today's agenda and not once it is done for the day. Its row carries the consistency graph: one cell per day for the 21 days before today and the 7 after (=org-habit-preceding-days= and =org-habit-following-days=). On the Mac the graph is at the right of the row, with =*= on days the habit was done and =!= on today; on iOS it is a strip under the title, with a dot on days it was done and today outlined. Cell colors follow org-habit's faces: 318A habit appears only on today's agenda and not once it is done for the day. To show habits on the later days they are scheduled for too, turn off Settings ▸ Agenda ▸ Habits only today, or set =org-habit-show-habits-only-for-today = false= in =config.toml=. Its row carries the consistency graph: one cell per day for the 21 days before today and the 7 after (=org-habit-preceding-days= and =org-habit-following-days=). On the Mac the graph is at the right of the row, with =*= on days the habit was done and =!= on today; on iOS it is a strip under the title, with a dot on days it was done and today outlined. Cell colors follow org-habit's faces:
319 319
320| Color | Meaning | Theme key | 320| Color | Meaning | Theme key |
321|--------+--------------------------------------------+-----------------| 321|--------+--------------------------------------------+-----------------|
docs/manual/guide/13-configuration.org +3
@@ -113,6 +113,7 @@ See Themes and Fonts below.
113| Agenda starts N days before today | 0 to 14 days before | 3 days | =org-agenda-start-day= | 113| Agenda starts N days before today | 0 to 14 days before | 3 days | =org-agenda-start-day= |
114| Include files in subfolders | On or off | Off | =agenda-include-subfolders= | 114| Include files in subfolders | On or off | Off | =agenda-include-subfolders= |
115| Show days without entries | On or off | Off | =org-agenda-show-all-dates= | 115| Show days without entries | On or off | Off | =org-agenda-show-all-dates= |
116| Habits only today | On or off | On | =org-habit-show-habits-only-for-today= |
116| Blocked entries | Dimmed; Hidden; Shown as usual | Dimmed | =org-agenda-dim-blocked-tasks= | 117| Blocked entries | Dimmed; Hidden; Shown as usual | Dimmed | =org-agenda-dim-blocked-tasks= |
117| Show events from Calendar | On or off | Off | =calendar-events= | 118| Show events from Calendar | On or off | Off | =calendar-events= |
118| A checkbox for each calendar | On or off | All on | =calendar-event-calendars= | 119| A checkbox for each calendar | On or off | All on | =calendar-event-calendars= |
@@ -175,6 +176,7 @@ These settings have no control in the Settings window. Some are in the View menu
175| =org-deadline-warning-days= | | 176| =org-deadline-warning-days= | |
176| =org-agenda-skip-scheduled-if-done= | | 177| =org-agenda-skip-scheduled-if-done= | |
177| =org-agenda-skip-deadline-if-done= | | 178| =org-agenda-skip-deadline-if-done= | |
179| =org-habit-show-habits-only-for-today= | |
178| =org-agenda-log-mode-items= | | 180| =org-agenda-log-mode-items= | |
179| =org-clock-into-drawer= | | 181| =org-clock-into-drawer= | |
180| =org-clock-rounding-minutes=, =org-clock-out-remove-zero-time-clocks=, =org-clock-in-switch-to-state=, =org-clock-out-when-done= | | 182| =org-clock-rounding-minutes=, =org-clock-out-remove-zero-time-clocks=, =org-clock-in-switch-to-state=, =org-clock-out-when-done= | |
@@ -251,6 +253,7 @@ A key you remove from the file goes back to its default. A key that isn't in the
251| =org-agenda-show-all-dates= | boolean | =false= | Show days without entries in the agenda; today always shows. Emacs's default is =t=. Mirrors =org-agenda-show-all-dates=. | 253| =org-agenda-show-all-dates= | boolean | =false= | Show days without entries in the agenda; today always shows. Emacs's default is =t=. Mirrors =org-agenda-show-all-dates=. |
252| =org-agenda-skip-scheduled-if-done= | boolean | =false= | Leave a done entry's scheduled date out of the agenda, even on its own day. Mirrors =org-agenda-skip-scheduled-if-done=. | 254| =org-agenda-skip-scheduled-if-done= | boolean | =false= | Leave a done entry's scheduled date out of the agenda, even on its own day. Mirrors =org-agenda-skip-scheduled-if-done=. |
253| =org-agenda-skip-deadline-if-done= | boolean | =false= | Leave a done entry's deadline out of the agenda, even on its own day. Mirrors =org-agenda-skip-deadline-if-done=. | 255| =org-agenda-skip-deadline-if-done= | boolean | =false= | Leave a done entry's deadline out of the agenda, even on its own day. Mirrors =org-agenda-skip-deadline-if-done=. |
256| =org-habit-show-habits-only-for-today= | boolean | =true= | Show habits only on today's agenda. Off, a habit also shows on the later days it is scheduled for. Mirrors =org-habit-show-habits-only-for-today=. |
254| =org-agenda-log-mode-items= | string | ="closed clock"= | What log mode shows, separated by spaces: =closed=, =clock= and =state=. Mirrors =org-agenda-log-mode-items=. | 257| =org-agenda-log-mode-items= | string | ="closed clock"= | What log mode shows, separated by spaces: =closed=, =clock= and =state=. Mirrors =org-agenda-log-mode-items=. |
255| =org-agenda-todo-ignore-with-date= | boolean | =false= | The TODO list leaves out entries with an active timestamp anywhere in their text. Mirrors =org-agenda-todo-ignore-with-date=. | 258| =org-agenda-todo-ignore-with-date= | boolean | =false= | The TODO list leaves out entries with an active timestamp anywhere in their text. Mirrors =org-agenda-todo-ignore-with-date=. |
256| =org-agenda-todo-ignore-scheduled= | string | ="nil"= | The TODO list leaves out scheduled entries: ="all"= (or ="t"=) all of them, ="future"= those scheduled after today, ="past"= today or before, ="N"= N or more days ahead, ="-N"= N or more days ago. Mirrors =org-agenda-todo-ignore-scheduled=. | 259| =org-agenda-todo-ignore-scheduled= | string | ="nil"= | The TODO list leaves out scheduled entries: ="all"= (or ="t"=) all of them, ="future"= those scheduled after today, ="past"= today or before, ="N"= N or more days ahead, ="-N"= N or more days ago. Mirrors =org-agenda-todo-ignore-scheduled=. |
docs/manual/guide/14-ios.org +2 −1
@@ -384,6 +384,7 @@ With a configuration folder, settings and structure templates are written to its
384The Agenda, TODO Dependencies, Calendar and Reminders sections are the only places the app changes a setting itself, besides Import from Emacs: 384The Agenda, TODO Dependencies, Calendar and Reminders sections are the only places the app changes a setting itself, besides Import from Emacs:
385 385
386- Show days without entries :: turns =org-agenda-show-all-dates= on or off. 386- Show days without entries :: turns =org-agenda-show-all-dates= on or off.
387- Habits only today :: turns =org-habit-show-habits-only-for-today= on or off.
387- Blocked entries :: Dimmed, Hidden or Shown as usual (=org-agenda-dim-blocked-tasks=). 388- Blocked entries :: Dimmed, Hidden or Shown as usual (=org-agenda-dim-blocked-tasks=).
388- TODO Dependencies :: Not done before TODO children (=org-enforce-todo-dependencies=) and Not done with unchecked boxes (=org-enforce-todo-checkbox-dependencies=). 389- TODO Dependencies :: Not done before TODO children (=org-enforce-todo-dependencies=) and Not done with unchecked boxes (=org-enforce-todo-checkbox-dependencies=).
389- Show Calendar Events :: turns on =calendar-events=, and asks for access to your calendars. iOS asks for full access, as Calendar has no read-only level; orgstar changes a calendar only when you edit an event or add an entry. While access is missing the section shows Allow Access to Calendars…; if you declined, allow it in the Settings app under Privacy & Security ▸ Calendars. 390- Show Calendar Events :: turns on =calendar-events=, and asks for access to your calendars. iOS asks for full access, as Calendar has no read-only level; orgstar changes a calendar only when you edit an event or add an entry. While access is missing the section shows Allow Access to Calendars…; if you declined, allow it in the Settings app under Privacy & Security ▸ Calendars.
@@ -409,7 +410,7 @@ These settings from =config.toml= apply on iOS:
409- =org-use-tag-inheritance=, =org-tags-exclude-from-inheritance=, =org-tag-alist= 410- =org-use-tag-inheritance=, =org-tags-exclude-from-inheritance=, =org-tag-alist=
410- =org-use-speed-commands=, with a hardware keyboard 411- =org-use-speed-commands=, with a hardware keyboard
411- =electric-pair-mode=, =spell-check=, =auto-fill-mode= 412- =electric-pair-mode=, =spell-check=, =auto-fill-mode=
412- =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= 413- =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-habit-show-habits-only-for-today=, =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=
413- =calendar-events=, =calendar-event-calendars=, =agenda-reminders=, =agenda-reminder-lists= 414- =calendar-events=, =calendar-event-calendars=, =agenda-reminders=, =agenda-reminder-lists=
414- =reminders=, =appt-message-warning-time= 415- =reminders=, =appt-message-warning-time=
415- =org-clock-history-length=, =org-clock-into-drawer=, =org-clock-rounding-minutes=, =org-clock-out-remove-zero-time-clocks=, =org-clock-in-switch-to-state=, =org-clock-out-when-done= 416- =org-clock-history-length=, =org-clock-into-drawer=, =org-clock-rounding-minutes=, =org-clock-out-remove-zero-time-clocks=, =org-clock-in-switch-to-state=, =org-clock-out-when-done=