From f238e3fe026bff06d0dbac484e09bcb5641c802a Mon Sep 17 00:00:00 2001 From: wannli <57009124+wannli@users.noreply.github.com> Date: Sun, 15 Mar 2020 03:26:24 -0400 Subject: [PATCH] (feat): order backlinks by filename (#300) Co-authored-by: Jethro Kuan --- org-roam.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/org-roam.el b/org-roam.el index 9d3ab8d..b7cdde6 100644 --- a/org-roam.el +++ b/org-roam.el @@ -1085,9 +1085,10 @@ If item at point is not Org-roam specific, default to Org behaviour." (defun org-roam--get-backlinks (file) "Return the backlinks for FILE." - (org-roam-sql [:select [file-from, file-to, properties] :from file-links - :where (= file-to $s1)] - file)) + (org-roam-sql [:select [file-from, file-to, properties] :from file-links + :where (= file-to $s1) + :order-by (asc file-from)] + file)) ;;;; Updating the org-roam buffer (defun org-roam-update (file-path)