flexibeast / ebuku

Emacs interface to the buku Web bookmark manager.
92 stars 7 forks source link

Gather bookmarks #13

Closed Kungsgeten closed 4 years ago

Kungsgeten commented 4 years ago

ebuku-gather-bookmarks is now a function (non-interactive). Its purpose is to search buku and return Emacs suitable data from it. This data could later be used/added in other functions/commands (like ebuku--search-helper). It is not a "private" function since its pretty modular and could be used in other packages.

ebuku-bookmarks is now updated by the ebuku-update-cache command instead. This command takes the same arguments as ebuku-gather-bookmarks, but by default will take its arguments from ebuku-cache-default-args. The default is to get data from all buku bookmarks.

Unfortunately the README and top of file comments haven't been updated.

Kungsgeten commented 4 years ago

This is similar to #11 but I haven't changed ebuku--search-helper yet. I think that's more suitable as a separate PR, if this is accepted. This version of ebuku-gather-bookmarks is probably slower, but more powerful. It can also be used when refactoring ebuku--search-helper.

I haven't added myself as an author, but maybe it can be mentioned in the README. I have a plan to add the following:

  1. Refactor ebuku--search-helper, since its pretty big at the moment.
  2. Add something like an ebuku-complete-open command which uses completing-read to choose a bookmark and open it.
  3. As an extension provide counsel-buku and maybe helm-buku to provide more features.
flexibeast commented 4 years ago

Thanks! Now merged, with a few small changes:

Thanks again!