[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 9b6cf70026 6/9: Add wrapper motions for backlink
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 9b6cf70026 6/9: Add wrapper motions for backlinks' buffer |
Date: |
Wed, 26 Oct 2022 23:57:37 -0400 (EDT) |
branch: externals/denote
commit 9b6cf70026d9f8ed464a1503513b6c58b21971fc
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add wrapper motions for backlinks' buffer
With the denote-backlinks-show-context, we now have two types of
backlinks' buffer: (1) a generic one that uses buttons that we create
and (2) the familiar Xref buffer. These commands are meant to
accommodate both types.
Read the discussion on the mailing list about the refactoring of the
backlinks' buffer, with the participation of Noboru Ota:
<https://lists.sr.ht/~protesilaos/denote/%3C86r0yvzm12.fsf%40nobiot.com%3E>.
Also check the recent commit log for the relevant changes, including
patches from Noboru.
---
denote.el | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/denote.el b/denote.el
index 0633eda074..978ce9ee7b 100644
--- a/denote.el
+++ b/denote.el
@@ -2599,8 +2599,30 @@ Expand `denote-link-backlinks-display-buffer-action'."
buf
`(,@denote-link-backlinks-display-buffer-action)))
+(defun denote-backlinks-next (&optional n)
+ "Use appropriate command for forward motion in backlinks buffer.
+With optional N as a numeric argument, move to the Nth button
+from point (relevant when `denote-backlinks-show-context' is
+nil)."
+ (interactive "p" denote-backlinks-mode)
+ (if denote-backlinks-show-context
+ (funcall #'xref-next-line)
+ (funcall #'forward-button n)))
+
+(defun denote-backlinks-prev (&optional n)
+ "Use appropriate command for backward motion in backlinks buffer.
+With optional N as a numeric argument, move to the Nth button
+from point (relevant when `denote-backlinks-show-context' is
+nil)."
+ (interactive "p" denote-backlinks-mode)
+ (if denote-backlinks-show-context
+ (funcall #'xref-prev-line)
+ (funcall #'backward-button n)))
+
(defvar denote-backlinks-mode-map
(let ((m (make-sparse-keymap)))
+ (define-key m "n" #'denote-backlinks-next)
+ (define-key m "p" #'denote-backlinks-prev)
(define-key m "g" #'revert-buffer)
m)
"Keymap for `denote-backlinks-mode'.")
- [elpa] externals/denote updated (3b9bc00659 -> ee69daee74), ELPA Syncer, 2022/10/26
- [elpa] externals/denote bdc94d3369 2/9: Add user option to use original backlinks buffer or with context, ELPA Syncer, 2022/10/26
- [elpa] externals/denote bbdcc498a2 1/9: Fix 'denote-link-find-backlink', ELPA Syncer, 2022/10/26
- [elpa] externals/denote 7c22231457 8/9: Update minimum required Emacs version to 28.1, ELPA Syncer, 2022/10/26
- [elpa] externals/denote d304d79593 3/9: Reword denote--retrieve-files-in-xrefs doc string, ELPA Syncer, 2022/10/26
- [elpa] externals/denote 9b6cf70026 6/9: Add wrapper motions for backlinks' buffer,
ELPA Syncer <=
- [elpa] externals/denote b313dfccaa 7/9: Update backlinks' buffer documentation in the manual, ELPA Syncer, 2022/10/26
- [elpa] externals/denote 3da08eac52 4/9: Reword denote-backlilnks-show-context docstring, ELPA Syncer, 2022/10/26
- [elpa] externals/denote f90f79f788 5/9: Make denote-link-fontify-backlinks obsolete, ELPA Syncer, 2022/10/26
- [elpa] externals/denote ee69daee74 9/9: Update sample configuration, per b313dfc, ELPA Syncer, 2022/10/26