branch: externals/org-gnosis
commit 9bba6f859dc22a75062b83a28209529662cccc5d
Author: Thanos Apollo <[email protected]>
Commit: Thanos Apollo <[email protected]>

    [fix] format-template: Use string-replace.
    
    * format-spec can choke on other % characters in the template content.
---
 org-gnosis.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-gnosis.el b/org-gnosis.el
index bc854bc87cf..c6e18c3849e 100644
--- a/org-gnosis.el
+++ b/org-gnosis.el
@@ -735,7 +735,7 @@ If JOURNAL-P is non-nil, retrieve/create node as a journal 
entry."
   "Format TEMPLATE string, replacing %s with heading stars.
 Uses current heading level + 1, defaulting to level 1 if not at a heading."
   (let ((stars (make-string (1+ (or (org-current-level) 0)) ?*)))
-    (format-spec template `((?s . ,stars)))))
+    (string-replace "%s" stars template)))
 
 (defun org-gnosis--template-list ()
   "Return the template list appropriate for the current buffer."

Reply via email to