From da5bf8d3fa0140ed2906d6cf80157cb6e17ed4ec Mon Sep 17 00:00:00 2001 From: Kevin Neaton Date: Thu, 13 Mar 2014 14:59:18 -0500 Subject: [PATCH] Sort files by namespace :) --- src/marginalia/core.clj | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/marginalia/core.clj b/src/marginalia/core.clj index 2f0a363..ca2485a 100644 --- a/src/marginalia/core.clj +++ b/src/marginalia/core.clj @@ -87,13 +87,14 @@ (-> file find-file-extension pred))) (defn find-processable-file-paths - "Returns a seq of processable file paths (strings) in alphabetical order." + "Returns a seq of processable file paths (strings) in alphabetical order by + namespace." [dir pred] (->> (io/file dir) (file-seq) (filter (partial processable-file? pred)) - (map #(.getCanonicalPath %)) - (sort))) + (sort-by #(->> % read-file-ns-decl second)) + (map #(.getCanonicalPath %)))) ;; ## Project Info Parsing ;; Marginalia will parse info out of your project.clj to display in