Add: (org-ql-view--format-element) Set org-agenda-type to search

Some org-agenda commands check the org-agenda-type text property to
ensure that the command is valid to run in that type of agenda.
Notably this fixes running commands org-agenda-schedule and
org-agenda-deadline.

Setting the type to "search" prohibits some of the functions that are
still not working in these buffers, like org-agenda-do-date-earlier.

Fixes #35.
This commit is contained in:
Mikhail Skorzhinskii 2019-09-13 09:05:40 +02:00 committed by Adam Porter
parent 9295ec4c06
commit 086f290d0b
2 changed files with 2 additions and 0 deletions

View file

@ -481,6 +481,7 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience
+ Variable =org-ql-block-header=, which overrides the default header in =org-ql-block= agenda blocks. + Variable =org-ql-block-header=, which overrides the default header in =org-ql-block= agenda blocks.
+ Predicate =(path)=. + Predicate =(path)=.
+ Option =org-ql-views= may now be customized in a guided, structured way with the customization UI (e.g. =M-x customize-option RET org-ql-views RET=, or press =c= in the =org-ql-view-sidebar= buffer). + Option =org-ql-views= may now be customized in a guided, structured way with the customization UI (e.g. =M-x customize-option RET org-ql-views RET=, or press =c= in the =org-ql-view-sidebar= buffer).
+ Enable more Org Agenda commands in =org-ql-view= buffers (e.g. setting deadlines and scheduling). (Fixes [[https://github.com/alphapapa/org-ql/issues/35][#35]]. Thanks to [[https://github.com/mz-pdm][Milan Zamazal]] and [[https://github.com/mskorzhinskiy][Mikhail Skorzhinskii]].)
*Changed* *Changed*
+ Predicate =heading= now accepts multiple regexps, which are matched with boolean =AND=. + Predicate =heading= now accepts multiple regexps, which are matched with boolean =AND=.

View file

@ -490,6 +490,7 @@ return an empty string."
;; FIXME: Use proper prefix ;; FIXME: Use proper prefix
(concat " " it) (concat " " it)
(org-add-props it properties (org-add-props it properties
'org-agenda-type 'search
'todo-state todo-keyword 'todo-state todo-keyword
'tags tag-list 'tags tag-list
'org-habit-p habit-property))))) 'org-habit-p habit-property)))))