consult-dir
consult-dir copied to clipboard
Handle dired bookmarks from Bookmarks+
Hi! Fantastic package -- what do you think about adding support for bmkp's dired directories? They have a non-nil handler.
@karthink Wondering if you’ve had time to take a look? Thanks!
Sorry for the delay. Integrating bmkp bookmarks is a good idea. But there are two alternatives I'd like to think about:
- Make a separate bmkp source. This is the intended way to customize consult-dir to your needs. This is straightforward to do, there's an example in the README.
- Make a defcustom
consult-dir-bookmark-handlers
for bookmark handlers to consider (beside the nil value). Then you can addbmkp-dired-jump
to that list.
I would prefer not to hardcode tests for features provided by libraries not included in Emacs. (I know that I made an exception for Projectile but I'm rethinking that too.)
What do you think of options 1 and 2?
Not a problem at all, @karthink, and thanks for your thoughts. Here are my opinions regarding your two points:
-
I would prefer not to make bmkp a separate source. The reason is that someone (like me :-)) who is using bmkp is unlikely to be using the vanilla bookmarks, and vice-versa. Moreover, in so far as consult-dir is concerned, there is not much semantic difference about whether a dired bookmark came from vanilla bookmarks or bmkp.
-
I think this is a great idea, I guess it will suffice for
consult-dir-bookmark-handlers
to be a list of symbols for which to filter against (byeq
, say).
If you are happy with going with option 2, I'll take a stab at implementing it this weekend. What do you think?
Cheers
Option 2 sounds good. Please continue at your convenience.
Incidentally, some bookmark types that have filename entries in their bookmark-record alist (besides bookmark plus dired entries) include eshell and vc-dir bookmarks. Do you know of any others?
That's a good point! I'm not aware of others at the moment (and TIL that vc-dir could be used as a bookmark!).
Hi @karthink, I made a small patch regarding consult-dir-bookmark-handlers
above. Would you like to give it a try?
I also added a fbound
, since I noticed that project--read-project-list
is not defined in OOTB Emacs 27.2 (need to update package.el
, which requires an Internet connection).
@karthink bump on this to see if you've had any time to look at it.
Appreciate that pre-Thankgiving November is the busiest part of the year :-) Cheers
Looks good! Thank you for the effort. I added a couple of comments.
Thanks @karthink! Looking forward to the addition, if there are no fixes requested (I couldn’t see your comments, so I guess they are in a local/offline branch.) cheers
Looks good! Thank you for the effort. I added a couple of comments.
@legendre6891 The comments are part of a review, it should be visible directly above this comment.
Sorry @karthink, I could not see any comments? This is what I see on my screen -- not very familiar with Github, unfortunately
not very familiar with Github, unfortunately
Neither am I! Here's what I see: