Open WeissP opened 10 months ago
From: Weiss @.***> Date: Tue, 12 Dec 2023 21:09:51 -0800
[... 19 lines elided]
I havn't yet checked whether it is possible to pass functions via org dynamic block, it is just an idea.
I think this should work by passing the unquoted symbol of the function as the value of the parameter. Like:
:no-front-matter my-function
My motivation is to extract only the contents before the first header, in my note system, this serves as a summary of the whole note. Here is what I have written for my extractor:
[... 14 lines elided]
I think this is a good idea. Let's give it another week before working on it. I just need this extra time to be sure we catch any obvious bugs with the current stable version.
-- Protesilaos Stavrou https://protesilaos.com
Hello again @WeissP! It has been a while since we discussed the idea of passing a function to the Denote Org dynamic blocks. This is about how the :no-front-matter
should be done. As I noted, I am happy to see this happen. If you have any concrete proposal, please send it.
Regarding
denote-org-dblock-insert-files
, users can currently only control inserted file contents via optionno-front-matter
, could we change this option to something likeextractor
, which receives a function for extracting file contents?More detaily, we could modify this part
to something like
I havn't yet checked whether it is possible to pass functions via org dynamic block, it is just an idea.
My motivation is to extract only the contents before the first header, in my note system, this serves as a summary of the whole note. Here is what I have written for my extractor:
Now I have just used
advice-add
to overridedenote-org-dblock--get-file-contents
to make my custom extractor work, which is of course not a good idea.