[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote be17fcb027 5/6: Fix off-by-one jump to Org headi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote be17fcb027 5/6: Fix off-by-one jump to Org heading line |
Date: |
Sat, 18 May 2024 03:57:44 -0400 (EDT) |
branch: externals/denote
commit be17fcb027eb685fd32d052157c094af2a8da1cc
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Fix off-by-one jump to Org heading line
This wouid match the wrong heading if there were no spaces between the
headings. Thanks to kilesduli for bringing this matter to my attention
in issue 354: <https://github.com/protesilaos/denote/issues/354>.
---
denote-org-extras.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/denote-org-extras.el b/denote-org-extras.el
index 3205d7426b..23e94017be 100644
--- a/denote-org-extras.el
+++ b/denote-org-extras.el
@@ -72,9 +72,10 @@ the current file."
"Return heading text and CUSTOM_ID from the given LINE in FILE."
(with-current-buffer (find-file-noselect file)
(save-excursion
- (goto-char (point-min))
- (forward-line line)
- (cons (denote-link-ol-get-heading) (denote-link-ol-get-id)))))
+ (save-restriction
+ (goto-char (point-min))
+ (forward-line (1- line))
+ (cons (denote-link-ol-get-heading) (denote-link-ol-get-id))))))
(defun denote-org-extras-format-link-with-heading (file heading-id description)
"Prepare link to FILE with HEADING-ID using DESCRIPTION."
- [elpa] externals/denote updated (23d268a156 -> 33bc34ba55), ELPA Syncer, 2024/05/18
- [elpa] externals/denote 4157cac287 3/6: Merge pull request #358 from jeanphilippegg/fix-denote-command, ELPA Syncer, 2024/05/18
- [elpa] externals/denote 7fe739fed0 4/6: Merge pull request #356 from brabalan/patch-1, ELPA Syncer, 2024/05/18
- [elpa] externals/denote 60c574edf8 1/6: Typo in denote.el, ELPA Syncer, 2024/05/18
- [elpa] externals/denote be17fcb027 5/6: Fix off-by-one jump to Org heading line,
ELPA Syncer <=
- [elpa] externals/denote 33bc34ba55 6/6: Remove needless save-excursion added in commit be17fcb, ELPA Syncer, 2024/05/18
- [elpa] externals/denote adf4e9f7d1 2/6: Fix issue on note creation caused by commit bce7778, ELPA Syncer, 2024/05/18