From 71ebf428d2073b03c63dbed8397f61e84287a76a Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 17 Jan 2024 04:34:37 +0200 Subject: gnosis-edit-note-contents: Insert note id as read-only - Make sure note id value will not be changed Change suggested by Nicholas Vollmer --- gnosis.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnosis.el b/gnosis.el index 0e1f9a1..3862d80 100644 --- a/gnosis.el +++ b/gnosis.el @@ -1119,7 +1119,9 @@ changes." (extra-notes ,extra-notes) (image ,image) (second-image ,second-image)) - do (cond ((numberp value) + do (cond ((equal field 'id) + (insert (format (concat ":%s " (propertize "%s" 'read-only t) "\n") field value))) + ((numberp value) (insert (format ":%s %s\n" field value))) ((and (listp value) (not (equal value nil))) -- cgit v1.2.3