branch: externals/denote commit 2b1210c527b2a4d05408232507f0dc71c133d6ca Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Reinstate denote-link-markdown-follow I had removed it in commit ca79f35, but we seem to still need it for Markdown's C-c C-o to do the right thing over a 'denote:' link. This builds on top of the new fontification feature provided by Abdul-Lateef Haji-Ali in pull request 344 (commit 4d12452): <https://github.com/protesilaos/denote/pull/344>. --- denote.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/denote.el b/denote.el index 129f651457..73d1df7e81 100644 --- a/denote.el +++ b/denote.el @@ -4207,10 +4207,15 @@ file's title. This has the same meaning as in `denote-link'." 'denote-fontify-links-mode "Use the `denote-fontify-links-mode', as it works better than buttonization. Since 3.0.0") -(make-obsolete - 'denote-link-markdown-follow - 'denote-fontify-links-mode - "Use the `denote-fontify-links-mode', as it works better than buttonization. Since 3.0.0") +(defun denote-link-markdown-follow (link) + "Function to open Denote file present in LINK. +To be assigned to `markdown-follow-link-functions'." + (when (ignore-errors (string-match denote-id-regexp link)) + (funcall denote-link-button-action + (denote-get-path-by-id (match-string 0 link))))) + +(eval-after-load 'markdown-mode + '(add-hook 'markdown-follow-link-functions #'denote-link-markdown-follow)) ;;;;; Link fontification (defvar denote-link-mouse-map