make sure that i dont mess my precious files
parent
6cee0c7c07
commit
c11553663d
|
@ -1,6 +1,17 @@
|
||||||
;; -*- mode: emacs-lisp; buffer-read-only: t; -*-
|
;; -*- mode: emacs-lisp; buffer-read-only: t; -*-
|
||||||
|
|
||||||
|
|
||||||
|
;; be paranoid, only open org files in read-only mode.
|
||||||
|
;;
|
||||||
|
(defun myorg-open-read-only-mode ()
|
||||||
|
"Enable `read-only-mode' for Org mode files."
|
||||||
|
(when (and buffer-file-name
|
||||||
|
(string-match "\\.org\\'" buffer-file-name))
|
||||||
|
(read-only-mode 1)))
|
||||||
|
|
||||||
|
(add-hook 'org-mode-hook 'myorg-open-read-only-mode)
|
||||||
|
|
||||||
|
|
||||||
;;;; add inactive timestamp to every org-item
|
;;;; add inactive timestamp to every org-item
|
||||||
;; https://stackoverflow.com/a/52815573/5115219
|
;; https://stackoverflow.com/a/52815573/5115219
|
||||||
;; https://emacs.stackexchange.com/a/45369/29404
|
;; https://emacs.stackexchange.com/a/45369/29404
|
||||||
|
|
Loading…
Reference in New Issue