branch: externals/calibre
commit 84d8a2dc8d1351a8ecfe43d7197cc78b1a8b9cd9
Author: Kjartan Oli Agustsson <[email protected]>
Commit: Kjartan Oli Agustsson <[email protected]>

    Ignore case when sorting by title
    
    * calibre-core.el (calibre-library--header-format): Set the title
      column's sort function to case insensitive string comparison.
---
 calibre-core.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/calibre-core.el b/calibre-core.el
index bc8721b112..b9b7cb8518 100644
--- a/calibre-core.el
+++ b/calibre-core.el
@@ -158,7 +158,10 @@ with values determined by `calibre-library-columns'."
                                      (< (calibre-book-id (car a))
                                         (calibre-book-id (car b))))
                        :right-align t))
-                 (title `("Title" ,width t))
+                 (title `("Title" ,width
+                          (lambda (a b)
+                            (string< (downcase (calibre-book-title (car a)))
+                                     (downcase (calibre-book-title (car 
b)))))))
                  (authors `("Author(s)" ,width t))
                  (publisher `("Publisher" ,width t))
                  (series `("Series" ,width (lambda (a b)

Reply via email to