manojm321 / elfeed-dashboard

A frontend for elfeed
GNU General Public License v3.0
80 stars 9 forks source link

Utilize property drawers #6

Closed progfolio closed 1 year ago

progfolio commented 3 years ago

I appreciate the simplicity of the current approach, but it might be convenient to make more use of existing Org functionality.

One idea is to use property drawers to store the keymap/action associations. This has the advantage of keeping the settings associated with each heading (instead of jumping back and forth between the "* Configuration" section). e.g.

* Basics
** Update
:PROPERTIES:
:key:      U
:action:   elfeed-dashboard-update
:END:
** Search
:PROPERTIES:
:key:      s
:action:   elfeed
:END:
* Bookmarks
** Unread
:PROPERTIES:
:key:      u
:query:    "+unread"
:END:

** Emacs
:PROPERTIES:
:key:      e
:query:    "+unread +emacs"
:END:

etc.

You can see how this would enable you to come up with a shorthand for queries and other types of property keywords. You could also compute the leading shortcut indicator (e.g. "[U]") and display it with an overlay.

manojm321 commented 3 years ago

That's an interesting idea, keeping config and bookmarks/basics sections is error prone in current flow. My only suggestion would be use text-properties instead of overlays for efficiency.

manojm321 commented 3 years ago

One problem I see with this approach is, collapsing a headline will show 3 dots "...". Assuming all the heading will be collapsed in elfeed-dashboard-mode

* Basics
** [U] Unread ...
** [s] Search ...

Also, from quick googling hiding property drawers doesn't seem to be straightforward.