refact: renamed property to link
This commit is contained in:
parent
c632500727
commit
1e1469b8b3
1 changed files with 8 additions and 7 deletions
|
|
@ -296,16 +296,17 @@ Valid parameters include:
|
|||
:ts-format Optional format string used to format
|
||||
timestamp-based columns.
|
||||
|
||||
:not-links Optional boolean. If non-nil, don't make headings
|
||||
into links.
|
||||
:link Optional flag. Defaults to `t`. When non-nil, links
|
||||
are displayed as links, otherwise they are displayed
|
||||
as plain text.
|
||||
|
||||
For example, an org-ql dynamic block header could look like
|
||||
this (must be a single line in the Org buffer):
|
||||
|
||||
#+BEGIN: org-ql :query (todo \"UNDERWAY\")
|
||||
:columns (priority todo heading) :sort (priority date)
|
||||
:ts-format \"%Y-%m-%d %H:%M\" :not-links t"
|
||||
(-let* (((&plist :query :columns :sort :ts-format :take :not-links) params)
|
||||
:ts-format \"%Y-%m-%d %H:%M\" :link t"
|
||||
(-let* (((&plist :query :columns :sort :ts-format :take :link) params)
|
||||
(query (cl-etypecase query
|
||||
(string (org-ql--query-string-to-sexp query))
|
||||
(list ;; SAFETY: Query is in sexp form: ask for confirmation, because it could contain arbitrary code.
|
||||
|
|
@ -321,9 +322,9 @@ this (must be a single line in the Org buffer):
|
|||
(cons 'heading (lambda (element)
|
||||
(let ((normalized-heading
|
||||
(org-ql-search--link-heading-search-string (org-element-property :raw-value element))))
|
||||
(if not-links
|
||||
normalized-heading
|
||||
(org-ql-search--org-make-link-string normalized-heading (org-link-display-format normalized-heading))))))
|
||||
(pcase links
|
||||
(t (org-ql-search--org-make-link-string normalized-heading (org-link-display-format normalized-heading)))
|
||||
(nil normalized-heading)))))
|
||||
(cons 'priority (lambda (element)
|
||||
(--when-let (org-element-property :priority element)
|
||||
(char-to-string it))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue