Emacs org-mode agenda filter by owner

只愿长相守 提交于 2019-12-06 23:12:54

问题


Is it possible to filter agenda in emacs based on Owner property?

Currently I use tags to set owner of TODO items. This way I can filter agenda by tags like this:

(setq org-agenda-custom-commands
  `(("o" "tasks for oleg"
     ((org-agenda-list)
      (org-agenda-filter-apply ,(list "+oleg")))
     ((org-agenda-remove-tags t)))
    ("k" "tasks for karl"
     ((org-agenda-list)
      (org-agenda-filter-apply ,(list "+karl")))
     ((org-agenda-remove-tags t)))
    ))

It's not convenient to use tags to mark the owner but I see no other way to filter TODO items by Owner.


回答1:


This worked for me in my .emacs:

(setq org-agenda-custom-commands
   (quote (("s" "tasks for Seth" tags "+OWNER=\"seth\"" nil))))

My properties are upper-case though so you'd need to use +Owner= methinks.

You could also invoke your own custom search by doing:

C-c a m +Owner="foobar"

(assuming you have C-c a bound to org-agenda.

I'm running org-mode 6.27a. For what it's worth, I wasn't quite sure how to do this at first but the worg page about custom commands was very helpful.



来源:https://stackoverflow.com/questions/1361595/emacs-org-mode-agenda-filter-by-owner

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!