diff options
author | colin <colin@cicadas.surf> | 2023-08-08 07:13:10 -0700 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2023-08-08 07:13:10 -0700 |
commit | 932c51d48db1016244c877fdf0d460e241a805af (patch) | |
tree | b9c8ba426fe91b2f04c5a4bfc5fc56fcd5502f19 | |
parent | d0d7337a99762ff39be65b10041ee379ca7ffe9c (diff) |
make secrets readonly by default
-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 |