13

In org-mode's daily/weekly agenda view, is there a way to display the full context of the entries?

My reading of the code is that it finds the first heading above the timestamp and displays that. However, in my case, that heading is often 3-4 levels deep and doesn't make sense without the bullets above it. It also doesn't seem like there are hooks to easily change that. Filtering is trivial, but not changing the fundamental presentation format.

studgeek
  • 14,272
  • 6
  • 84
  • 96
Ray
  • 1,769
  • 1
  • 17
  • 22
  • See this related question: https://stackoverflow.com/questions/22888785/is-it-possible-to-get-org-mode-to-show-breadcrumbs-in-agenda-todo-list Specifying breadcrumbs (`%b`) in `org-agenda-prefix-format` seems to be a solution. – xji Apr 29 '19 at 20:20

3 Answers3

9

There is no way to display all the context directly in the agenda view, but you can right click on the headline in agenda view and it will show you that headline in the main window in a sparse tree context.

You may have to collapse everything in the main window in order for the right-click-locating to show the sparse-tree view.

That seems pretty close to what you're looking for. To check, do this:

  1. Create desired agenda view.
  2. In main document window collapse everything to just first level headlines.
  3. Right-click on the desired headline in the agenda view. It should show the headline in sparse tree context in the main document window.

There are several things you can do to get better information about context in agenda views, short of using the right-click function described above.

First, you can arrange your headlines themselves so that they give you more context information. It would be possible, e.g., to have numerous 4th level headlines labeled 'Tasks', each which includes tasks related to the headings above in each tree. That's not going to give good context info in agenda view, though, since each line's headline text would be the same (i.e., 'Task') and have no info in context. A simple solution would simply be to make the headlines more specific, e.g., 'Project xxxx Tasks' and 'Project yyy Tasks'.

A different way of getting more context in agenda view would be by using 'categories'. The first column in agenda view is the filename containing the headline by default, but if the headline has a category the category will be shown. To assign a category to a headline and all of its subtree you can add a category property to the main headline, like this:

 :PROPERTIES:
  :CATEGORY:Project xxx Stuff
  :END:

Now agenda view will show 'Project xxx Stuff' in the first column for each of the agenda lines that are gathered from that headlines subtree.

ndnenkov
  • 35,425
  • 9
  • 72
  • 104
Herbert Sitz
  • 21,858
  • 9
  • 50
  • 54
  • I was afraid of that. I find this behaviour really odd. I ended up writing a really gross elisp hack to accomplish what I wanted. I am accepting this answer since it's exhaustive, albeit disappointing for me on a personal level. :) – Ray May 13 '10 at 04:11
  • 3
    You might want to re-ask your question on the 'gmane.emacs.orgmode' newsgroup. (You can view it here: http://blog.gmane.org/gmane.emacs.orgmode ) Even if there is no built-in way to get what you want, they may be amenable to fixing up your hack and including it as an optional type of agenda view. – Herbert Sitz May 13 '10 at 20:56
  • @Ray: is your elisp hack available somewhere or was it even integrated in org-mode? I'd also be very interested in such a view. – MostlyHarmless Nov 26 '12 at 12:19
  • 1
    I never made it available, no. I'll see about getting it posted online. – Ray Dec 03 '12 at 17:54
  • @Ray: I'm still looking forward to see your hack online - you could contribute it to WORG http://orgmode.org/worg/index.html or add it in the Emacswiki http://www.emacswiki.org/emacs/ . – MostlyHarmless Aug 26 '13 at 09:00
  • @Martin Sorry, Martin! I never did get around to it, and the code is now lost. :( – Ray Dec 31 '14 at 05:46
  • 2
    The modeline now shows the whole heading tree when point is on an item in org-agenda. Follow-mode (`S-f`) and EntryText (`E`) are also useful. Not sure when these features appeared. – armando.sano Apr 03 '17 at 23:49
3

Maybe an agenda is not really what you need. I would use this:

`M-x org-sparse-tree RET D'

then select the date range and navigate through the results.

HTH

bzg
  • 2,515
  • 17
  • 19
3

Follow-mode (S-f) gets pretty close to what the OP is looking for. Credit to @armando.sano in a comment on another answer.

andytilia
  • 161
  • 5