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:
Maikol Solís 2021-08-30 11:58:34 -06:00 committed by GitHub
parent ca5db3c04b
commit 517a37659d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -285,12 +285,14 @@ For example, an org-ql dynamic block header could look like:
(list (cons 'todo (lambda (element)
(org-element-property :todo-keyword element)))
(cons 'heading (lambda (element)
(org-make-link-string (replace-regexp-in-string "\[[[:digit:]]*/[[:digit:]]*\]\\|\[[[:digit:]]*\%\]" ""
(org-element-property :raw-value element))
(org-link-display-format
(replace-regexp-in-string "\[[[:digit:]]*/[[:digit:]]*\]\\|\[[[:digit:]]*\%\]" ""
(org-element-property :raw-value element))))))
(cons 'priority (lambda (element)
(org-make-link-string (s-trim (org-element-interpret-data
(--remove (eq 'statistics-cookie (org-element-type it))
(org-element-property :title element))))
(org-link-display-format
(s-trim (org-element-interpret-data
(--remove (eq 'statistics-cookie (org-element-type it))
(org-element-property :title element))))))))
(cons 'priority (lambda (element)
(--when-let (org-element-property :priority element)
(char-to-string it))))
(cons 'deadline (lambda (element)