I customize load-path
for Ivy using a package suffix of -0.13.1:
(add-to-list 'load-path "~/.zeroemacs/elpa/ivy-0.13.1/")
However, when the ivy package upgraded to 0.14.1, I had to manually modify the load-path
to
(add-to-list 'load-path "~/.zeroemacs/elpa/ivy-0.14.1/")
Is it possible to replace it with something like ivy-*
which match any series numbers?
Version numbers come in many shapes and sizes. Rather than trying to deal with any and all version formats, the
latest-file-version
function below relies on comparing version strings accepted by theversion-to-list
function. The documentation forversion-to-list
includes this description of what it accepts:You can use the
latest-file-version
function in yourload-path
setting like this:The first argument is the directory to check, and the second argument is the prefix of the versioned filenames or directory names to check.
Tested with emacs 27.1.