pub struct Entry {
pub line: u32,
pub end_line: u32,
pub group: String,
pub label: String,
pub sort_key: i64,
pub spans: Vec<DisplaySpan>,
pub annotation: Option<Annotation>,
pub emphasis: bool,
}Expand description
The WIT entry, re-exported so the adapter and the loader name one type.
One agenda row the guest recognised in a file.
Fields§
§line: u320-based line of the row’s anchor, error-parser’s
convention. Becomes the excerpt’s start_line.
end_line: u32Last 0-based line of the excerpt, inclusive. Equal to line for
the one-row-per-headline case. A guest wanting the headline plus
its SCHEDULED: line returns line + 1 here.
group: StringGrouping key. Rows that sort next to each other and share a key render under ONE header — which is how a date group shows one header for N rows drawn from N different files.
It is a key, not a label, because the guest cannot know which of its rows will land first once every other file’s rows are interleaved by the sort. The host compares keys AFTER sorting and titles the first row of each run; the rest render no header.
label: StringThe header title for this row, used when it turns out to start
a group — "Today", "2026-08-27 Thu". Rows sharing a group
should carry the same label; the first one after the sort is
the one rendered.
The row’s own text is the source line itself. This is a header, not a rendered agenda line: an excerpt shows the file, which is what makes the agenda editable rather than a list of strings.
sort_key: i64Host stable-sorts across files on this, ascending. The guest owns what it means (an epoch day, a priority rank, a composite).
spans: Vec<DisplaySpan>OA.5: how this row is COLOURED, as byte spans into the row’s own first line.
Without this a row is painted by the source file’s tree-sitter grammar, because that is all the host has — so an agenda looks like org text that happens to be out of order, rather than like an agenda. The keyword, the priority, the tags and the date are semantics only the guest knows.
Offsets are relative to the start of line, not to the composed
view: the guest cannot know where its row lands once every other
file’s rows are interleaved by the sort. The host translates after
sorting, the same way it titles group runs.
display-span.slot names a style rather than carrying one, so a
guest’s own registered theme elements (org.todo.WAITING) resolve
through exactly the path a highlights.scm capture takes. Empty is
the ordinary case for a source with nothing to say about colour —
the grammar’s own highlighting is then what shows, unchanged.
annotation: Option<Annotation>HB.5: a row to hang BELOW this one, or none.
A row’s own text is a verbatim excerpt of a source line, so there is
nowhere in it to put something the guest computed — org writes a
habit’s consistency graph at column 50 because its agenda line is
generated text, and ours is the file. The annotation becomes a
virtual-row anchored below the row instead.
It rides the entry rather than a producer seam of its own for
[spans]’s reason: a general producer would be handed the COMPOSED
buffer, and a guest cannot know where its row lands until the sort
has interleaved every other file’s rows. See org-agenda.md §5b.
none is the ordinary case — an agenda of plain TODOs grows no
second rows.
emphasis: boolMH.A6: render this row’s header EMPHASISED, if it turns out to start a group.
Read only from the row that starts the group — the same rule
[label] already lives by, and for the same reason: the guest
cannot know which of its rows lands first once the sort has
interleaved every other file’s, so it sets this on EVERY row of
the group and the host reads whichever one wins. Setting it on
some rows of a group and not others is a guest bug whose symptom
is “the header is sometimes emphasised”.
What emphasis LOOKS like is the colourscheme’s business, not the
guest’s: the host renders these headers from
multibuffer.excerpt_header.emphasis[.title] rather than from
anything named here. A theme that does not define those elements
renders an emphasised header exactly like an ordinary one —
undistinguished, never invisible.
One per view is a convention this cannot enforce. A guest that emphasises every group has emphasised nothing.
false is the ordinary case and is byte-identical to the
behaviour before this field existed.
Trait Implementations§
impl ComponentType for Entry
impl Lift for Entry
impl Lower for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more