 (setq org-babel-python-command "python3")
 (setq org-babel-scheme-command "mit-scheme")
 
-;;; The Simple HTML Renderer (shr) is used by the Emacs Web Browser (EWW) and
-;;; nov.el to render HTML. I want it to act mostly like reader mode.
-
-(setq shr-use-colors nil)
-(setq shr-use-fonts nil)
-(setq shr-max-image-proportion 0.6)
-(setq shr-width 72)
-
-;;; nov.el for reading epubs
-
-(require 'visual-fill-column)
-(defun nov-mode-spacing ()
-  "Spacing for nov.el mode."
-  (progn
-    (setq line-spacing 0.3)
-    (setq nov-text-width 72)
-    (setq visual-fill-column-center-text t)
-    (visual-line-mode)
-    (visual-fill-column-mode)))
-(add-hook 'nov-mode-hook 'nov-mode-spacing)
-
-(defun my-nov-window-configuration-change-hook ()
-  (my-nov-post-html-render-hook)
-  (remove-hook 'window-configuration-change-hook
-	       'my-nov-window-configuration-change-hook
-	       t))
-
-(defun my-nov-post-html-render-hook ()
-  (if (get-buffer-window)
-      (with-current-buffer (current-buffer)
-	(goto-char (point-min))
-	(while (not (eobp))
-	  (when (looking-at "^[[:space:]]*$")
-	    (kill-line)
-	    (insert "    "))
-	  (forward-line 1)))
-    (add-hook 'window-configuration-change-hook
-	      'my-nov-window-configuration-change-hook
-	      nil t)))
-
-;; (add-hook 'nov-post-html-render-hook 'my-nov-post-html-render-hook)
-
-;; (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
+;; denote
+
+(require 'denote)
+
+(setq denote-directory (expand-file-name "~/memex"))
+
+(define-key global-map (kbd "C-c n r") #'denote-dired-rename-file)
 
 ;;; init.el ends here


(setq org-refile-targets '(("~/memex/plan.org" :maxlevel . 3)
			   ("~/memex/someday.org" :level . 1)
			   ("~/memex/tickker.org" :maxlevel . 2)))

(setq org-todo-keywords
      '((sequence "TODO(t)" "WAITING(w)" "|" "DONE(d)" "CANCELLED(c)")))

;; ---------- Org-roam ----------

(use-package org-roam
  :init
  (setq org-roam-v2-ack t)
  :custom
  (org-roam-directory "~/memex/roam")
  :bind
  (("C-c n l" . org-roam-buffer-toggle)
   ("C-c n f" . org-roam-node-find)
   ("C-c n i" . org-roam-node-insert))
  :config
  (org-roam-setup))

;;; Emacs server

(server-start)
(require 'org-protocol)

;; (use-package rg
;;  :config
;;  (rg-enable-default-bindings))

(setq org-enforce-todo-dependencies t)

(setq-default indent-tabs-node nil)



;;; ---------- Completion ----------

;; (icomplete-mode)

(require 'vertico)
(vertico-mode)

;;; ---------- Modus theme ----------

(load-theme 'modus-operandi)
(define-key global-map (kbd "<f5>") #'modus-themes-toggle)

