summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-01-17 04:34:37 +0200
committerThanos Apollo <[email protected]>2024-01-18 03:47:48 +0200
commit71ebf428d2073b03c63dbed8397f61e84287a76a (patch)
tree4aed9ff2766b34167219cbd4542c8e9e9a41b754
parent99b849d8d87725050f8dbe7aa8770a513715d6a3 (diff)
gnosis-edit-note-contents: Insert note id as read-only
- Make sure note id value will not be changed Change suggested by Nicholas Vollmer
-rw-r--r--gnosis.el4
1 files changed, 3 insertions, 1 deletions
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)))