branch: externals/denote
commit 33bc34ba5520601662c99e7ae72ca77be6db35a1
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Remove needless save-excursion added in commit be17fcb
Contributes to the fix for the problem reported by kilesduli in issue
354: <https://github.com/protesilaos/denote/issues/354>.
---
denote-org-extras.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/denote-org-extras.el b/denote-org-extras.el
index 23e94017be..6f256261af 100644
--- a/denote-org-extras.el
+++ b/denote-org-extras.el
@@ -72,10 +72,9 @@ the current file."
"Return heading text and CUSTOM_ID from the given LINE in FILE."
(with-current-buffer (find-file-noselect file)
(save-excursion
- (save-restriction
- (goto-char (point-min))
- (forward-line (1- line))
- (cons (denote-link-ol-get-heading) (denote-link-ol-get-id))))))
+ (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."