Fix: (org-dblock-write:org-ql) remove cookies (V2)
Fixes https://github.com/alphapapa/org-ql/issues/248 Thanks to @yantar92 (https://github.com/alphapapa/org-ql/pull/249#issuecomment-907546526)
This commit is contained in:
parent
ca5db3c04b
commit
517a37659d
1 changed files with 8 additions and 6 deletions
|
|
@ -285,12 +285,14 @@ For example, an org-ql dynamic block header could look like:
|
||||||
(list (cons 'todo (lambda (element)
|
(list (cons 'todo (lambda (element)
|
||||||
(org-element-property :todo-keyword element)))
|
(org-element-property :todo-keyword element)))
|
||||||
(cons 'heading (lambda (element)
|
(cons 'heading (lambda (element)
|
||||||
(org-make-link-string (replace-regexp-in-string "\[[[:digit:]]*/[[:digit:]]*\]\\|\[[[:digit:]]*\%\]" ""
|
(org-make-link-string (s-trim (org-element-interpret-data
|
||||||
(org-element-property :raw-value element))
|
(--remove (eq 'statistics-cookie (org-element-type it))
|
||||||
(org-link-display-format
|
(org-element-property :title element))))
|
||||||
(replace-regexp-in-string "\[[[:digit:]]*/[[:digit:]]*\]\\|\[[[:digit:]]*\%\]" ""
|
(org-link-display-format
|
||||||
(org-element-property :raw-value element))))))
|
(s-trim (org-element-interpret-data
|
||||||
(cons 'priority (lambda (element)
|
(--remove (eq 'statistics-cookie (org-element-type it))
|
||||||
|
(org-element-property :title element))))))))
|
||||||
|
(cons 'priority (lambda (element)
|
||||||
(--when-let (org-element-property :priority element)
|
(--when-let (org-element-property :priority element)
|
||||||
(char-to-string it))))
|
(char-to-string it))))
|
||||||
(cons 'deadline (lambda (element)
|
(cons 'deadline (lambda (element)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue