From 4ab738a03a2ba9baa412f1a32e87869a1695cda6 Mon Sep 17 00:00:00 2001 From: Michael Wolf Date: Sun, 24 Jul 2022 18:33:20 -0500 Subject: [PATCH] Implement zetteldeft-insert-link-md-style ref #135 --- zetteldeft.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/zetteldeft.org b/zetteldeft.org index 8233741..4454d63 100644 --- a/zetteldeft.org +++ b/zetteldeft.org @@ -815,6 +815,17 @@ When no title is provided, the link itself is used as a descriptor. (insert "[[zdlink:" id "]]"))) #+end_src +Finally, when using Markdown style links, =zetteldeft-insert-link-md-style= +can be used. It inserts a + +#+begin_src emacs-lisp +(defun zetteldeft-insert-link-md-style (id &optional title) + "Insert a Zetteldeft link in Markdown link format" + (if title + (insert (format "[%s](%s%s)" title zetteldeft-link-indicator id)) + (insert (format "[%s%s](%s%s)" zetteldeft-link-indicator id zetteldeft-link-indicator id)))) +#+end_src + *** Finding & linking files from minibuffer **** =zetteldeft-find-file= opens file from minibuffer