diff options
-rw-r--r-- | init-el.org | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/init-el.org b/init-el.org index dc99347..49604f9 100644 --- a/init-el.org +++ b/init-el.org @@ -207,7 +207,7 @@ New in emacs 28, native compilation can be enabled: (?d "[d]eft" toggle-deft) (?f "el[f]eed" elfeed) (?j "[j]ournal" toggle-journal) - (?s "[s]ecrets" toggle-secrets) + (?s "[s]ecrets" toggle-secrets-readonly) (?p "[p]omodoro" pomidor) (?w "[w]eb browser (eww)" eww) (?C "[C]RDT" my-crdt-commands))) @@ -1078,6 +1078,12 @@ stand up and move around. #+begin_src elisp :results none (load "~/notes/elisp/toggler.el") + +(defun toggle-secrets-readonly () + (interactive) + (toggle-secrets) + (when (equal (buffer-name) "secrets.org.cpt") + (read-only-mode))) #+end_src ** Deft |