@@ -788,6 +788,56 @@ Separator used to separate multiple agenda views generated by
788788[[#org_agenda_custom_commands][org_agenda_custom_commands]].
789789To change the highlight, override =@org.agenda.separator= hl group.
790790
791+ *** org_agenda_prefix_format
792+ :PROPERTIES:
793+ :CUSTOM_ID: org_agenda_prefix_format
794+ :END:
795+ - Type: ={ agenda?: string, todo?: string, tags?: string, search?: string, tags_todo?: string }=
796+ - Default:
797+ #+begin_src lua
798+ {
799+ agenda = ' %-12:c%?t% s',
800+ todo = ' %-12:c',
801+ tags = ' %-12:c',
802+ tags_todo = ' %-12:c',
803+ search = ' %-12:c',
804+ }
805+ #+end_src
806+
807+ Format for the prefix of each line in the agenda view.
808+ The format string can contain placeholders that will be replaced with actual values.
809+ Format of the placeholder: =%[specifiers][variable]= or =%[specifiers](lua expression)=.
810+
811+ *Specifiers:*
812+ - =-= - Left align the value (default is right align)
813+ - =[number]= - Set fixed width for the value
814+ - =?= - Optional placeholder. If the value is empty, the placeholder (and surrounding spaces) will be omitted.
815+
816+ *Variables:*
817+ - =c= - Category of the headline
818+ - =:c= - Category of the headline followed by a colon
819+ - =s= - Planning info (Deadline, Scheduled, etc.)
820+ - =t= - Time range (e.g. 10:00-11:00)
821+ - =T= - Tags
822+ - =e= - Effort property
823+ - =l= - Headline level
824+ - =b= - Breadcrumbs (parent headline titles separated by =->=)
825+
826+ *Lua expressions:*
827+ Anything inside =%()= will be evaluated as a Lua expression.
828+ The expression has access to following variables:
829+ - =headline= - [[#org-headline][OrgHeadline]] object
830+ - =item= - [[#org-agenda-item][OrgAgendaItem]] object (only in =agenda= view)
831+ - =metadata= - Metadata table containing =category_length=
832+
833+ Example:
834+ #+begin_src lua
835+ org_agenda_prefix_format = {
836+ agenda = ' %-12:c %?t %s ',
837+ todo = ' %-12:c %(headline:get_property("PRIORITY") or "C") '
838+ }
839+ #+end_src
840+
791841*** org_agenda_remove_tags
792842:PROPERTIES:
793843:CUSTOM_ID: org_agenda_remove_tags
0 commit comments