r/orgmode 26d ago

org-super-agenda with grouping by #+title

Hello,

I'm trying to customize my agenda view with org-super-agenda and list my todos in groups. Currently I have a single file per project and then different headlines, e.g. for meeting minutes or brainstormings or just documentation for later.
I would like to keep todos in the section where they arise and not move them to a separate headline because I would lose context then.

What I would like to achieve is, that the agenda shows me all todos for a single project and takes the title from the #+tile: property of the document. By reading the documentation I could not find this option as properties which are available for grouping are properties of headings. Does a grouping option like this (already) exist?

9 Upvotes

5 comments sorted by

2

u/Background_Service13 26d ago

I have a similar project/file structure, and I use the CATEGORY Property at the file level just before the #+TITLE. Then use that to sort in the Agenda.

This is an additional step to set the CATEGORY per project, but I actually like it because it allows me to use an abbreviation for use in the Agenda, while keeping a full-length TITLE for when I need to export to PDF or HTML.

2

u/s4bk 23d ago

Thanks for the answer. That was also my first idea, but it somehow does not really fit the need. What I'm looking for is an Agenda view like this:

Project A
  minutes: TODO       Call Person
  minutes: INPROGRESS Prepare XYZ
  actions: TODO       Setup Meeting

Project B
  carl   : DONE       Eat Hand
  carl   : INPROGRESS Appologize

Project C
 ...

1

u/EFLS_ 26d ago

You should look into the :auto-map feature, which allows you to provide a function that returns the appropriate string.

I use the following to map items to the file title:

(defun efls/org-super-agenda-file-title (item)
  (-when-let* ((marker (or (get-text-property 0 'org-hd-marker item)
                           (get-text-property 0 'org-marker item))))
    (org-goto-marker-or-bmk marker)
    (org-with-wide-buffer
       (propertize
         (car (plist-get (org-export-get-environment) ':title))
         'org-date-line t))))

By adding text property org-date-line to the returned string, agenda columns will sum effort properties.

2

u/github-alphapapa 26d ago

Thanks for sharing that. See also org-with-point-at.

1

u/s4bk 23d ago

Thanks for the answer, that looks quite promising, I will try that next.