Skip to main content

Entry

Struct Entry 

Source
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: u32

0-based line of the row’s anchor, error-parser’s convention. Becomes the excerpt’s start_line.

§end_line: u32

Last 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: String

Grouping 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: String

The 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: i64

Host 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: bool

MH.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§

Source§

impl Clone for Entry

Source§

fn clone(&self) -> Entry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ComponentType for Entry

Source§

impl Debug for Entry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Lift for Entry

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Pointer = u32

§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more