org-project-capture icon indicating copy to clipboard operation
org-project-capture copied to clipboard

Agenda view for current project

Open evandavis opened this issue 2 years ago • 6 comments

I'm using org-projectile in single-file mode (projects todos go under project-name headlines in ~/Org/projects.org.)

Is there an easy way to view my todos filtered to the current project?

I'm happy to add this in userland, but is this something that could be added to the package?

evandavis avatar Aug 30 '21 21:08 evandavis

@evandavis use org categories? I believe that categories should be added to project headings automatically, but its been a while since I actually checked.

colonelpanic8 avatar Aug 30 '21 21:08 colonelpanic8

The category is added automatically, but I'm stuck trying to get the name of the current project into the category filter from the agenda dispatcher. Writing it out, I think this might be a better question for StackExchange...

evandavis avatar Aug 31 '21 14:08 evandavis

The category is added automatically, but I'm stuck trying to get the name of the current project into the category filter from the agenda dispatcher. Writing it out, I think this might be a better question for StackExchange...

Wdym by the current project. In the agenda dispatcher it may be hard to get some notion of the current project.

colonelpanic8 avatar Aug 31 '21 22:08 colonelpanic8

What I mean is this:

  1. I'm editing a file in a known project, my-project.
  2. From that buffer, I do C-c a to bring up the agenda dispatcher.
  3. I press p to bring up my-project todos.

I think what I actually want is for org-projectile to export an agenda view that I can bind to my projectile-map, like

:bind ("s-p A" . org-projectile-project-agenda) // agenda view for this project's todos

(fwiw, I've only been using emacs full time for about a year, so thank you for the replies even if what I'm asking for is trivial or dumb!)

evandavis avatar Sep 01 '21 13:09 evandavis

Right, the problem is that you want an agenda command that is contextual i.e. it does something different depending on your current editing state. That's just not really possible as far as I remember with org-agenda.

That said, it's very easy to filter by category. It should also be possible to write a small custom bit of elisp to do what you want.

colonelpanic8 avatar Sep 01 '21 19:09 colonelpanic8