Commit d4c865455d

d4c865455df0b8b839511677a988f08ffbd91d16

parent: ace1a9a099

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-22 20:47 UTC

Agenda time grid: drop redundant lines

The time grid's default `when` adds remove-match, so no grid line
repeats a time an entry has. Grid and now lines get vertical padding
instead of a 10 to 16 pt row on the Mac and iOS.

Ref #224

Layout: unified · split

Sources/OrgApp/UserConfig.swift +1 −1
@@ -331,7 +331,7 @@ public enum UserConfig {
331331 comment: "a heading in the project with one of these tags unsticks it; * for any tag", legacy: ""),
332332 Setting(section: "org-stuck-projects", key: "regexp", defaultsKey: "stuckProjectsRegexp", kind: .string, fallback: .string(""),
333333 comment: "text in the project matching this Emacs regexp unsticks it", legacy: ""),
334 Setting(section: "org-agenda-time-grid", key: "when", defaultsKey: "agendaTimeGridWhen", kind: .string, fallback: .string("daily today require-timed"),
334 Setting(section: "org-agenda-time-grid", key: "when", defaultsKey: "agendaTimeGridWhen", kind: .string, fallback: .string("daily today require-timed remove-match"),
335335 comment: "daily (one-day views), today, weekly (every day), require-timed (only with timed entries), remove-match (no line at an entry's time)", legacy: ""),
336336 Setting(section: "org-agenda-time-grid", key: "times", defaultsKey: "agendaTimeGridTimes", kind: .string, fallback: .string("800 1000 1200 1400 1600 1800 2000"),
337337 comment: "the grid's times as HHMM, separated by spaces", legacy: ""),
Sources/Orgstar/AgendaView.swift +2 −2
@@ -483,7 +483,7 @@ struct AgendaView: View {
483483 }
484484 .foregroundStyle(.tertiary)
485485 .padding(.horizontal, 16)
486 .frame(height: 10)
486 .padding(.vertical, 4)
487487 .accessibilityHidden(true)
488488 }
489489
@@ -562,7 +562,7 @@ struct AgendaView: View {
562562 }
563563 .foregroundStyle(todayColor)
564564 .padding(.horizontal, 16)
565 .frame(height: 10)
565 .padding(.vertical, 4)
566566 .accessibilityLabel("Now")
567567 }
568568
Sources/OrgstarMobile/AgendaScreen.swift +2 −2
@@ -1078,7 +1078,7 @@ struct GridLineRow: View {
10781078 .foregroundStyle(.tertiary)
10791079 .listRowInsets(EdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 16))
10801080 .listRowSeparator(.hidden)
1081 .frame(height: 14)
1081 .padding(.vertical, 5)
10821082 .accessibilityHidden(true)
10831083 }
10841084}
@@ -1098,7 +1098,7 @@ struct NowLine: View {
10981098 }
10991099 .listRowInsets(EdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 16))
11001100 .listRowSeparator(.hidden)
1101 .frame(height: 16)
1101 .padding(.vertical, 5)
11021102 .accessibilityLabel("Now")
11031103 }
11041104}
docs/manual/guide/07-agenda.org +1 −1
@@ -141,7 +141,7 @@ org-agenda-show-all-dates = true
141141
142142Today's past deadlines and entries and habits scheduled on earlier days go in a group headed =Overdue= with their count, above today's other entries; on iOS it is a section of its own above today. Their left column shows how late they are, not the time of day they had. The oldest date comes first; entries with the same date keep Org's order. Click or tap the header to collapse or expand the group; it stays as you left it.
143143
144Days with a time grid show dotted lines at the grid's times among the timed entries, as =org-agenda-time-grid= does: by default at 8:00, 10:00 and every two hours to 20:00, on today and in one-day views, when the day has a timed entry. An entry at a grid line's time comes before the line. On today, a line marked with the current time sits among them: before the first entry that starts later, or after the last one when all have started. The grid's days and times are set in =[org-agenda-time-grid]= in =config.toml=, =org-agenda-use-time-grid= turns the grid off, and =org-agenda-show-current-time-in-grid= the now line (see [[file:13-configuration.org][Configuration]]). With the grid off there is no now line, as in Org.
144Days with a time grid show dotted lines at the grid's times among the timed entries, as =org-agenda-time-grid= does: by default at 8:00, 10:00 and every two hours to 20:00, on today and in one-day views, when the day has a timed entry, and not at a time an entry has. On today, a line marked with the current time sits among them: before the first entry that starts later, or after the last one when all have started. The grid's days and times are set in =[org-agenda-time-grid]= in =config.toml=, =org-agenda-use-time-grid= turns the grid off, and =org-agenda-show-current-time-in-grid= the now line (see [[file:13-configuration.org][Configuration]]). With the grid off there is no now line, as in Org.
145145
146146** Sorting
147147
docs/manual/guide/13-configuration.org +3 −3
@@ -356,10 +356,10 @@ These mirror the four elements of =org-stuck-projects=. See [[file:07-agenda.org
356356
357357| Key | Type | Default | Effect |
358358|---------+--------+----------------------------------------+-------------------------------------------|
359| =when= | string | ="daily today require-timed"= | Which days get a grid, separated by spaces |
360| =times= | string | ="800 1000 1200 1400 1600 1800 2000"= | The grid's times as =HHMM= |
359| =when= | string | ="daily today require-timed remove-match"= | Which days get a grid, separated by spaces |
360| =times= | string | ="800 1000 1200 1400 1600 1800 2000"= | The grid's times as =HHMM= |
361361
362These mirror the first two elements of =org-agenda-time-grid=. =when= takes =daily= (views of one day), =today=, =weekly= (every day), =require-timed= (only days with a timed entry) and =remove-match= (no line at a time an entry has). orgstar draws the lines itself, so Emacs's third and fourth elements, the strings for the lines, have no equivalent.
362These mirror the first two elements of =org-agenda-time-grid=. =when= takes =daily= (views of one day), =today=, =weekly= (every day), =require-timed= (only days with a timed entry) and =remove-match= (no line at a time an entry has). The default adds =remove-match= to Org's, so that a grid line doesn't repeat an entry's time; ="daily today require-timed"= gives Org's grid. orgstar draws the lines itself, so Emacs's third and fourth elements, the strings for the lines, have no equivalent.
363363
364364** [org-structure-template-alist]
365365