From e7939e42665b437deb81cba74821ee164c6e0a46 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Tue, 1 Feb 2022 16:43:06 +0300 Subject: [PATCH] fix: insert new tag --- org-journal-tags.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/org-journal-tags.el b/org-journal-tags.el index 6a1211e..3c7a52c 100644 --- a/org-journal-tags.el +++ b/org-journal-tags.el @@ -630,8 +630,13 @@ list of tags to remove." "Insert org-journal tag at point." (interactive) (insert - (org-journal-tags--complete))) - + (let ((name (completing-read + "Tag: " + (org-journal-tags--list-tags)))) + (unless (org-journal-tags--valid-tag-p name) + (user-error "Invalid tag name: %s" name)) + (funcall org-journal-tags-format-new-tag-function + name)))) ;; Global setup (defun org-journal-tags--setup-buffer ()