3

I'm using the following config for my most used agenda view:

    ("c" "Daily plan"
     ((agenda ""((org-agenda-ndays 1)
         (org-agenda-category-filter '("+life"))
         (org-agenda-sorting-strategy
          (quote ((agenda time-up priority-down tag-up))))
         (org-deadline-warning-days 14)))
     (todo "TODO")
     (todo "NEXT"
    ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled 'deadline))))
     (todo "WAIT"))
    ((org-agenda-tag-filter-preset '("-chores"))))

Additionally I have only two main org-mode files: life and work, what I'd like to do is to set my emacs so that when I start it at work agenda shows entries filtered by default to work only (same as navigating to a work entry in agenda and pressing '<'). It's not much typing but being unable to automate this irritates me a lot.

As you can see in line 3 I've tried to specify that life is always the default filter but it did not work. Any ideas of how this can be done?

  • Please fix the indentation and unbalanced parens in your code sample. – Drew Dec 22 '17 at 22:33
3

Setting org-agenda-category-filter doesn't actually set a filter. It seems to just be part of org-agenda-filter-by-categories internal workings. The variable you want is org-agenda-category-filter-preset which should be a list of strings like "+life". This setting is global to the entire agenda so it must be set in the global options of the agenda command (where you have org-agenda-tag-filter-preset now).

  • It worked! Thanks, I've somehow missed this. – kajman Dec 22 '17 at 21:56
  • the problem now is that pressing '<' switches between '<+life>' and '<+life+life>' filter so I cannot go back to main view. Any idea how to approach this? – kajman Dec 23 '17 at 10:48
  • That is strange. It looks to me like a bug in the category filtering. Try asking on the mailing list – erikstokes Dec 23 '17 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.