helm-deft
helm-deft copied to clipboard
feature request: multiple extensions in helm-deft-extension
Let me start by saying that this extension is awesome. I've been using it evey day for the last 2 weeks and I wish I knew about it before. It is very fast and easy to configure.
When you have time, there is a small feature that could be interesting: allow to configure a list of extensions instead of just one (typically org, md, txt)
thanks again for sharing this tool
Hello @yherve. Glad that it is useful to you. I've not made this into a standard package, because I thought it has a number of flaws that would require some work. But I've been actually using it as my main tool to jump between my files for years, now. I'll have a look at your request. It should be quite easy to implement, but maybe one should also think about an easy way to switch from a default extension to other extensions, allowing a better way to narrow down.
Hi. Thanks for your answer. After posting the request, I realized that you can provide a custom filtering function. This is what I did and it solved my problem. I think you should advertise more your project (eg on reddit), because it is really helpful.
(defun my-helm-deft-fname-search-default ()
""
(cl-loop for dir in helm-deft-active-dir-list
do (assert (file-exists-p dir) nil
(format "Directory %s does not exist. Check helm-deft-dir-list" dir))
collect (f--files dir
(or
(equal (f-ext it) "org")
(equal (f-ext it) "md")) t)
into reslst
finally (return (apply #'append reslst)))
)