emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote 491f81b68b 2/3: Add reverse option to dblock den


From: ELPA Syncer
Subject: [elpa] externals/denote 491f81b68b 2/3: Add reverse option to dblock denote-baclinks
Date: Sun, 22 Jan 2023 23:57:34 -0500 (EST)

branch: externals/denote
commit 491f81b68b189db2f8f0711c4ee0e390a6066ee5
Author: Elias Storms <elias.storms@gmail.com>
Commit: Elias Storms <elias.storms@gmail.com>

    Add reverse option to dblock denote-baclinks
---
 denote-org-dblock.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/denote-org-dblock.el b/denote-org-dblock.el
index 22ec86b11a..c8f595e05e 100644
--- a/denote-org-dblock.el
+++ b/denote-org-dblock.el
@@ -127,8 +127,8 @@ Used by `org-dblock-update' with PARAMS provided by the 
dynamic block."
 ;; Similarly, we can create a 'denote-backlinks' block that inserts
 ;; links to notes that link to the current note.
 
-;; Note that this block type doesn't take any additional parameters
-;; (such as ':missing-only').
+;; This block type takes the following parameters:
+;;  1. :reverse t       -- reverse sort order (or don't, when nil)
 
 ;;;###autoload
 (defun denote-org-dblock-insert-backlinks ()
@@ -139,11 +139,12 @@ Used by `org-dblock-update' with PARAMS provided by the 
dynamic block."
 
 (org-dynamic-block-define "denote-backlinks" 
'denote-org-dblock-insert-backlinks)
 
-(defun org-dblock-write:denote-backlinks (_params)
+(defun org-dblock-write:denote-backlinks (params)
   "Function to update `denote-backlinks' Org Dynamic blocks.
 Used by `org-dblock-update' with PARAMS provided by the dynamic block."
   (when-let* ((file (buffer-file-name))
               (id (denote-retrieve-filename-identifier file))
+              (denote-link-add-links-sort (plist-get params :reverse))
               (files (delete file (denote--retrieve-files-in-xrefs id))))
     (insert (denote-link--prepare-links files file nil))
     (join-line))) ;; remove trailing empty line



reply via email to

[Prev in Thread] Current Thread [Next in Thread]