An emacs module for doing fuzzy filtering of a list
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Macoy Madson fc268fc08a Replaced fuzzy algorithm, added cached list functionality 5 years ago
.clang-format Initial code commit. Results are poor and it is hard to install 5 years ago
.gitignore Initial commit 5 years ago
Jamfile Initial code commit. Results are poor and it is hard to install 5 years ago
Jamrules Replaced fuzzy algorithm, added cached list functionality 5 years ago
LICENSE Changed license, improved my fuzzy algorithm, improved results 5 years ago
README.org Replaced fuzzy algorithm, added cached list functionality 5 years ago
fuzzy.c Replaced fuzzy algorithm, added cached list functionality 5 years ago
fuzzy.h Replaced fuzzy algorithm, added cached list functionality 5 years ago
macoyFuzzy.c Replaced fuzzy algorithm, added cached list functionality 5 years ago
macoyFuzzy.el Replaced fuzzy algorithm, added cached list functionality 5 years ago
macoyFuzzyTests.el Replaced fuzzy algorithm, added cached list functionality 5 years ago
utils.c Fixed sort and added potentially better matching 5 years ago
utils.h Fixed sort and added potentially better matching 5 years ago

README.org

emacs-fuzzy-module

An emacs module for doing fuzzy filtering of a list.

I created this because I was encountering performance problems with ELisp-based solutions like flx-ido. I figure native module performance should be much better.

Installation

  1. To build, make sure you have Jam installed:

sudo apt install jam
  1. Open Jamrules and add the path to your emacs/src to the HDRS variable. Ensure there is a space between the ; and your path

You can also run jam -sEMACS_SRC_DIR=path/to/your/emacs/src instead (ignore step 3).

  1. Run jam in emacs-fuzzy-module directory

  2. Open macoyFuzzy.el and make the module-load path reference macoyFuzzy.so (wherever you built it)

  3. Evaluate macoyFuzzy.el

  4. Add the following to your .emacs:

(require 'macoy-fuzzy-ido)
(ido-mode 1)
(ido-everywhere 1)
(macoy-fuzzy-ido-mode 1)

Building on Windows

The easiest way to build is to use Linux and cross compile via mingw64. To do this, just set CROSS_COMPILE_WINDOWS when building to automatically use the mingw toolset: jam -sCROSS_COMPILE_WINDOWS=true

If you don't have jam, you can build things manually (this list may get out of sync):

  • gcc -c fuzzy.c -ggdb3 -Wall -fPIC -O0 -I. -I. -I../emacs/emacs/src

  • gcc -c utils.c -ggdb3 -Wall -fPIC -O0 -I. -I. -I../emacs/emacs/src

  • gcc -c macoyFuzzy.c -ggdb3 -Wall -fPIC -O0 -I. -I. -I../emacs/emacs/src

  • gcc -shared -o macoyFuzzy.dll fuzzy.o utils.o macoyFuzzy.o

If you do have Jam but it complains about the environment, set the environment first, e.g. this is what I did: env JAM_TOOLSET=MINGW ../../nonRepos/jam-2.6/jam.exe -j4 -q