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:
parent
429763c246
commit
aab484d617
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue