Agenda fixes; hide folders by menu or Focus filter !356

merged merged by cmc on 2026-10-16 17:52 UTC · krz/orgstar:agenda-fixes-and-folders into main

29 files changed, +551 −57

Layout: unified · split

Sources/OrgApp/AgendaModel.swift +24 −4
@@ -36,6 +36,10 @@ public final class AgendaModel {
3636 public var startOnWeekday: Int? = 1
3737 /// Files below the top level of each folder are agenda files too.
3838 public var includeSubfolders = false
39 /// Files other agenda files archive to are left out.
40 public var excludeArchives = OrgPreferences.agendaExcludeArchives()
41 /// Files in these folders (root paths) are left out; see `HiddenFolders`.
42 public var hiddenFolders: Set<String> = []
3943 /// `org-agenda-files`: when not empty, the agenda reads these instead of the folders' files.
4044 public var agendaFiles = OrgPreferences.agendaFiles()
4145 public var options = AgendaOptions()
@@ -66,7 +70,10 @@ public final class AgendaModel {
6670
6771 /// Org files directly in each folder (or below it, with `includeSubfolders`), by path, as
6872 /// Emacs lists a directory in `org-agenda-files`.
69 public var files: [String] { workspace.agendaFilePaths(list: agendaFiles, includeSubfolders: includeSubfolders) }
73 public var files: [String] {
74 let paths = workspace.agendaFilePaths(list: agendaFiles, includeSubfolders: includeSubfolders)
75 return hiddenFolders.isEmpty ? paths : paths.filter { !HiddenFolders.hides(hiddenFolders, path: $0) }
76 }
7077
7178 /// Recomputes the days. `open` is the open buffers' text by path.
7279 public func refresh(open: [String: String], now: Date = Date(), calendar: Calendar = .current) async {
@@ -137,10 +144,17 @@ public final class AgendaModel {
137144 isComputing = false
138145 }
139146
140 /// Reminders for the timed entries of the next `days` days.
147 /// Reminders for the timed entries of the next `days` days, each with the folder it is in.
141148 public func reminders(open: [String: String], now: Date = Date(), calendar: Calendar = .current, days: Int = 7, lead: Int = 12) async -> [Reminder] {
142149 let all = await sources(open: open)
143 return await Task.detached { Reminders.upcoming(all, now: now, calendar: calendar, days: days, lead: lead) }.value
150 let roots = workspace.rootPaths
151 return await Task.detached {
152 Reminders.upcoming(all, now: now, calendar: calendar, days: days, lead: lead).map { reminder in
153 var reminder = reminder
154 reminder.folder = roots.first { HiddenFolders.hides([$0], path: reminder.path) }
155 return reminder
156 }
157 }.value
144158 }
145159
146160 /// The habits of the agenda files, file by file.
@@ -207,7 +221,13 @@ public final class AgendaModel {
207221 cache.open[source.path] = (defaults, blocking, source.source)
208222 }
209223 }
210 return loaded.map(\.source)
224 var sources = loaded.map(\.source)
225 if excludeArchives {
226 let location = OrgPreferences.options().archiveLocation ?? "%s_archive::"
227 let archives = Set(sources.flatMap { $0.archiveFiles(location: location) })
228 sources.removeAll { archives.contains($0.path) }
229 }
230 return sources
211231 }
212232
213233 /// The days as rows with the events, empty days hidden unless `showAllDates`; see
Sources/OrgApp/HiddenFolders.swift added +40
@@ -0,0 +1,40 @@
1import Foundation
2import Observation
3
4/// The folders the agenda leaves out on this device, by root path: the ones hidden from the
5/// agenda's folder menu and the ones the active Focus filter hides. A folder either hides is
6/// hidden. Reminders stay on for both; the Focus filter mutes its folders' through the
7/// system, by each notification's `filterCriteria`.
8@MainActor
9@Observable
10public final class HiddenFolders {
11 public static let shared = HiddenFolders()
12
13 /// Hidden from the agenda's folder menu.
14 public var manual: Set<String> { didSet { defaults.set(manual.sorted(), forKey: Self.manualKey) } }
15 /// Hidden by the active Focus filter.
16 public var focus: Set<String> { didSet { defaults.set(focus.sorted(), forKey: Self.focusKey) } }
17
18 public var all: Set<String> { manual.union(focus) }
19
20 static let manualKey = "agendaHiddenFolders"
21 static let focusKey = "agendaFocusHiddenFolders"
22 @ObservationIgnored private let defaults: UserDefaults
23
24 public init(defaults: UserDefaults = .standard) {
25 self.defaults = defaults
26 manual = Set(defaults.stringArray(forKey: Self.manualKey) ?? [])
27 focus = Set(defaults.stringArray(forKey: Self.focusKey) ?? [])
28 }
29
30 /// `path` is one of `folders` or inside one.
31 public nonisolated static func hides(_ folders: Set<String>, path: String) -> Bool {
32 folders.contains { path == $0 || path.hasPrefix($0.hasSuffix("/") ? $0 : $0 + "/") }
33 }
34
35 /// For a Focus filter's app context: notifications whose `filterCriteria` (their folder) is
36 /// not one of `folders`.
37 public nonisolated static func notificationPredicate(hiding folders: Set<String>) -> NSPredicate {
38 NSPredicate(format: "NOT (SELF IN %@)", folders.sorted())
39 }
40}
Sources/OrgApp/OrgPreferences.swift +2
@@ -95,6 +95,8 @@ public enum OrgPreferences {
9595 return words == ["t"] || words.isEmpty ? [] : Set(words)
9696 }
9797 public static func agendaSubfolders(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSubfolders", defaults) }
98 /// The agenda leaves out the files other agenda files archive to.
99 public static func agendaExcludeArchives(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaExcludeArchives", defaults) }
98100 /// `org-agenda-show-all-dates`: days without entries show.
99101 public static func agendaShowAllDates(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaShowAllDates", defaults) }
100102 public static func agendaSkipScheduledIfDone(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSkipScheduledIfDone", defaults) }
Sources/OrgApp/ReminderScheduler.swift +1
@@ -99,6 +99,7 @@ public struct SystemReminderCenter: ReminderCenter {
9999 content.body = reminder.body
100100 content.sound = .default
101101 content.userInfo = ["path": reminder.path, "offset": reminder.offset]
102 if let folder = reminder.folder { content.filterCriteria = folder }
102103 let components = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute, .second], from: reminder.fireDate)
103104 let trigger = UNCalendarNotificationTrigger(dateMatching: components, repeats: false)
104105 try await UNUserNotificationCenter.current().add(UNNotificationRequest(identifier: reminder.id, content: content, trigger: trigger))
Sources/OrgApp/UserConfig.swift +2
@@ -348,6 +348,8 @@ public enum UserConfig {
348348 comment: "folder names never listed or searched, separated by spaces", legacy: ""),
349349 Setting(section: "orgstar", key: "agenda-include-subfolders", defaultsKey: "agendaSubfolders", kind: .bool, fallback: .bool(false),
350350 comment: "the agenda reads org files in subfolders too", legacy: "agenda.include-subfolders"),
351 Setting(section: "orgstar", key: "agenda-exclude-archives", defaultsKey: "agendaExcludeArchives", kind: .bool, fallback: .bool(false),
352 comment: "the agenda leaves out files that other agenda files archive to (#+ARCHIVE:, org-archive-location)", legacy: ""),
351353 Setting(section: "orgstar", key: "reminders", defaultsKey: "reminders", kind: .bool, fallback: .bool(true),
352354 comment: "notify before timed entries", legacy: "agenda.reminders"),
353355 Setting(section: "orgstar", key: "calendar-events", defaultsKey: "calendarEvents", kind: .bool, fallback: .bool(false),
Sources/OrgApp/WorkspaceModel.swift +9 −1
@@ -64,13 +64,21 @@ public final class WorkspaceModel {
6464 }
6565
6666 /// `~/Library/Application Support/Orgstar`, or `ORGSTAR_DATA_DIR` when set (for development).
67 public static var defaultDirectory: URL {
67 public nonisolated static var defaultDirectory: URL {
6868 if let override = ProcessInfo.processInfo.environment["ORGSTAR_DATA_DIR"] {
6969 return URL(fileURLWithPath: override)
7070 }
7171 return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)[0].appendingPathComponent("Orgstar")
7272 }
7373
74 /// The resolved paths of the roots saved in `directory`, without opening the index: for
75 /// App Intents, which may run before the app's models.
76 public nonisolated static func savedRootPaths(in directory: URL = defaultDirectory) -> [String] {
77 guard let data = try? Data(contentsOf: directory.appendingPathComponent("roots.json")),
78 let roots = try? JSONDecoder().decode([WorkspaceRoot].self, from: data) else { return [] }
79 return roots.compactMap { try? $0.resolve().url.path }.sorted()
80 }
81
7482 // MARK: - Roots
7583
7684 public func addRoot(_ url: URL) async throws {
Sources/OrgCore/Agenda/AgendaSource.swift +15
@@ -101,6 +101,12 @@ public struct AgendaSource: Sendable {
101101
102102 let headings: [Heading]
103103
104 /// The other files this one archives to, as `org-all-archive-files` names them, with
105 /// `location` (`org-archive-location`) when the file sets none.
106 public func archiveFiles(location: String) -> [String] {
107 ([archiveKeyword ?? location] + archiveProperties).compactMap { Archive.archiveFile($0, sourcePath: path) }.filter { $0 != path }
108 }
109
104110 /// The file's habits not done and not in skipped trees: their titles, heading offsets and
105111 /// what their consistency graphs are drawn from.
106112 public var habits: [(title: String, offset: Int, habit: Habit)] {
@@ -121,6 +127,9 @@ public struct AgendaSource: Sendable {
121127 let firstDone: [String: String]
122128 /// The file's text, for the search view.
123129 public let text: String
130 /// The archive locations the file names: its `#+ARCHIVE:`, then each `:ARCHIVE:` property's.
131 let archiveKeyword: String?
132 let archiveProperties: [String]
124133 let priorities: Priorities
125134
126135 /// `checksBlocking` false leaves every heading unblocked, for when neither enforce
@@ -159,6 +168,7 @@ public struct AgendaSource: Sendable {
159168 func sectionStamps(_ index: Int) -> [String] { stampsByHeading[index] ?? [] }
160169
161170 var keywordCategory = SetupFile.keywords(tree.settings.setupKeywords).last { $0.key == "CATEGORY" }?.value.trimmingCharacters(in: .whitespaces)
171 var archiveKeyword: String?
162172 var srcBodies: [Range<Int>] = []
163173 var planningLines: [Range<Int>] = []
164174 var timestampNodes: [Int] = []
@@ -170,6 +180,8 @@ public struct AgendaSource: Sendable {
170180 let line = child.text.trimmingCharacters(in: .whitespacesAndNewlines)
171181 if line.uppercased().hasPrefix("#+CATEGORY:") {
172182 keywordCategory = line.dropFirst("#+CATEGORY:".count).trimmingCharacters(in: .whitespaces)
183 } else if archiveKeyword == nil, line.uppercased().hasPrefix("#+ARCHIVE:") {
184 archiveKeyword = line.dropFirst("#+ARCHIVE:".count).trimmingCharacters(in: .whitespaces)
173185 }
174186 case .block:
175187 if DocumentModel.isSrcBlock(child) {
@@ -289,6 +301,9 @@ public struct AgendaSource: Sendable {
289301 ))
290302 }
291303 self.headings = headings
304 self.archiveKeyword = archiveKeyword
305 ?? SetupFile.keywords(tree.settings.setupKeywords).last { $0.key == "ARCHIVE" }?.value.trimmingCharacters(in: .whitespaces)
306 archiveProperties = (model.property("ARCHIVE", of: nil).map { [$0.value] } ?? []) + headings.compactMap { $0.properties["ARCHIVE"] }
292307
293308 let starts = model.headings.map(\.headingRange.lowerBound)
294309 func heading(at offset: Int) -> Int? {
Sources/OrgCore/Agenda/Reminders.swift +7 −4
@@ -10,6 +10,8 @@ public struct Reminder: Sendable, Equatable {
1010 public let body: String
1111 public let path: String
1212 public let offset: Int
13 /// The folder the entry's file is in, for Focus filters to mute.
14 public var folder: String?
1315
1416 public init(id: String, fireDate: Date, eventDate: Date, title: String, body: String, path: String, offset: Int) {
1517 self.id = id
@@ -43,11 +45,12 @@ public enum Reminders {
4345 event > now else { continue }
4446 let fire = max(event.addingTimeInterval(-Double((item.warntime ?? lead) * 60)), now.addingTimeInterval(1))
4547 let clockText = String(format: "%d:%02d", time / 100, time % 100)
46 let title = item.text.trimmingCharacters(in: .whitespaces)
47 let leader = item.extra.trimmingCharacters(in: .whitespaces)
48 // `Scheduled:` reads `Scheduled` beside the time.
49 var leader = item.extra.trimmingCharacters(in: .whitespaces)
50 if leader.hasSuffix(":") { leader.removeLast() }
4851 reminders.append(Reminder(
49 id: "orgstar.\(path)|\(item.headingLine ?? title)|\(day.day)|\(time)|\(item.kind.rawValue)",
50 fireDate: fire, eventDate: event, title: title,
52 id: "orgstar.\(path)|\(item.headingLine ?? item.text.trimmingCharacters(in: .whitespaces))|\(day.day)|\(time)|\(item.kind.rawValue)",
53 fireDate: fire, eventDate: event, title: item.title,
5154 body: ([clockText] + (leader.isEmpty ? [] : [leader]) + [item.category]).joined(separator: " · "),
5255 path: path, offset: item.markerOffset ?? item.headingOffset ?? 0
5356 ))
Sources/Orgstar/AgendaView+Toolbar.swift +36
@@ -63,6 +63,7 @@ extension AgendaView {
6363 }
6464 }
6565 }
66 if workspace.rootPaths.count > 1 || hidesFolders { foldersMenu }
6667 Menu {
6768 Button("Filter…") { askFilter("/") }
6869 Button("By Tag…") { askFilter("\\") }
@@ -81,6 +82,41 @@ extension AgendaView {
8182 }
8283 }
8384
85 /// Shows or hides each folder's files; folders the Focus hides stay hidden.
86 private var foldersMenu: some View {
87 let hidden = HiddenFolders.shared
88 return Menu {
89 Button("All Folders") { hidden.manual = [] }
90 .disabled(hidden.manual.isEmpty)
91 Divider()
92 ForEach(workspace.rootPaths, id: \.self) { root in
93 Toggle((root as NSString).lastPathComponent, isOn: Binding {
94 !hidden.all.contains(root)
95 } set: { shown in
96 if shown { hidden.manual.remove(root) } else { hidden.manual.insert(root) }
97 })
98 .disabled(hidden.focus.contains(root))
99 }
100 if !hidden.focus.isDisjoint(with: workspace.rootPaths) {
101 Divider()
102 Text("Dimmed folders are hidden by the current Focus.")
103 }
104 } label: {
105 Label("Folders", systemImage: hidesFolders ? "folder.fill" : "folder")
106 }
107 .help("The folders the agenda shows")
108 }
109
110 /// Some folder is hidden.
111 var hidesFolders: Bool { !HiddenFolders.shared.all.isDisjoint(with: workspace.rootPaths) }
112
113 /// The folders shown, by name, while some are hidden.
114 var shownFolders: String? {
115 guard hidesFolders else { return nil }
116 let shown = workspace.rootPaths.filter { !HiddenFolders.shared.all.contains($0) }
117 return shown.isEmpty ? "No folders" : shown.map { ($0 as NSString).lastPathComponent }.joined(separator: ", ")
118 }
119
84120 /// The span shown, as the window's title: `Week of 5 Oct 2026`.
85121 var title: String {
86122 guard isAgenda else { return viewName.replacingOccurrences(of: "…", with: "") }
Sources/Orgstar/AgendaView.swift +43 −12
@@ -141,6 +141,7 @@ struct AgendaView: View {
141141 var startOffset: Int
142142 var startOnWeekday: String
143143 var includeSubfolders: Bool
144 var hidden: Set<String>
144145 var prefix: [String]
145146 var settings: [String]
146147 var logMode: Bool
@@ -156,7 +157,7 @@ struct AgendaView: View {
156157 /// they redraw only it.
157158 private var refreshKey: RefreshKey {
158159 RefreshKey(
159 mode: agenda.mode, start: agenda.start, span: span, startOffset: startOffset, startOnWeekday: startOnWeekday, includeSubfolders: includeSubfolders, prefix: [prefixAgenda, prefixTodo, prefixTags],
160 mode: agenda.mode, start: agenda.start, span: span, startOffset: startOffset, startOnWeekday: startOnWeekday, includeSubfolders: includeSubfolders, hidden: HiddenFolders.shared.all, prefix: [prefixAgenda, prefixTodo, prefixTags],
160161 settings: [sortAgenda, sortTodo, sortTags, sortSearch, gridWhen, gridTimes, "\(useTimeGrid) \(showCurrentTime)", stuckMatch, stuckTodo, stuckTags, stuckRegexp, agendaFileList],
161162 logMode: logMode,
162163 calendars: (calendarEventsOn ? [calendarNames] : []) + (remindersOn ? ["reminders", reminderListNames] : []), files: 0, changed: nil, edits: 0, path: nil, tick: tick
@@ -168,6 +169,8 @@ struct AgendaView: View {
168169 agenda.startOffset = startOffset
169170 agenda.startOnWeekday = Int(startOnWeekday)
170171 agenda.includeSubfolders = includeSubfolders
172 agenda.excludeArchives = OrgPreferences.agendaExcludeArchives()
173 agenda.hiddenFolders = HiddenFolders.shared.all
171174 agenda.agendaFiles = OrgPreferences.agendaFiles()
172175 agenda.options.prefixFormat = ["agenda": prefixAgenda, "todo": prefixTodo, "tags": prefixTags]
173176 agenda.options.logMode = logMode
@@ -229,11 +232,20 @@ struct AgendaView: View {
229232
230233 // MARK: - Lines
231234
232 /// A selectable line: its selection id, the row, and the day it is on.
235 /// A selectable line: its selection id, the row, and the day it is on. `key`, the view's
236 /// identity, follows the row where `id` follows its place; nil uses `id`.
233237 struct Line {
234238 let id: String
235239 let row: AgendaRow
236240 let day: Int
241 var key: String?
242
243 var viewID: String { key ?? id }
244 }
245
246 /// A day row's view identity.
247 static func key(_ row: AgendaRow, day: Int, prefix: String, overdue: Bool = false) -> String {
248 "\(prefix)\(day):\(overdue ? "o" : "")\(row.id)"
237249 }
238250
239251 private var groups: [AgendaDayGroup] {
@@ -260,11 +272,19 @@ struct AgendaView: View {
260272
261273 private func dayLines(_ groups: [AgendaDayGroup], prefix: String) -> [Line] {
262274 groups.flatMap { group in
263 (overdueShown ? group.overdue.enumerated().map { Line(id: "\(prefix)\(group.day):o\($0.offset)", row: $0.element, day: group.day) } : [])
264 + group.rows.enumerated().map { Line(id: "\(prefix)\(group.day):\($0.offset)", row: $0.element, day: group.day) }
275 (overdueShown ? group.overdue.enumerated().map { dayLine(group, $0.offset, prefix: prefix, overdue: true) } : [])
276 + group.rows.indices.map { dayLine(group, $0, prefix: prefix) }
265277 }
266278 }
267279
280 private func dayLine(_ group: AgendaDayGroup, _ index: Int, prefix: String, overdue: Bool = false) -> Line {
281 let row = overdue ? group.overdue[index] : group.rows[index]
282 return Line(
283 id: "\(prefix)\(group.day):\(overdue ? "o" : "")\(index)", row: row, day: group.day,
284 key: Self.key(row, day: group.day, prefix: prefix, overdue: overdue)
285 )
286 }
287
268288 func line(_ id: String) -> Line? { lines(groups).first { $0.id == id } }
269289
270290 var body: some View {
@@ -311,7 +331,7 @@ struct AgendaView: View {
311331 .padding(.bottom, 12)
312332 }
313333 .onChange(of: selection) {
314 if let selection { proxy.scrollTo(selection) }
334 if let selection { proxy.scrollTo(line(selection)?.viewID ?? selection) }
315335 }
316336 .onChange(of: agenda.days.first?.day) {
317337 if groups.contains(where: \.isToday) { proxy.scrollTo("day\(agenda.today)", anchor: .top) }
@@ -335,8 +355,10 @@ struct AgendaView: View {
335355 }
336356 .toolbar { toolbar }
337357 .overlay {
338 if agenda.files.isEmpty {
358 if agenda.files.isEmpty, !hidesFolders {
339359 ContentUnavailableView("No agenda files", systemImage: "calendar", description: Text("The agenda reads the org files at the top of each folder you add."))
360 } else if agenda.files.isEmpty {
361 ContentUnavailableView("All folders hidden", systemImage: "folder", description: Text("Show a folder from the Folders menu."))
340362 }
341363 }
342364 .sheet(item: $eventRequest) { request in
@@ -394,7 +416,7 @@ struct AgendaView: View {
394416 }
395417 }
396418 .navigationTitle(title)
397 .navigationSubtitle(isAgenda && viewName != AgendaViewLoader.builtIn[0].name ? viewName : "")
419 .navigationSubtitle(([isAgenda && viewName != AgendaViewLoader.builtIn[0].name ? viewName : ""] + [shownFolders ?? ""]).filter { !$0.isEmpty }.joined(separator: " · "))
398420 .onChange(of: viewName) { applyView() }
399421 .onChange(of: commands.agendaRequest?.start, initial: true) { showRequestedDays() }
400422 .onChange(of: commands.agendaRequest?.days) { showRequestedDays() }
@@ -420,8 +442,8 @@ struct AgendaView: View {
420442 if group.isToday, !group.overdue.isEmpty {
421443 overdueHeader(count: group.overdue.count)
422444 if overdueShown {
423 ForEach(Array(group.overdue.enumerated()), id: \.element.id) { index, row in
424 rowView(Line(id: "\(prefix)\(group.day):o\(index)", row: row, day: group.day))
445 ForEach(Array(group.overdue.enumerated()), id: \.element.id) { index, _ in
446 rowView(dayLine(group, index, prefix: prefix, overdue: true))
425447 }
426448 Divider().padding(.leading, 16).padding(.vertical, 4)
427449 }
@@ -433,9 +455,18 @@ struct AgendaView: View {
433455 .padding(.horizontal, 16)
434456 .padding(.vertical, 10)
435457 }
436 ForEach(Array(group.lines(now: Self.hhmm(now)).enumerated()), id: \.offset) { _, line in
458 // Identified by row, not place, so a refresh that moves rows doesn't reuse one row's view
459 // for another.
460 let lines = group.lines(now: Self.hhmm(now)).map { line in
461 switch line {
462 case .row(let index): (Self.key(group.rows[index], day: group.day, prefix: prefix), line)
463 case .grid(let time): ("grid\(time)", line)
464 case .now: ("now", line)
465 }
466 }
467 ForEach(lines, id: \.0) { _, line in
437468 switch line {
438 case .row(let index): rowView(Line(id: "\(prefix)\(group.day):\(index)", row: group.rows[index], day: group.day))
469 case .row(let index): rowView(dayLine(group, index, prefix: prefix))
439470 case .grid(let time): gridLine(time)
440471 case .now: nowLine
441472 }
@@ -540,7 +571,7 @@ struct AgendaView: View {
540571 row: line.row, day: line.day, showsGutter: showsGutter, selected: selection == line.id, hovered: hovered == line.id,
541572 marked: line.row.item.flatMap(EntryRef.init).map(marked.contains) ?? false
542573 )
543 .id(line.id)
574 .id(line.viewID)
544575 .contentShape(Rectangle())
545576 .onHover { inside in
546577 if inside { hovered = line.id } else if hovered == line.id { hovered = nil }
Sources/Orgstar/BoardView.swift +1
@@ -79,6 +79,7 @@ struct BoardView: View {
7979 .navigationTitle(kanban ? "Kanban" : "Entries")
8080 .task(id: RefreshKey(match: match, subfolders: includeSubfolders, files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion, path: session.path, tick: tick)) {
8181 agenda.includeSubfolders = includeSubfolders
82 agenda.excludeArchives = OrgPreferences.agendaExcludeArchives()
8283 agenda.agendaFiles = OrgPreferences.agendaFiles()
8384 let open = session.openTexts
8485 let result = await agenda.board(open: open, match: match)
Sources/Orgstar/ContentView.swift +6 −1
@@ -459,7 +459,7 @@ struct ContentView: View {
459459 Text(workspace.lastError ?? session.lastError ?? "")
460460 }
461461 .task(id: ReminderKey(
462 enabled: remindersEnabled, lead: reminderLead, subfolders: agendaSubfolders, files: workspace.files.count,
462 enabled: remindersEnabled, lead: reminderLead, subfolders: agendaSubfolders, hidden: HiddenFolders.shared.all, files: workspace.files.count,
463463 changed: workspace.changedFile?.version, edits: session.editVersion, hour: hour, theme: theme
464464 )) {
465465 await updateReminders()
@@ -909,6 +909,8 @@ struct ContentView: View {
909909 var enabled: Bool
910910 var lead: Int
911911 var subfolders: Bool
912 /// The widgets leave out hidden folders.
913 var hidden: Set<String>
912914 var files: Int
913915 var changed: Int?
914916 var edits: Int
@@ -929,6 +931,7 @@ struct ContentView: View {
929931 let agenda = reminderAgenda ?? AgendaModel(workspace: workspace)
930932 reminderAgenda = agenda
931933 agenda.includeSubfolders = agendaSubfolders
934 agenda.excludeArchives = OrgPreferences.agendaExcludeArchives()
932935 let open = session.openTexts
933936 let reminders = await agenda.reminders(open: open, lead: reminderLead)
934937 guard !Task.isCancelled else { return }
@@ -944,6 +947,8 @@ struct ContentView: View {
944947 days.mode = .agenda(span: AgendaSnapshot.dayCount, startOffset: 0)
945948 days.startOnWeekday = nil
946949 days.includeSubfolders = agendaSubfolders
950 days.excludeArchives = OrgPreferences.agendaExcludeArchives()
951 days.hiddenFolders = HiddenFolders.shared.all
947952 days.agendaFiles = OrgPreferences.agendaFiles()
948953 days.options = OrgPreferences.agendaOptions(days.options)
949954 days.options.logMode = false
Sources/Orgstar/FocusFilter.swift added +44
@@ -0,0 +1,44 @@
1import AppIntents
2import OrgApp
3
4/// A folder the user added, by its path.
5struct FolderEntity: AppEntity {
6 static let typeDisplayRepresentation: TypeDisplayRepresentation = "Folder"
7 static let defaultQuery = Query()
8
9 var id: String
10
11 var displayRepresentation: DisplayRepresentation {
12 DisplayRepresentation(title: "\((id as NSString).lastPathComponent)", subtitle: "\(id)")
13 }
14
15 struct Query: EntityQuery {
16 func entities(for identifiers: [String]) async throws -> [FolderEntity] { identifiers.map(FolderEntity.init) }
17 func suggestedEntities() async throws -> [FolderEntity] { WorkspaceModel.savedRootPaths().map(FolderEntity.init) }
18 }
19}
20
21/// While a Focus with this filter is on, the agenda and widgets leave out its folders and
22/// their reminders are muted. The system performs it again with no folders when the Focus ends.
23struct AgendaFocusFilter: SetFocusFilterIntent {
24 static let title: LocalizedStringResource = "Hide Folders"
25 static let description = IntentDescription("Leaves folders out of the agenda and widgets, and mutes their reminders, while this Focus is on.")
26
27 @Parameter(title: "Folders", default: [])
28 var folders: [FolderEntity]
29
30 var displayRepresentation: DisplayRepresentation {
31 let names = folders.map { ($0.id as NSString).lastPathComponent }.joined(separator: ", ")
32 return DisplayRepresentation(title: names.isEmpty ? "No folders hidden" : "Hide \(names)")
33 }
34
35 var appContext: FocusFilterAppContext {
36 FocusFilterAppContext(notificationFilterPredicate: HiddenFolders.notificationPredicate(hiding: Set(folders.map(\.id))))
37 }
38
39 @MainActor
40 func perform() async throws -> some IntentResult {
41 HiddenFolders.shared.focus = Set(folders.map(\.id))
42 return .result()
43 }
44}
Sources/OrgstarMobile/AgendaScreen.swift +37 −1
@@ -90,6 +90,7 @@ struct AgendaScreen: View, Equatable {
9090 var span: Int
9191 var startOffset: Int
9292 var subfolders: Bool
93 var hidden: Set<String>
9394 var settings: Int
9495 var logMode: Bool
9596 }
@@ -151,6 +152,7 @@ struct AgendaScreen: View, Equatable {
151152 // The now line is shorter than a row.
152153 .environment(\.defaultMinListRowHeight, 16)
153154 .navigationTitle(title)
155 .navigationSubtitle(shownFolders ?? "")
154156 .navigationBarTitleDisplayMode(.inline)
155157 .sensoryFeedback(.success, trigger: done)
156158 .sensoryFeedback(.impact(weight: .light), trigger: moved)
@@ -212,6 +214,9 @@ struct AgendaScreen: View, Equatable {
212214 Label("Views", systemImage: "list.bullet.rectangle")
213215 }
214216 }
217 if workspace.rootPaths.count > 1 || shownFolders != nil {
218 ToolbarItem(placement: .topBarTrailing) { foldersMenu }
219 }
215220 }
216221 .fullScreenCover(isPresented: $showingBoard) {
217222 BoardScreen(workspace: workspace, session: session) { showingBoard = false }
@@ -318,6 +323,36 @@ struct AgendaScreen: View, Equatable {
318323 .background { Refresher(workspace: workspace, session: session, agenda: agenda, model: model, tick: tick, logMode: logMode) }
319324 }
320325
326 /// Shows or hides each folder's files; folders the Focus hides stay hidden.
327 private var foldersMenu: some View {
328 let hidden = HiddenFolders.shared
329 let hides = !hidden.all.isDisjoint(with: workspace.rootPaths)
330 return Menu {
331 Button("All Folders", systemImage: "folder") { hidden.manual = [] }
332 .disabled(hidden.manual.isEmpty)
333 Section(hidden.focus.isDisjoint(with: workspace.rootPaths) ? "" : "Dimmed folders are hidden by the current Focus.") {
334 ForEach(workspace.rootPaths, id: \.self) { root in
335 Toggle((root as NSString).lastPathComponent, isOn: Binding {
336 !hidden.all.contains(root)
337 } set: { shown in
338 if shown { hidden.manual.remove(root) } else { hidden.manual.insert(root) }
339 })
340 .disabled(hidden.focus.contains(root))
341 }
342 }
343 } label: {
344 Label("Folders", systemImage: hides ? "folder.fill" : "folder")
345 }
346 }
347
348 /// The folders shown, by name, while some are hidden.
349 private var shownFolders: String? {
350 let hidden = HiddenFolders.shared.all
351 guard !hidden.isDisjoint(with: workspace.rootPaths) else { return nil }
352 let shown = workspace.rootPaths.filter { !hidden.contains($0) }
353 return shown.isEmpty ? "No folders" : shown.map { ($0 as NSString).lastPathComponent }.joined(separator: ", ")
354 }
355
321356 /// Refreshes the agenda when files, edits or settings change. Its own view, so that what it
322357 /// watches redraws only it, not the whole list.
323358 private struct Refresher: View {
@@ -332,11 +367,12 @@ struct AgendaScreen: View, Equatable {
332367 Color.clear
333368 .task(id: Key(files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion, tick: tick,
334369 mode: agenda.mode, start: agenda.start, span: agenda.span, startOffset: agenda.startOffset,
335 subfolders: agenda.includeSubfolders, settings: model.settingsVersion, logMode: logMode)) {
370 subfolders: agenda.includeSubfolders, hidden: HiddenFolders.shared.all, settings: model.settingsVersion, logMode: logMode)) {
336371 // Changes come in bursts (a folder scan, typing); a newer one cancels this wait.
337372 try? await Task.sleep(for: .milliseconds(150))
338373 guard !Task.isCancelled else { return }
339374 agenda.options.logMode = logMode
375 agenda.hiddenFolders = HiddenFolders.shared.all
340376 await agenda.refresh(open: session.openTexts)
341377 }
342378 }
Sources/OrgstarMobile/BoardScreen.swift +1
@@ -94,6 +94,7 @@ struct BoardScreen: View {
9494 .task(id: RefreshKey(match: match, files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion,
9595 tick: tick, settings: model.settingsVersion)) {
9696 agenda.includeSubfolders = OrgPreferences.agendaSubfolders()
97 agenda.excludeArchives = OrgPreferences.agendaExcludeArchives()
9798 agenda.agendaFiles = OrgPreferences.agendaFiles()
9899 let result = await agenda.board(open: session.openTexts, match: match)
99100 entries = result.entries
Sources/OrgstarMobile/FocusFilter.swift added +48
@@ -0,0 +1,48 @@
1#if os(iOS)
2import AppIntents
3import OrgApp
4
5/// A folder the user added, by its path.
6struct FolderEntity: AppEntity {
7 static let typeDisplayRepresentation: TypeDisplayRepresentation = "Folder"
8 static let defaultQuery = Query()
9
10 var id: String
11
12 var displayRepresentation: DisplayRepresentation {
13 DisplayRepresentation(title: "\((id as NSString).lastPathComponent)", subtitle: "\(id)")
14 }
15
16 struct Query: EntityQuery {
17 func entities(for identifiers: [String]) async throws -> [FolderEntity] { identifiers.map(FolderEntity.init) }
18 func suggestedEntities() async throws -> [FolderEntity] { WorkspaceModel.savedRootPaths().map(FolderEntity.init) }
19 }
20}
21
22/// While a Focus with this filter is on, the agenda and widgets leave out its folders and
23/// their reminders are muted. The system performs it again with no folders when the Focus ends.
24struct AgendaFocusFilter: SetFocusFilterIntent {
25 static let title: LocalizedStringResource = "Hide Folders"
26 static let description = IntentDescription("Leaves folders out of the agenda and widgets, and mutes their reminders, while this Focus is on.")
27
28 @Parameter(title: "Folders", default: [])
29 var folders: [FolderEntity]
30
31 var displayRepresentation: DisplayRepresentation {
32 let names = folders.map { ($0.id as NSString).lastPathComponent }.joined(separator: ", ")
33 return DisplayRepresentation(title: names.isEmpty ? "No folders hidden" : "Hide \(names)")
34 }
35
36 var appContext: FocusFilterAppContext {
37 FocusFilterAppContext(notificationFilterPredicate: HiddenFolders.notificationPredicate(hiding: Set(folders.map(\.id))))
38 }
39
40 @MainActor
41 func perform() async throws -> some IntentResult {
42 HiddenFolders.shared.focus = Set(folders.map(\.id))
43 // The app may be in the background, where the widgets would wait for it to come back.
44 await MobileModel.shared.updateWidgets()
45 return .result()
46 }
47}
48#endif
Sources/OrgstarMobile/MobileModel.swift +3
@@ -153,6 +153,7 @@ final class MobileModel {
153153 agenda.startOffset = OrgPreferences.agendaStartOffset()
154154 agenda.startOnWeekday = OrgPreferences.agendaStartOnWeekday()
155155 agenda.includeSubfolders = OrgPreferences.agendaSubfolders()
156 agenda.excludeArchives = OrgPreferences.agendaExcludeArchives()
156157 agenda.agendaFiles = OrgPreferences.agendaFiles()
157158 agenda.options = OrgPreferences.agendaOptions(agenda.options)
158159 agenda.calendarEvents = OrgPreferences.calendarEvents() ? calendarEvents : nil
@@ -294,8 +295,10 @@ final class MobileModel {
294295 let days = AgendaModel(workspace: workspace, cache: agenda?.cache ?? AgendaSourceCache())
295296 days.mode = .agenda(span: AgendaSnapshot.dayCount, startOffset: 0)
296297 days.startOnWeekday = nil
298 days.hiddenFolders = HiddenFolders.shared.all
297299 if let agenda {
298300 days.includeSubfolders = agenda.includeSubfolders
301 days.excludeArchives = agenda.excludeArchives
299302 days.options = agenda.options
300303 days.options.logMode = false
301304 days.calendarEvents = agenda.calendarEvents
Sources/OrgstarMobile/OrgstarMobileApp.swift +3 −1
@@ -136,7 +136,7 @@ struct RootView: View {
136136 var body: some View {
137137 Color.clear
138138 // Reminders follow the files, the settings, coming back to the app and the hour.
139 .task(id: ReminderKey(files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion,
139 .task(id: ReminderKey(hidden: HiddenFolders.shared.all, files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion,
140140 settings: model.settingsVersion, active: active, hour: hour)) {
141141 guard active else { return }
142142 try? await Task.sleep(for: .seconds(1))
@@ -160,6 +160,8 @@ struct RootView: View {
160160 }
161161
162162 private struct ReminderKey: Equatable {
163 /// The widgets leave out hidden folders.
164 var hidden: Set<String>
163165 var files: Int
164166 var changed: Int?
165167 var edits: Int
Sources/OrgstarMobile/SettingsScreen.swift +8 −1
@@ -41,7 +41,7 @@ struct SettingsScreen: View {
4141 } footer: {
4242 Text("A folder with config.toml and capture.toml, such as a synced copy of ~/.config/orgstar from your Mac. Changes to them apply as they sync.")
4343 }
44 Section("Agenda") {
44 Section {
4545 let _ = model.settingsVersion
4646 Toggle("Show days without entries", isOn: Binding {
4747 OrgPreferences.agendaShowAllDates()
@@ -49,6 +49,9 @@ struct SettingsScreen: View {
4949 Toggle("Habits only today", isOn: Binding {
5050 OrgPreferences.habitsOnlyForToday()
5151 } set: { model.set("habitsOnlyForToday", to: .bool($0)) })
52 Toggle("Exclude archived tasks", isOn: Binding {
53 OrgPreferences.agendaExcludeArchives()
54 } set: { model.set("agendaExcludeArchives", to: .bool($0)) })
5255 Picker("Blocked entries", selection: Binding {
5356 UserDefaults.standard.string(forKey: "agendaDimBlockedTasks") ?? "t"
5457 } set: { model.set("agendaDimBlockedTasks", to: .string($0)) }) {
@@ -56,6 +59,10 @@ struct SettingsScreen: View {
5659 Text("Hidden").tag("invisible")
5760 Text("Shown as usual").tag("nil")
5861 }
62 } header: {
63 Text("Agenda")
64 } footer: {
65 Text("Archive files are the ones your agenda files archive to, named by #+ARCHIVE:, an :ARCHIVE: property or org-archive-location.")
5966 }
6067 Section {
6168 let _ = model.settingsVersion
Tests/OrgAppTests/AppTests.swift +63
@@ -630,6 +630,69 @@ struct AgendaModelTests {
630630 await agenda.refresh(open: [:], now: wednesday, calendar: utc)
631631 #expect(agenda.days.first?.day == Days.absolute(year: 2026, month: 10, day: 7))
632632 }
633
634 @Test func leavesOutArchiveFiles() async throws {
635 let notes = try Folder()
636 try notes.write("todo.org", "#+ARCHIVE: todo_archive.org::* %s\n* TODO Live\nSCHEDULED: <2026-10-05 Mon>\n")
637 try notes.write("todo_archive.org", "* DONE Old\nSCHEDULED: <2026-10-05 Mon>\n")
638 try notes.write("work.org", "* Project\n:PROPERTIES:\n:ARCHIVE: done/work.org::\n:END:\n** TODO Task\nSCHEDULED: <2026-10-05 Mon>\n")
639 try notes.write("self.org", "#+ARCHIVE: ::* Archived\n* TODO Mine\nSCHEDULED: <2026-10-05 Mon>\n")
640 try notes.write("done/work.org", "* DONE Older\nSCHEDULED: <2026-10-05 Mon>\n")
641 let model = try WorkspaceModel(directory: nil)
642 try await model.addRoot(notes.url)
643 let agenda = AgendaModel(workspace: model)
644 agenda.includeSubfolders = true
645 agenda.span = 1
646 var utc = Calendar(identifier: .gregorian)
647 utc.timeZone = TimeZone(identifier: "UTC")!
648 let now = try #require(utc.date(from: DateComponents(year: 2026, month: 10, day: 5, hour: 9)))
649
650 agenda.excludeArchives = false
651 await agenda.refresh(open: [:], now: now, calendar: utc)
652 #expect(Set(agenda.days[0].items.map(\.text)) == ["TODO Live", "DONE Old", "TODO Task", "TODO Mine", "DONE Older"])
653 agenda.excludeArchives = true
654 await agenda.refresh(open: [:], now: now, calendar: utc)
655 #expect(Set(agenda.days[0].items.map(\.text)) == ["TODO Live", "TODO Task", "TODO Mine"])
656 }
657
658 @Test func leavesOutHiddenFoldersAndTagsReminders() async throws {
659 let work = try Folder()
660 let home = try Folder()
661 try work.write("work.org", "* TODO Report\nSCHEDULED: <2026-10-05 Mon 14:00>\n")
662 try home.write("home.org", "* TODO Groceries\nSCHEDULED: <2026-10-05 Mon 15:00>\n")
663 let model = try WorkspaceModel(directory: nil)
664 try await model.addRoot(work.url)
665 try await model.addRoot(home.url)
666 let workRoot = try #require(model.files.first { $0.name == "work.org" }?.root)
667 let agenda = AgendaModel(workspace: model)
668 agenda.span = 1
669 var utc = Calendar(identifier: .gregorian)
670 utc.timeZone = TimeZone(identifier: "UTC")!
671 let now = try #require(utc.date(from: DateComponents(year: 2026, month: 10, day: 5, hour: 9)))
672
673 agenda.hiddenFolders = [workRoot]
674 await agenda.refresh(open: [:], now: now, calendar: utc)
675 #expect(agenda.days[0].items.filter { $0.path != nil }.map(\.title) == ["Groceries"])
676
677 // Reminders keep hidden folders' entries and carry their folder for Focus filters.
678 let reminders = await AgendaModel(workspace: model).reminders(open: [:], now: now, calendar: utc)
679 #expect(Set(reminders.map(\.title)) == ["Report", "Groceries"])
680 #expect(reminders.first { $0.title == "Report" }?.folder == workRoot)
681 }
682
683 @Test func hiddenFoldersPersistAndMatchPaths() {
684 let defaults = UserDefaults(suiteName: "hidden-\(UUID().uuidString)")!
685 let folders = HiddenFolders(defaults: defaults)
686 folders.manual = ["/a"]
687 folders.focus = ["/b"]
688 let reloaded = HiddenFolders(defaults: defaults)
689 #expect(reloaded.all == ["/a", "/b"])
690 #expect(HiddenFolders.hides(["/a"], path: "/a/x.org"))
691 #expect(!HiddenFolders.hides(["/a"], path: "/ab/x.org"))
692 let predicate = HiddenFolders.notificationPredicate(hiding: ["/a"])
693 #expect(!predicate.evaluate(with: "/a"))
694 #expect(predicate.evaluate(with: "/b"))
695 }
633696}
634697
635698@MainActor
Tests/OrgCoreTests/AgendaTests.swift +4 −4
@@ -411,7 +411,7 @@ struct ReminderTests {
411411
412412 @Test func timedEntriesWithTheirWarnings() {
413413 let text = """
414 * TODO Call
414 * TODO [#A] Call [1/2]
415415 SCHEDULED: <2026-10-05 Mon 14:00>
416416 * Meeting
417417 :PROPERTIES:
@@ -432,14 +432,14 @@ struct ReminderTests {
432432 let source = AgendaSource(path: "/n/a.org", text: text)
433433 let now = Self.date(5, 9, 30)
434434 let reminders = Reminders.upcoming([source], now: now, calendar: Self.utc)
435 #expect(reminders.map(\.title) == ["Soon", "TODO Call", "Meeting", "TODO Report due"])
435 #expect(reminders.map(\.title) == ["Soon", "Call", "Meeting", "Report due"])
436436 #expect(reminders[0].fireDate == now.addingTimeInterval(1))
437437 #expect(reminders[1].fireDate == Self.date(5, 13, 48))
438 #expect(reminders[1].body == "14:00 · Scheduled: · a")
438 #expect(reminders[1].body == "14:00 · Scheduled · a")
439439 #expect(reminders[2].fireDate == Self.date(6, 9, 30))
440440 #expect(reminders[3].eventDate == Self.date(7, 17, 0))
441441 #expect(Reminders.upcoming([source], now: now, calendar: Self.utc, limit: 2).count == 2)
442 #expect(Reminders.upcoming([source], now: now, calendar: Self.utc, days: 1).map(\.title) == ["Soon", "TODO Call"])
442 #expect(Reminders.upcoming([source], now: now, calendar: Self.utc, days: 1).map(\.title) == ["Soon", "Call"])
443443 }
444444
445445 @Test func repeatsFillTheWeek() {
docs/manual/guide/07-agenda.org +13
@@ -31,6 +31,13 @@ To include files in subfolders as well, turn on Settings ▸ Agenda ▸ Include
3131agenda-include-subfolders = true
3232#+END_SRC
3333
34To leave out archive files, the files your agenda files archive to by their =#+ARCHIVE:= keyword, an =:ARCHIVE:= property or =org-archive-location=, turn on Settings ▸ Agenda ▸ Exclude archived tasks on iOS, or set this in =config.toml=:
35
36#+BEGIN_SRC toml
37[orgstar]
38agenda-exclude-archives = true
39#+END_SRC
40
3441To read a list of files instead, as =org-agenda-files= does, set =org-agenda-files= in =config.toml=, entries separated by =\n=:
3542
3643#+BEGIN_SRC toml
@@ -57,6 +64,12 @@ An entry's category is the nearest =CATEGORY= property on it or an ancestor, els
5764
5865If no agenda file exists, the window says so.
5966
67** Hiding folders
68
69With more than one folder, the Folders menu in the agenda's toolbar shows or hides each folder's files; All Folders shows them all again. While some are hidden, the shown folders' names appear under the title. The choice is kept on each device, and it applies to the agenda, the widgets, the Apple Watch and the iOS icon's badge. Reminders still fire for hidden folders.
70
71To hide folders with a Focus, add orgstar's Hide Folders filter to the Focus in System Settings ▸ Focus (Settings ▸ Focus on iOS) and choose the folders. While the Focus is on, those folders are hidden as well as the ones you hid from the menu, where they show dimmed, and their reminders are muted. When the Focus ends they show again.
72
6073* The day, week and month view
6174
6275The default view is =org-agenda-list=: a run of days, each under a header with its date, such as =Monday 5 October= (with the year when it isn't the current year). Today, tomorrow and yesterday are named before the date: =Today · Thursday 8 October=. Today's header is in the =agenda-today= color and days before today are grey. Each header stays at the top of the window while you scroll through its day.
docs/manual/guide/13-configuration.org +1
@@ -392,6 +392,7 @@ Any other key in =[theme]= is a color; see Themes below.
392392| =show-hidden-files= | boolean | =true= | List dotfiles and dot folders in your folders. |
393393| =ignored-folders= | string | see below | Folder names never listed or searched, separated by spaces. |
394394| =agenda-include-subfolders= | boolean | =false= | The agenda reads org files in subfolders too. |
395| =agenda-exclude-archives= | boolean | =false= | The agenda leaves out files that other agenda files archive to. |
395396| =reminders= | boolean | =true= | Notify before timed entries. |
396397| =calendar-events= | boolean | =false= | Show events from Calendar in the agenda. |
397398| =calendar-event-calendars= | string | =""= | The calendars whose events show, by title or identifier, separated by commas; =""= for all. |
docs/manual/guide/14-ios.org +3 −1
@@ -189,6 +189,7 @@ Tap a result to open it in the reader. A heading result opens at that heading.
189189The Agenda tab shows the agenda over all your folders, with the span and start day from the settings (10 days from 3 days ago by default). Each day lists its entries in rows: the time or a status such as =Due today= or =3d late= on the left, the category and the keyword above the title. Days without entries are hidden, except today. Today's overdue entries are in a group of their own, and a line marks the current time between timed entries. Pull down to refresh.
190190
191191- Views (top left) :: the built-in views and those in =views.toml=, Tags and Properties… (a match such as =+work-home= or ~TODO="WAIT"~), and Search… (a phrase, or snippets such as =+invoice -paid=).
192- Folders (top right, with more than one folder) :: shows or hides each folder's files in the agenda, the widgets, the watch and the badge; the shown folders' names appear under the title. A Focus can hide folders too, and mute their reminders (see Hiding folders in [[file:07-agenda.org][The agenda]]).
192193- The bar at the bottom :: Earlier, Filter, Today, Go to Date, the span (Day, Week, Month or the configured span, and Log Mode, which adds closed entries and clocked time) and Later.
193194- Filter :: keep or leave out tags and categories of the entries shown, or type a filter as Org's =/= takes it: =+keep= and =-drop= tags or categories, =<0:30= for effort, =/regexp/=. The filter in use shows above the bar.
194195- + on a day's header :: captures an entry scheduled on that day (see [[file:08-capture.org][Capture]]).
@@ -389,6 +390,7 @@ The Agenda, TODO Dependencies, Calendar and Reminders sections are the only plac
389390
390391- Show days without entries :: turns =org-agenda-show-all-dates= on or off.
391392- Habits only today :: turns =org-habit-show-habits-only-for-today= on or off.
393- Exclude archived tasks :: turns =agenda-exclude-archives= on or off: the agenda leaves out the files your agenda files archive to.
392394- Blocked entries :: Dimmed, Hidden or Shown as usual (=org-agenda-dim-blocked-tasks=).
393395- TODO Dependencies :: Not done before TODO children (=org-enforce-todo-dependencies=) and Not done with unchecked boxes (=org-enforce-todo-checkbox-dependencies=).
394396- 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.
@@ -415,7 +417,7 @@ These settings from =config.toml= apply on iOS:
415417- =org-use-tag-inheritance=, =org-tags-exclude-from-inheritance=, =org-tag-alist=
416418- =org-use-speed-commands=, with a hardware keyboard
417419- =electric-pair-mode=, =spell-check=, =auto-fill-mode=
418- =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=
420- =org-agenda-span=, =org-agenda-start-day=, =org-agenda-start-on-weekday=, =org-deadline-warning-days=, =agenda-include-subfolders=, =agenda-exclude-archives=, =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=
419421- =calendar-events=, =calendar-event-calendars=, =agenda-reminders=, =agenda-reminder-lists=
420422- =reminders=, =appt-message-warning-time=
421423- =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=
ios/Orgstar.xcodeproj/project.pbxproj +24 −24
@@ -700,7 +700,7 @@
700700 isa = XCBuildConfiguration;
701701 buildSettings = {
702702 CODE_SIGN_STYLE = Automatic;
703 CURRENT_PROJECT_VERSION = 11;
703 CURRENT_PROJECT_VERSION = 12;
704704 DEVELOPMENT_TEAM = ZCNAX3VL9D;
705705 GENERATE_INFOPLIST_FILE = NO;
706706 INFOPLIST_FILE = OrgstarQuickLook/Info.plist;
@@ -709,7 +709,7 @@
709709 "@executable_path/Frameworks",
710710 "@executable_path/../../Frameworks",
711711 );
712 MARKETING_VERSION = 0.6.1;
712 MARKETING_VERSION = 0.7.0;
713713 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.quicklook;
714714 PRODUCT_NAME = "$(TARGET_NAME)";
715715 SKIP_INSTALL = YES;
@@ -722,7 +722,7 @@
722722 buildSettings = {
723723 CODE_SIGN_ENTITLEMENTS = OrgstarShare/OrgstarShare.entitlements;
724724 CODE_SIGN_STYLE = Automatic;
725 CURRENT_PROJECT_VERSION = 11;
725 CURRENT_PROJECT_VERSION = 12;
726726 DEVELOPMENT_TEAM = ZCNAX3VL9D;
727727 GENERATE_INFOPLIST_FILE = NO;
728728 INFOPLIST_FILE = OrgstarShare/Info.plist;
@@ -731,7 +731,7 @@
731731 "@executable_path/Frameworks",
732732 "@executable_path/../../Frameworks",
733733 );
734 MARKETING_VERSION = 0.6.1;
734 MARKETING_VERSION = 0.7.0;
735735 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.share;
736736 PRODUCT_NAME = "$(TARGET_NAME)";
737737 SKIP_INSTALL = YES;
@@ -744,7 +744,7 @@
744744 buildSettings = {
745745 CODE_SIGN_ENTITLEMENTS = OrgstarShare/OrgstarShare.entitlements;
746746 CODE_SIGN_STYLE = Automatic;
747 CURRENT_PROJECT_VERSION = 11;
747 CURRENT_PROJECT_VERSION = 12;
748748 DEVELOPMENT_TEAM = ZCNAX3VL9D;
749749 GENERATE_INFOPLIST_FILE = NO;
750750 INFOPLIST_FILE = OrgstarShare/Info.plist;
@@ -753,7 +753,7 @@
753753 "@executable_path/Frameworks",
754754 "@executable_path/../../Frameworks",
755755 );
756 MARKETING_VERSION = 0.6.1;
756 MARKETING_VERSION = 0.7.0;
757757 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.share;
758758 PRODUCT_NAME = "$(TARGET_NAME)";
759759 SKIP_INSTALL = YES;
@@ -768,7 +768,7 @@
768768 ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
769769 CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements;
770770 CODE_SIGN_STYLE = Automatic;
771 CURRENT_PROJECT_VERSION = 11;
771 CURRENT_PROJECT_VERSION = 12;
772772 DEVELOPMENT_TEAM = ZCNAX3VL9D;
773773 GENERATE_INFOPLIST_FILE = NO;
774774 INFOPLIST_FILE = Orgstar/Info.plist;
@@ -778,7 +778,7 @@
778778 "$(inherited)",
779779 "@executable_path/Frameworks",
780780 );
781 MARKETING_VERSION = 0.6.1;
781 MARKETING_VERSION = 0.7.0;
782782 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar;
783783 PRODUCT_MODULE_NAME = OrgstarMobile;
784784 PRODUCT_NAME = Orgstar;
@@ -791,7 +791,7 @@
791791 buildSettings = {
792792 CODE_SIGN_ENTITLEMENTS = OrgstarWidgets/OrgstarWidgets.entitlements;
793793 CODE_SIGN_STYLE = Automatic;
794 CURRENT_PROJECT_VERSION = 11;
794 CURRENT_PROJECT_VERSION = 12;
795795 DEVELOPMENT_TEAM = ZCNAX3VL9D;
796796 GENERATE_INFOPLIST_FILE = NO;
797797 INFOPLIST_FILE = OrgstarWidgets/Info.plist;
@@ -801,7 +801,7 @@
801801 "@executable_path/Frameworks",
802802 "@executable_path/../../Frameworks",
803803 );
804 MARKETING_VERSION = 0.6.1;
804 MARKETING_VERSION = 0.7.0;
805805 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.widgets;
806806 PRODUCT_NAME = "$(TARGET_NAME)";
807807 SKIP_INSTALL = YES;
@@ -813,7 +813,7 @@
813813 isa = XCBuildConfiguration;
814814 buildSettings = {
815815 CODE_SIGN_STYLE = Automatic;
816 CURRENT_PROJECT_VERSION = 11;
816 CURRENT_PROJECT_VERSION = 12;
817817 DEVELOPMENT_TEAM = ZCNAX3VL9D;
818818 GENERATE_INFOPLIST_FILE = NO;
819819 INFOPLIST_FILE = OrgstarQuickLook/Info.plist;
@@ -822,7 +822,7 @@
822822 "@executable_path/Frameworks",
823823 "@executable_path/../../Frameworks",
824824 );
825 MARKETING_VERSION = 0.6.1;
825 MARKETING_VERSION = 0.7.0;
826826 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.quicklook;
827827 PRODUCT_NAME = "$(TARGET_NAME)";
828828 SKIP_INSTALL = YES;
@@ -854,7 +854,7 @@
854854 ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
855855 CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements;
856856 CODE_SIGN_STYLE = Automatic;
857 CURRENT_PROJECT_VERSION = 11;
857 CURRENT_PROJECT_VERSION = 12;
858858 DEVELOPMENT_TEAM = ZCNAX3VL9D;
859859 GENERATE_INFOPLIST_FILE = NO;
860860 INFOPLIST_FILE = Orgstar/Info.plist;
@@ -864,7 +864,7 @@
864864 "$(inherited)",
865865 "@executable_path/Frameworks",
866866 );
867 MARKETING_VERSION = 0.6.1;
867 MARKETING_VERSION = 0.7.0;
868868 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar;
869869 PRODUCT_MODULE_NAME = OrgstarMobile;
870870 PRODUCT_NAME = Orgstar;
@@ -877,7 +877,7 @@
877877 buildSettings = {
878878 CODE_SIGN_ENTITLEMENTS = OrgstarWidgets/OrgstarWidgets.entitlements;
879879 CODE_SIGN_STYLE = Automatic;
880 CURRENT_PROJECT_VERSION = 11;
880 CURRENT_PROJECT_VERSION = 12;
881881 DEVELOPMENT_TEAM = ZCNAX3VL9D;
882882 GENERATE_INFOPLIST_FILE = NO;
883883 INFOPLIST_FILE = OrgstarWidgets/Info.plist;
@@ -887,7 +887,7 @@
887887 "@executable_path/Frameworks",
888888 "@executable_path/../../Frameworks",
889889 );
890 MARKETING_VERSION = 0.6.1;
890 MARKETING_VERSION = 0.7.0;
891891 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.widgets;
892892 PRODUCT_NAME = "$(TARGET_NAME)";
893893 SKIP_INSTALL = YES;
@@ -921,7 +921,7 @@
921921 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
922922 CODE_SIGN_ENTITLEMENTS = OrgstarWatch/OrgstarWatch.entitlements;
923923 CODE_SIGN_STYLE = Automatic;
924 CURRENT_PROJECT_VERSION = 11;
924 CURRENT_PROJECT_VERSION = 12;
925925 DEVELOPMENT_TEAM = ZCNAX3VL9D;
926926 GENERATE_INFOPLIST_FILE = NO;
927927 INFOPLIST_FILE = OrgstarWatch/Info.plist;
@@ -929,7 +929,7 @@
929929 "$(inherited)",
930930 "@executable_path/Frameworks",
931931 );
932 MARKETING_VERSION = 0.6.1;
932 MARKETING_VERSION = 0.7.0;
933933 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp;
934934 PRODUCT_NAME = "$(TARGET_NAME)";
935935 SDKROOT = watchos;
@@ -946,7 +946,7 @@
946946 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
947947 CODE_SIGN_ENTITLEMENTS = OrgstarWatch/OrgstarWatch.entitlements;
948948 CODE_SIGN_STYLE = Automatic;
949 CURRENT_PROJECT_VERSION = 11;
949 CURRENT_PROJECT_VERSION = 12;
950950 DEVELOPMENT_TEAM = ZCNAX3VL9D;
951951 GENERATE_INFOPLIST_FILE = NO;
952952 INFOPLIST_FILE = OrgstarWatch/Info.plist;
@@ -954,7 +954,7 @@
954954 "$(inherited)",
955955 "@executable_path/Frameworks",
956956 );
957 MARKETING_VERSION = 0.6.1;
957 MARKETING_VERSION = 0.7.0;
958958 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp;
959959 PRODUCT_NAME = "$(TARGET_NAME)";
960960 SDKROOT = watchos;
@@ -971,7 +971,7 @@
971971 SKIP_INSTALL = YES;
972972 CODE_SIGN_ENTITLEMENTS = OrgstarWatchWidgets/OrgstarWatchWidgets.entitlements;
973973 CODE_SIGN_STYLE = Automatic;
974 CURRENT_PROJECT_VERSION = 11;
974 CURRENT_PROJECT_VERSION = 12;
975975 DEVELOPMENT_TEAM = ZCNAX3VL9D;
976976 GENERATE_INFOPLIST_FILE = NO;
977977 INFOPLIST_FILE = OrgstarWatchWidgets/Info.plist;
@@ -980,7 +980,7 @@
980980 "@executable_path/Frameworks",
981981 "@executable_path/../../Frameworks",
982982 );
983 MARKETING_VERSION = 0.6.1;
983 MARKETING_VERSION = 0.7.0;
984984 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp.widgets;
985985 PRODUCT_NAME = "$(TARGET_NAME)";
986986 SDKROOT = watchos;
@@ -996,7 +996,7 @@
996996 SKIP_INSTALL = YES;
997997 CODE_SIGN_ENTITLEMENTS = OrgstarWatchWidgets/OrgstarWatchWidgets.entitlements;
998998 CODE_SIGN_STYLE = Automatic;
999 CURRENT_PROJECT_VERSION = 11;
999 CURRENT_PROJECT_VERSION = 12;
10001000 DEVELOPMENT_TEAM = ZCNAX3VL9D;
10011001 GENERATE_INFOPLIST_FILE = NO;
10021002 INFOPLIST_FILE = OrgstarWatchWidgets/Info.plist;
@@ -1005,7 +1005,7 @@
10051005 "@executable_path/Frameworks",
10061006 "@executable_path/../../Frameworks",
10071007 );
1008 MARKETING_VERSION = 0.6.1;
1008 MARKETING_VERSION = 0.7.0;
10091009 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp.widgets;
10101010 PRODUCT_NAME = "$(TARGET_NAME)";
10111011 SDKROOT = watchos;
l10n/Localizable.xcstrings +110
@@ -452,6 +452,16 @@
452452 }
453453 }
454454 },
455 "All Folders": {
456 "localizations": {
457 "de": {
458 "stringUnit": {
459 "state": "translated",
460 "value": "Alle Ordner"
461 }
462 }
463 }
464 },
455465 "All day": {
456466 "localizations": {
457467 "de": {
@@ -462,6 +472,16 @@
462472 }
463473 }
464474 },
475 "All folders hidden": {
476 "localizations": {
477 "de": {
478 "stringUnit": {
479 "state": "translated",
480 "value": "Alle Ordner ausgeblendet"
481 }
482 }
483 }
484 },
465485 "Allow Access to Calendars…": {
466486 "localizations": {
467487 "de": {
@@ -568,6 +588,16 @@
568588 }
569589 }
570590 },
591 "Archive files are the ones your agenda files archive to, named by #+ARCHIVE:, an :ARCHIVE: property or org-archive-location.": {
592 "localizations": {
593 "de": {
594 "stringUnit": {
595 "state": "translated",
596 "value": "Archivdateien sind die Dateien, in die deine Agenda-Dateien archivieren, festgelegt durch #+ARCHIVE:, eine :ARCHIVE:-Eigenschaft oder org-archive-location."
597 }
598 }
599 }
600 },
571601 "Archive this entry?": {
572602 "localizations": {
573603 "de": {
@@ -1774,6 +1804,16 @@
17741804 }
17751805 }
17761806 },
1807 "Dimmed folders are hidden by the current Focus.": {
1808 "localizations": {
1809 "de": {
1810 "stringUnit": {
1811 "state": "translated",
1812 "value": "Abgeblendete Ordner sind durch den aktuellen Fokus ausgeblendet."
1813 }
1814 }
1815 }
1816 },
17771817 "Done": {
17781818 "localizations": {
17791819 "de": {
@@ -2109,6 +2149,16 @@
21092149 }
21102150 }
21112151 },
2152 "Exclude archived tasks": {
2153 "localizations": {
2154 "de": {
2155 "stringUnit": {
2156 "state": "translated",
2157 "value": "Archivierte Aufgaben ausschließen"
2158 }
2159 }
2160 }
2161 },
21122162 "Expand": {
21132163 "localizations": {
21142164 "de": {
@@ -2510,6 +2560,26 @@
25102560 }
25112561 }
25122562 },
2563 "Hide %@": {
2564 "localizations": {
2565 "de": {
2566 "stringUnit": {
2567 "state": "translated",
2568 "value": "%@ ausblenden"
2569 }
2570 }
2571 }
2572 },
2573 "Hide Folders": {
2574 "localizations": {
2575 "de": {
2576 "stringUnit": {
2577 "state": "translated",
2578 "value": "Ordner ausblenden"
2579 }
2580 }
2581 }
2582 },
25132583 "Hide Outline": {
25142584 "localizations": {
25152585 "de": {
@@ -2740,6 +2810,16 @@
27402810 }
27412811 }
27422812 },
2813 "Leaves folders out of the agenda and widgets, and mutes their reminders, while this Focus is on.": {
2814 "localizations": {
2815 "de": {
2816 "stringUnit": {
2817 "state": "translated",
2818 "value": "Lässt Ordner aus der Agenda und den Widgets weg und stellt ihre Erinnerungen stumm, solange dieser Fokus aktiv ist."
2819 }
2820 }
2821 }
2822 },
27432823 "Left Option": {
27442824 "localizations": {
27452825 "de": {
@@ -3412,6 +3492,16 @@
34123492 }
34133493 }
34143494 },
3495 "No folders hidden": {
3496 "localizations": {
3497 "de": {
3498 "stringUnit": {
3499 "state": "translated",
3500 "value": "Keine Ordner ausgeblendet"
3501 }
3502 }
3503 }
3504 },
34153505 "No habits in the agenda. Give an entry STYLE: habit.": {
34163506 "localizations": {
34173507 "de": {
@@ -4789,6 +4879,16 @@
47894879 }
47904880 }
47914881 },
4882 "Show a folder from the Folders menu.": {
4883 "localizations": {
4884 "de": {
4885 "stringUnit": {
4886 "state": "translated",
4887 "value": "Zeige einen Ordner über das Menü „Ordner“."
4888 }
4889 }
4890 }
4891 },
47924892 "Show days without entries": {
47934893 "localizations": {
47944894 "de": {
@@ -5403,6 +5503,16 @@
54035503 }
54045504 }
54055505 },
5506 "The folders the agenda shows": {
5507 "localizations": {
5508 "de": {
5509 "stringUnit": {
5510 "state": "translated",
5511 "value": "Die Ordner, die die Agenda zeigt"
5512 }
5513 }
5514 }
5515 },
54065516 "The icon shows in the Dock while orgstar runs. Finder, and the Dock after orgstar quits, show the default icon.": {
54075517 "localizations": {
54085518 "de": {
scripts/build-app.sh +1 −1
@@ -8,7 +8,7 @@
88set -eu
99
1010cd "$(dirname "$0")/.."
11version="${1:-0.6.1}"
11version="${1:-0.7.0}"
1212build="${2:-$version}"
1313sign="${ORGSTAR_SIGN:--}"
1414app=".build/app/orgstar.app"
scripts/build-ios-app.sh +1 −1
@@ -5,7 +5,7 @@
55set -eu
66
77cd "$(dirname "$0")/.."
8version="${1:-0.6.1}"
8version="${1:-0.7.0}"
99app=".build/ios-app/orgstar.app"
1010products=".build/ios/Build/Products/Debug-iphonesimulator"
1111
scripts/build-watch-app.sh +1 −1
@@ -7,7 +7,7 @@
77set -eu
88
99cd "$(dirname "$0")/.."
10version="${1:-0.6.1}"
10version="${1:-0.7.0}"
1111app=".build/watch-app/OrgstarWatch.app"
1212products=".build/watch/Build/Products/Debug-watchsimulator"
1313# The app group the complications read the agenda from, on the watch.