12

In Emacs, I have a set of TODOs in the following format

* H1
** H2
*** H3
**** TODO X

When I look at the agenda-todo view, it shows up only as TODO x. Is there any way to get the agenda view to display it as H1/H2/H3/TODO X ?

Rahul Gopinath
  • 808
  • 10
  • 24
  • 6
    The breadcrumb for the item under the pointer appears in the minibuffer. Not what you ask for, but maybe it helps. – Juancho Apr 06 '14 at 02:27
  • 1
    Thanks, it is useful, but I would really like to see breadcrumbs for all pending tasks at once. – Rahul Gopinath Apr 06 '14 at 03:14
  • 1
    Here is a link to the same feature request on the mailing list from a couple of years ago -- it contains some ideas (with code) on how to implement this feature: http://comments.gmane.org/gmane.emacs.orgmode/60873 – lawlist Apr 06 '14 at 15:46
  • 1
    Thanks, but it seems the feature being discussed is what Juancho has mentioned (showing the breadcrumbs one at a time). – Rahul Gopinath Apr 06 '14 at 21:23

2 Answers2

13

I found this solution from here

(setq org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% s")
         (timeline . "  % s")
         (todo .
               " %i %-12:c %(concat \"[ \"(org-format-outline-path (org-get-outline-path)) \" ]\") ")
         (tags .
               " %i %-12:c %(concat \"[ \"(org-format-outline-path (org-get-outline-path)) \" ]\") ")
         (search . " %i %-12:c"))
      )

This shows the breadcrumbs in the agenda todo view.

Rahul Gopinath
  • 808
  • 10
  • 24
4

You should be able to use %b in the format string to show the breadcrumb.

hrehfeld
  • 470
  • 1
  • 4
  • 14
  • Yes, you can use `%b`, which renders the breadcrumbs using `->` as the separator. `(org-format-outline-path (org-get-outline-path))` on the other hand renders it using `/` as the separator. I personally find the latter more readable, and hence prefer @rahul solution. Totally a matter of taste though... –  Feb 13 '19 at 16:56
  • 1
    You can set a custom separator to be used with `%b` via the `org-agenda-breadcrumbs-separator` variable – d4ncer Sep 05 '19 at 01:46