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

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

[elpa] externals/denote 429763c246 257/355: Fix broken buttons in backli


From: ELPA Syncer
Subject: [elpa] externals/denote 429763c246 257/355: Fix broken buttons in backlinks' buffer
Date: Sun, 26 Jun 2022 23:58:30 -0400 (EDT)

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

    Fix broken buttons in backlinks' buffer
    
    Sorting them after they are inserted breaks them.  Thanks to Sven
    Seebeck for reporting the regression in issue 16 over at the GitHub
    mirror: <https://github.com/protesilaos/denote/issues/16>.
---
 denote-link.el | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/denote-link.el b/denote-link.el
index 8176ebd5a6..bdb4263d92 100644
--- a/denote-link.el
+++ b/denote-link.el
@@ -215,17 +215,11 @@ format is always [[denote:IDENTIFIER]]."
    buf
    `(,@denote-link-backlinks-display-buffer-action)))
 
-;; NOTE 2022-06-17: This is a `defvar' on purpose, like
-;; `denote-link-add-links'.  Read its comment.
-(defvar denote-link-backlinks-sort nil
-  "Add REVERSE to `sort-lines' of `denote-link-backlinks' when t.")
-
 (defun denote-link--prepare-backlinks (id files &optional title)
   "Create backlinks' buffer for ID including FILES.
 Use optional TITLE for a prettier heading."
   (let ((inhibit-read-only t)
-        (buf (format "*denote-backlinks to %s*" id))
-        start)
+        (buf (format "*denote-backlinks to %s*" id)))
     (with-current-buffer (get-buffer-create buf)
       (erase-buffer)
       (special-mode)
@@ -234,13 +228,11 @@ Use optional TITLE for a prettier heading."
                   (heading (format "Backlinks to %S (%s)" title id))
                   (l (length heading)))
         (insert (format "%s\n%s\n\n" heading (make-string l ?-))))
-      (setq start (point))
       (mapc (lambda (f)
               (insert (file-name-nondirectory f))
               (make-button (point-at-bol) (point-at-eol) :type 
'denote-link-find-file)
               (newline))
             files)
-      (sort-lines denote-link-backlinks-sort start (point))
       (goto-char (point-min))
       ;; NOTE 2022-06-15: Technically this is not Dired.  Maybe we
       ;; should abstract the fontification into a general purpose



reply via email to

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