Closed Kungsgeten closed 4 years ago
Thank you for your further contribution! :-)
A few comments:
Please don't combine unrelated changes into a single PR. Thus, in this particular instance, i would prefer one PR for changing the defcustom, and a separate PR for the refactoring. This makes things easier for me to deal with (including simply merging changes that i don't feel require discussion).
Please ensure lines are less than 80 characters (or only slightly more than that).
Please be sure to rebase before submitting a PR, as i'm actively working on the code at the moment (as permitted by my other commitments). In particular, i made a commit yesterday which made pervasive changes, due to the 'Buku' project changing its name to 'buku'.
Since you're now making substantial contributions to the code, could you please add yourself to the 'Author' line?
Unfortunately, the refactoring part of the PR, which i agree with in principle, somewhat clashes with work i did yesterday, and finalised and committed today, to address #5. More specifically, your ebuku--bookmarks
function has a name very similar to my ebuku-bookmarks
variable for caching; and i'm also wondering whether your ebuku--bookmarks
function and my new ebuku-gather-bookmarks
function should somehow be combined into a single function, or whether instead they should simply be given better names to indicate their respective purposes. Thoughts?
You're welcome! I didn't see that you'd made changes until I submitted the PR. Unfortunately I only use git for pretty basic stuff (mostly personal projects). Thus I'm not aware of best practices, sorry. I understand though that separate PRs would be better.
My main intent with the PR was actually to provide better completion support, as the next step.
I'll have a look into your recent changes and will try to submit separate PRs :)
Mostly refactoring of ebuku--search-helper. It is now (hopefully) easier to grasp. The majority of its functionality has been broken down to these functions:
ebuku--bookmarks handles the calling of buku, and retrieves the results. It returns the result as a list of data. This coulud potentially be used by other packages, so perhaps the function should be called ebuku-bookmarks (since it isn't really a private function).
ebuku--insert-bookmark-string handles the formatting and insertion of a bookmark into a buffer. ebuku--search-helper calls it when inserting all of the results into the EBuku buffer.
ebuku--get-bookmark-count has been removed, since it was no longer used. It might be the case however that I misunderstand how the original "count" local variable was used in ebuku--search-helper.