skeeto / elfeed

An Emacs web feeds client
The Unlicense
1.52k stars 118 forks source link

[Suggestion] Document org-capture specific expension #532

Open CyberFox001 opened 3 days ago

CyberFox001 commented 3 days ago

Hello,

First, thank for this amazing Emacs package. It make me use RSS feed again.

In it's source code, Elfeed define a store-link function that define some info that can be used in org-capture template.

These info could be used in capture templates with the `%:keyword" template expansion.

It would be great to document these template expension, specific to Elfeed, in the Elfeed documentation.

I tried to follow what the docstring of function (elfeed-link-store-link) say, but I got errors for most of the template expansion. A documentation with full list of Elfeed specific template expansion and how to use them would help.

CyberFox001 commented 1 day ago

After verifications, the Elfeed function elfeed-link-store-link use not correctly the function org-store-link-props.

The docstring of org-store-link-props say:

The properties are pre-processed by extracting names, addresses and dates.

But elfeed-link-store-link do not pre-process the data it pass to org-store-link-props.

When I store a link to an Elfeed item and describe the variable org-store-link-plist, I can see that some properties are not in a string format. The date is a float, the tags is a list, the authors are a list of plists, etc.

To let the store properties be used inside an Org-capture template, all of them need to be pre-processed by elfeed-link-store-link.

I also see that org-store-link-props is deprecated since Org-mode 9.3 and instead we need to use org-link-store-props.

Finally, the properties we store don't need to be prefixed with "elfeed-entry", because all the stored properties are already about an elfeed entry. It's possible to use properties like ":author" or ":date", it will not conflict with anything.

I have planned to modify elfeed-link-store-link on my installation to fix it. Do you want me to make a pull-request with my modification ?