Sort grep output with string-lessp

This is a follow-up to commit 429763c.  Basically, we want the file
names to come in a predictable order, otherwise it can be hard to get a
sense of their time range.
This commit is contained in:
Protesilaos Stavrou 2022-06-18 07:17:48 +03:00
parent 429763c246
commit aab484d617
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -106,22 +106,24 @@ Optional GROUP is a regexp construct for
(let* ((default-directory (denote-directory))
(file (file-name-nondirectory (buffer-file-name))))
(denote-retrieve--files-in-output
(process-lines
"find"
default-directory
"-maxdepth" "1"
"-type" "f"
"!" "-name" file
"-exec"
grep-program
"--color=never"
"-m"
"1"
"-e"
identifier
"{}"
";"
"-print"))))
(sort
(process-lines
"find"
default-directory
"-maxdepth" "1"
"-type" "f"
"!" "-name" file
"-exec"
grep-program
"--color=never"
"-m"
"1"
"-e"
identifier
"{}"
";"
"-print")
#'string-lessp))))
(provide 'denote-retrieve)
;;; denote-retrieve.el ends here