alphapapa / org-ql

A searching tool for Org-mode, including custom query languages, commands, saved searches and agenda-like views, etc.
GNU General Public License v3.0
1.35k stars 104 forks source link

FEATURE REQUEST: Tags column (formatter) for dynamic block #359

Open ujikol opened 11 months ago

ujikol commented 11 months ago

This would be very simple and is an obviously missing feature.

It should be possible to filter the tags with regexp.

I fixed it for me with the following el-patch for (org-dblock-write:org-ql):

                   (el-patch-add
                     (cons 'tags (lambda (element &optional pattern)
                                   (s-join " "
                                           (--filter
                                            (or (not pattern)
                                                (s-matches? pattern it))
                                            (org-element-property :tags element))))))

As stated in my other feature request, tags and property columns should be able to access inherited tags/properties. This information is currently not accessible via the element parameter of (org-dblock-write:org-ql).