Update emacs.d/org-roam-templates/main.el

main
千住柱間 2024-02-03 04:14:07 +00:00
parent fb3f41322b
commit e88b540ca6
1 changed files with 7 additions and 9 deletions

View File

@ -1,19 +1,17 @@
;; -*- mode: emacs-lisp; buffer-read-only: t; -*- ;; -*- mode: emacs-lisp; buffer-read-only: t; -*-
(require 'org-roam)
(require 'org-roam) ;; bug fix, org-roam doesn't load properly, so we have to call it.
(setq org-roam-directory "/mnt/Data/Documents/org-files/org-roam") (setq org-roam-directory "/mnt/Data/Documents/org-files/org-roam")
;; be paranoid, only open org files in read-only mode. ;; be paranoid, only open org files in read-only mode.
;; ;;
(defun myorg-open-read-only-mode () ;;(defun myorg-open-read-only-mode ()
"Enable `read-only-mode' for Org mode files." ;; "Enable `read-only-mode' for Org mode files."
(when (and buffer-file-name ;; (when (and buffer-file-name
(string-match "\\.org\\'" buffer-file-name)) ;; (string-match "\\.org\\'" buffer-file-name))
(read-only-mode 1))) ;; (read-only-mode 1)))
(add-hook 'org-mode-hook 'myorg-open-read-only-mode)
;;(add-hook 'org-mode-hook 'myorg-open-read-only-mode)
;;;; add inactive timestamp to every org-item ;;;; add inactive timestamp to every org-item