[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 75cf3d31d0 288/355: Accept optional BEG and END
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 75cf3d31d0 288/355: Accept optional BEG and END for buttonization |
Date: |
Sun, 26 Jun 2022 23:58:33 -0400 (EDT) |
branch: externals/denote
commit 75cf3d31d049b4aa0c7b22e0297d4567a52b1512
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Accept optional BEG and END for buttonization
---
denote-link.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/denote-link.el b/denote-link.el
index e42dfb6bab..a2cacfe29f 100644
--- a/denote-link.el
+++ b/denote-link.el
@@ -246,18 +246,21 @@ format is always [[denote:IDENTIFIER]]."
(button-end button)))))
(funcall denote-link-buton-action (file-name-completion id
(denote-directory)))))
-(defun denote-link-buttonize-buffer ()
+(defun denote-link-buttonize-buffer (&optional beg end)
"Make denote: links actionable buttons in the current buffer.
Add this to `find-file-hook' (it will not do anything in
`org-mode' buffers, as buttons already work there).
+With optional BEG and END as buffer positions, limit the process
+to the region in-between.
+
DEVELOPMENT NOTE: This is experimental and subject to review
before the release of version 0.1.0. Please test it and/or share
your thoughts about it."
(when (and (not (derived-mode-p 'org-mode)) (denote--current-file-is-note-p))
(save-excursion
- (goto-char (point-min))
- (while (re-search-forward denote--id-regexp nil t)
+ (goto-char (or beg (point-min)))
+ (while (re-search-forward denote--id-regexp end t)
(when-let ((string (denote-link--link-at-point-string))
(beg (match-beginning 0))
(end (match-end 0)))
- [elpa] externals/denote a7a0bf0255 207/355: Tweak doc string, (continued)
- [elpa] externals/denote a7a0bf0255 207/355: Tweak doc string, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 2338ee4698 181/355: Refine how identifier is retrieved from file names, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 1a124c2be6 204/355: Make 'denote:' link follow links like 'file:', ELPA Syncer, 2022/06/26
- [elpa] externals/denote a76b7fb0b8 193/355: Make plain text links the same as Org's, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 683180bcfc 206/355: Remove superfluous function and var, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 2e56f06381 201/355: Install aliases for certain commands, ELPA Syncer, 2022/06/26
- [elpa] externals/denote f8b2d44508 203/355: Depend on Emacs 27.2, not 27.1, ELPA Syncer, 2022/06/26
- [elpa] externals/denote a0525a0154 216/355: Do not try front matter rewrite on non-notes, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 74962d17f2 217/355: Improve denote-retrieve error handling, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 5228b1bb17 231/355: Sort 'denote-link-add-links' contents, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 75cf3d31d0 288/355: Accept optional BEG and END for buttonization,
ELPA Syncer <=
- [elpa] externals/denote b651200fdf 236/355: Include "hackability" in the manual's overview, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 55140b83f4 275/355: Clarify point about org-roam database, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 6a254238f9 296/355: Mark buttonization task as done, ELPA Syncer, 2022/06/26
- [elpa] externals/denote aab484d617 258/355: Sort grep output with string-lessp, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 5be48c4186 286/355: Expand the FAQ section, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 1b9a6a12a0 290/355: Add autoload cookie for buttonization function, ELPA Syncer, 2022/06/26
- [elpa] externals/denote bb296d35a1 254/355: Tweak some statements in the manual, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 85b5290e8b 229/355: Fix bug where Unicode chars are not encoded, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 1f87a456c5 353/355: denote--punctuation-regexp: Forbid usage of slash in filenames, ELPA Syncer, 2022/06/26
- [elpa] externals/denote fe8042e302 337/355: Account for target file when formatting link, ELPA Syncer, 2022/06/26