views:

130

answers:

1

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.

A: 

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.

[edited to add stuff that comes under this:] 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.

Herbert Sitz
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
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