mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(fix): fix sort by mtime in completions (#1087)
This commit is contained in:
16
org-roam.el
16
org-roam.el
@ -859,10 +859,10 @@ to the file."
|
||||
:left :join files
|
||||
:on (= titles:file files:file)]))
|
||||
completions)
|
||||
(seq-sort-by (lambda (x)
|
||||
(plist-get (nth 3 x) :mtime))
|
||||
#'time-less-p
|
||||
rows)
|
||||
(setq rows (seq-sort-by (lambda (x)
|
||||
(plist-get (nth 3 x) :mtime))
|
||||
#'time-less-p
|
||||
rows))
|
||||
(dolist (row rows completions)
|
||||
(pcase-let ((`(,file-path ,title ,tags) row))
|
||||
(let ((k (org-roam--prepend-tag-string title tags))
|
||||
@ -915,10 +915,10 @@ FILTER can either be a string or a function:
|
||||
:left :join refs :on (= titles:file refs:file)
|
||||
:where refs:file :is :not :null]))
|
||||
completions)
|
||||
(seq-sort-by (lambda (x)
|
||||
(plist-get (nth 3 x) :mtime))
|
||||
#'time-less-p
|
||||
rows)
|
||||
(setq rows (seq-sort-by (lambda (x)
|
||||
(plist-get (nth 3 x) :mtime))
|
||||
#'time-less-p
|
||||
rows))
|
||||
(dolist (row rows completions)
|
||||
(pcase-let ((`(,type ,ref ,file-path ,title ,tags) row))
|
||||
(when (pcase filter
|
||||
|
Reference in New Issue
Block a user