Closed flexibeast closed 4 years ago
Fwiw, here's a really basic/dumb implementation I've been using for ivy:
(defun counsel-buku-action (cand)
"Run \"buku --open\" on CAND."
(let ((db-index (car (split-string cand "\t"))))
(counsel--run "buku" "--open" db-index)))
(defun counsel-buku ()
"Open a buku bookmark."
(interactive)
(counsel-require-program "buku")
(let ((cands
(split-string
(shell-command-to-string "buku --print --format 5")
"\n" t)))
(ivy-read "open bookmark: " cands
:action #'counsel-buku-action
:caller 'counsel-buku)))
Addressed in https://github.com/flexibeast/ebuku/commit/3847cf6944184efb77130807b32b6c9077503476; closing.
Suggested by /u/ftrx on /r/emacs.