Dear All,
Including "%b" in the org agenda prefix formats (org-agenda-prefix-format
) allows to display entries' outline paths, which is super useful to get project-oriented agenda views/todo-list.
Consider a project 'Foobar Report'. In the agenda view/todo-list, it would look like the following:
```
PROJECT Foobar Report
Foobar Report->TODO Task1
Foobar Report->Task1->TODO Subtask1.1
Foobar Report->Task1->TODO Subtask1.2
Foobar Report->TODO Task2
Foobar Report->Task2-> TODO Subtask2.1
Foobar Report->Task2-> TODO Subtask2.2
```
```
(when org-prefix-has-breadcrumbs
(setq breadcrumbs
(org-with-point-at (org-get-at-bol 'org-marker)
(let ((s (org-format-outline-path (org-get-outline-path)
(1- (frame-width))
nil org-agenda-breadcrumbs-separator)))
(if (eq "" s) "" (concat s org-agenda-breadcrumbs-separator))))))
```
by replacing (org-get-outline-path) with
```
(nthcdr (1- org-agenda-breadcrumbs-start-level)
(org-get-outline-path))
```
while setting a custom variable org-agenda-breadcrumbs-start-level
to 2. It works well.
Would the Org devs/active contributors be willing to implement such modification (maybe a cleaner version, with a better custom variable name?) in the next release of Org?
Best,
MP
PS: Note that I tried to implement the same using advice-add
, but miserably failed and decided to go for a complete redefinition of org-agenda-format-item
(more lines, but less pain).