diff options
author | Thanos Apollo <[email protected]> | 2024-08-03 18:53:45 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-08-03 18:53:45 +0300 |
commit | 14c5059d751a9ba5e39064dcd71f4172431c98ca (patch) | |
tree | e30b6fbbed653001142fdaab55cac1c1cfd25c4c | |
parent | 56640df45c10dd285bbcafd1c7331c44c434df12 (diff) |
New function: dashboard-sort-total-notes.
* Function to be used to sort tag dashboard for total notes.
-rw-r--r-- | gnosis-dashboard.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gnosis-dashboard.el b/gnosis-dashboard.el index 6f4a7ca..f70142d 100644 --- a/gnosis-dashboard.el +++ b/gnosis-dashboard.el @@ -271,6 +271,12 @@ Optionally, use when using multiple months." (let ((notes (gnosis-get-tag-notes tag))) `(,tag ,(number-to-string (length notes))))) +(defun gnosis-dashboard-sort-total-notes (entry1 entry2) + "Sort function for the total notes column, for ENTRY1 and ENTRY2." + (let ((total1 (string-to-number (elt (cadr entry1) 1))) + (total2 (string-to-number (elt (cadr entry2) 1)))) + (< total1 total2))) + (defun gnosis-dashboard-output-deck (id) "Output contents from deck with ID, formatted for gnosis dashboard." (cl-loop for item in (append (gnosis-select |