walseb / ellocate Goto Github PK
View Code? Open in Web Editor NEWA more flexible locate implemented in Emacs Lisp
License: GNU General Public License v3.0
A more flexible locate implemented in Emacs Lisp
License: GNU General Public License v3.0
It would be useful if there was a command to search through all databases at the same time
Right now when searching a directory the whole path to each file is displayed. It should probably cut out the stuff containing the current directory, so that only the relative path remains. I've managed to do this but it's really slow because you can't modify the strings directly. You have to create a new list containing the modified strings which is really slow when you have a few hundreds of thousands of strings in a list
I am running vanilla Emacs (27.1), nothing fancy (no ivy, counsel, etc. (your package doesn't require them to work, does it?)), after installing ellocate with
(use-package ellocate)
configuring
(setq ellocate-scan-dirs '(("/home/" "~/.cache/ellocate-home-db")))
and finally running ellocate for the first time to scan
I type in a trivial search "ellocate-home-db" and it doesn't work (as I expected it to), instead ellocate creates an empty file "ellocate-home-db" in "/home/user/" (the folder from which ellocate was run).
Then I figured out that you are ought to hit Tab the first time so that ellocate autocompletes the "Find:" field with "/home/user/" and only then type the name of the file anywhere in the hierarchy below that path to search for.
I thought that your package was a full-fledged replacement for find-dired
or find-name-dired
(find-dired.el). Is it supposed to be only a "search as you type" thing? Are you familiar with fzf (fuzzy finder)? - It is much faster for that. With ellocate.el when I type in the search and hit TAB, the whole emacs session hangs (synchronous search??) for 4 or 5 seconds.
Now I have 3 questions.
Is there some additional configuration required to make this work?
Can you document ellocate.el better? - I and many other people would appreciate that.
Why aren't this package so popular (I found it by accident)? - The idea is superb though, hope I'd make this work with your help.
Right now this package only works with ivy. There are two reasons why. One is that completing read always sorts things which makes it really slow when scanning huge directories. There are ways to fix this but I haven't bothered yet. Another small problem is that using seq-filter
to filter out irrelevant entries (those who are above the current directory) instead of the :predicate
option in ivy is slightly slower (I remembered measuring a 0.1 ms difference on a pretty large folder). I would rather have better compatibility than the last point though but maybe it would be good to use the ivy method instead of completing read if ivy mode is on because of it
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.