-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How to integrate dogears.el as a consult-buffer source? #430
Comments
I am not yet using Dogears myself, but I have considered doing so. Of
course it should be possible to configure Dogears as a Consult buffer
source. Dogears itself provides a Helm source and we can implement a
Consult equivalent. If you look at the Helm source, the *variable*
dogears-list is used to produce the list of candidates (Not the
*function* dogears-list which you used in your snippet). In order to
open the bookmark, you can use dogears-go as the Helm source does.
Additional to the builtin Consult buffer sources, there are many sources
documented in the Consult wiki, which you can use as reference.
|
See https://github.com/minad/consult/wiki#dogears for a basic dogears
source for Consult. Preview is not yet implemented, this needs a bit
more work.
|
Thank you for doing this! |
Thanks for the script. I notice that the candidates are sorted by some property (file name + line number I guess). There is any way to disable sorting? Thank you for building this amazing project again |
In case someone also has the question, simply do (consult--multi '(consult--source-dogears) :sort nil) |
My Elisp-fu is distinctly lacking and I'm not really sure how to go about this. In case you've never seen/used it, here https://github.com/alphapapa/dogears.el is Dogears. It seems to automatically create bookmark-like objects for recent places in files you've been visiting/editing. Based on this project's Readme, I attempted to configure a new source for
consult-buffer
with the following code inside consult's use-package:config block:This however simply breaks
consult-buffer
and showsdogears-list
instead, which is a buffer. It was at this point that I realized that while I might be on the track of why it isn't working as I expect (passing a buffer instead of a list), I don't understand Elisp or how these functions work internally well enough to fix it myself.Can this be done easily, or am I barking up the wrong tree?
The text was updated successfully, but these errors were encountered: