-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A general way to exclude files matching regexp from dblocks and maybe more (was: Exclude keywords while using dblocks) #421
Comments
From: Diego Efe ***@***.***>
Date: Sun, 1 Sep 2024 11:21:41 -0700
Hello!
Hello there!
[... 7 lines elided]
``` elisp
#+BEGIN: denote-links :regexp (rx (and (regexp ".*-adventure") (not (regexp ".*_books.*")))) :sort-by-component title :reverse-sort nil :id-only nil
#+END:
```
Is there any error on this expression?
I am not familiar with the 'rx' notation. When I evaluate it though, it
gives me this:
(error "Illegal argument to rx ‘not’: (regexp \".*_books.*\")")
Reading the documentation, this one is about characters or character
classes. It will not work with arbitrary strings.
Is there any alternative or easier way to achieve this?
I am not sure. As far as I know, Elisp regular expressions do not have
this kind of negation. If so, we need some other mechanism to make this
happen, which is possible such as with an extra parameter to the dblock.
But we need to think about it before adding new features.
Also, I'm not sure if this is the right place to ask for help.
This is fine.
Thanks a lot to Prot and contributors for this excellent package!
You are welcome!
…--
Protesilaos Stavrou
https://protesilaos.com
|
I think what we need here is a more general way of specifying a [ And this will probably extend to |
I am working on this feature in the new It is still a work-in-progress. I was about to finalise it today, but there is a storm now and will be out of electricity soon... |
I just merged it into |
Hello! I've started using
dblocks
to help me write metanotes, but I'm having trouble filtering notes to exclude certain keyword. For example, I want to list notes that contain the word "-adventure", but exclude the ones with the keyword "_books". I tried first with regexp and then with RX notation without success, the result is always empty. This was my last attempt:Is there any error on this expression? Is there any alternative or easier way to achieve this? Also, I'm not sure if this is the right place to ask for help.
Thanks a lot to Prot and contributors for this excellent package!
The text was updated successfully, but these errors were encountered: