Hello,
I'm using BFindV2 by Lee Mac (
http://www.lee-mac.com/bfind.html) and came across a problem when source text cannot be found because it contained the word which have been already replaced. Easy solution for this can be just sorting all elements of list by lenght - longer element can not be included in shorter one.
I noticed that elements of the list are being sorted alphabetically. Was trying to get into code, but have never using LISP before.
Probably this method is doing the job:
(defun _SortByFirst ( lst )
(vl-sort lst (function (lambda ( a b ) (< (car a) (car b)))))
)
I was trying this:
(vl-sort lst (function (lambda ( a b ) (< (length a) (length b)))))
...but It does not work. I probably misunderstand the code.
Please, can you guys help me?
best,
D