Merge pull request #637 from dizzyyogi/gh_issue_636_dizzyyogi

Check in denote--file-has-backlinks-p whether link matches file id
This commit is contained in:
Protesilaos Stavrou 2025-10-06 18:34:39 +03:00 committed by GitHub
commit d509565e6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6050,8 +6050,12 @@ Also see `denote-get-links'."
(with-temp-buffer
(insert-file-contents file)
(goto-char (point-min))
(when (re-search-forward link-regexp nil t)
(throw 'has-backlinks t))))))))
(while (re-search-forward link-regexp nil t)
(when
(string-equal
(caar (denote--inside-link-regexp-p link-regexp (point)))
id)
(throw 'has-backlinks t)))))))))
;;;###autoload
(defun denote-find-backlink ()