Hi there,
Since I started with LogSeq I started tagging people with #@name. Did someone do the same? If I want to list all tags which are starting with @, how can this be done using a query?
Thanks for sharing
Hi there,
Since I started with LogSeq I started tagging people with #@name. Did someone do the same? If I want to list all tags which are starting with @, how can this be done using a query?
Thanks for sharing
Something like this:
#+BEGIN_QUERY
{
:query [:find (pull ?page [* ])
:where
[?block :block/refs ?page]
[?page :block/name ?name]
[(clojure.string/starts-with? ?name "@")]
]
}
#+END_QUERY
Great, many thanks! This works fine for @Peter.
When it is a llittle more complex like friends/@Jan it does not list Jan. How can this query also list Jan?
friends/@Jan
is not a good idea to begin with. But if this is not discussable, could replace starts-with?
with includes?
. For complexity beyond this point, regular expressions are needed.
@mentaloid, this is perfect. Many thanks.
Can you explain why you think friends/@Jan, family/@Bert or CompanyX/@Peter is not working for you?
@Jan
?
@Peter
changes company?
@Peter
doesnβt belong to that (or any) company in any sense.