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

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

[elpa] externals/denote df75a7bf7e 19/20: Simplify the 'denote-backlinks


From: ELPA Syncer
Subject: [elpa] externals/denote df75a7bf7e 19/20: Simplify the 'denote-backlinks' Org dynamic block
Date: Sat, 25 Nov 2023 00:57:51 -0500 (EST)

branch: externals/denote
commit df75a7bf7ed40e5b449ad01c44897925736d4e54
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Simplify the 'denote-backlinks' Org dynamic block
---
 denote-org-dblock.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/denote-org-dblock.el b/denote-org-dblock.el
index 0c2e257e0a..9cf9b07976 100644
--- a/denote-org-dblock.el
+++ b/denote-org-dblock.el
@@ -80,10 +80,8 @@ Used by `org-dblock-update' with PARAMS provided by the 
dynamic block."
 (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))
-             (files (delete file (denote--retrieve-files-in-xrefs id))))
-    (insert (denote-link--prepare-links files file (plist-get params 
:id-only)))
+  (when-let ((files (denote-link-return-backlinks)))
+    (insert (denote-link--prepare-links files 'org (plist-get params 
:id-only)))
     (join-line))) ; remove trailing empty line
 
 ;;;; Dynamic block to insert entire file contents



reply via email to

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