Add: org-ql-agenda-face

This commit is contained in:
Adam Porter 2019-08-12 20:45:44 -05:00
parent fbdfe58a08
commit e97d2c0af3
2 changed files with 8 additions and 1 deletions

View file

@ -365,6 +365,7 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience
+ Function ~org-ql-agenda--agenda~ optionally takes a list of entries as an argument. + Function ~org-ql-agenda--agenda~ optionally takes a list of entries as an argument.
+ Selectors ~ts-a~ and ~ts-i~, aliases for ~ts-active~ and ~ts-inactive~. + Selectors ~ts-a~ and ~ts-i~, aliases for ~ts-active~ and ~ts-inactive~.
+ Selector ~ts~ now accepts a ~:type~ argument. + Selector ~ts~ now accepts a ~:type~ argument.
+ Face =org-ql-agenda-due-date=.
*Changed* *Changed*
+ Function ~org-ql-query~ renamed to ~org-ql-select~. ~org-ql-query~ now refers to a new function. + Function ~org-ql-query~ renamed to ~org-ql-select~. ~org-ql-query~ now refers to a new function.

View file

@ -48,6 +48,12 @@
(when (version< org-version "9.2") (when (version< org-version "9.2")
(defalias 'org-get-tags #'org-get-tags-at)) (defalias 'org-get-tags #'org-get-tags-at))
;;;; Faces
(defface org-ql-agenda-due-date
'((t (:slant italic :weight bold)))
"Face for due dates in `org-ql-agenda' views.")
;;;; Variables ;;;; Variables
(defvar org-ql-agenda-buffer-name "*Org-QL-Agenda*" (defvar org-ql-agenda-buffer-name "*Org-QL-Agenda*"
@ -385,7 +391,7 @@ return an empty string."
(org-habit-parse-todo)))) (org-habit-parse-todo))))
(due-string (pcase (org-element-property :relative-due-date element) (due-string (pcase (org-element-property :relative-due-date element)
('nil "") ('nil "")
(string (format " %s " (org-add-props string nil 'face 'underline))))) (string (format " %s " (org-add-props string nil 'face 'org-ql-agenda-due-date)))))
(string (s-join " " (-non-nil (list todo-keyword priority-string title due-string tag-string))))) (string (s-join " " (-non-nil (list todo-keyword priority-string title due-string tag-string)))))
(remove-list-of-text-properties 0 (length string) '(line-prefix) string) (remove-list-of-text-properties 0 (length string) '(line-prefix) string)
;; Add all the necessary properties and faces to the whole string ;; Add all the necessary properties and faces to the whole string