2023-11-03 20:26:12 +01:00
|
|
|
:PROPERTIES:
|
|
|
|
:header-args:emacs-lisp: :comments link :results none
|
|
|
|
:ID: e0db184f-a0a6-483f-bfea-6b98209491f9
|
|
|
|
:END:
|
|
|
|
#+title: Nov.el
|
|
|
|
#+filetags: emacs-load
|
|
|
|
Load ~nov.el~ and it's undeclared dependency ~esxml~.
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp :noweb yes
|
|
|
|
(use-package esxml
|
|
|
|
:straight t
|
|
|
|
:after visual-fill-column
|
|
|
|
:init
|
|
|
|
<<define-center-hook>>
|
|
|
|
<<hook-epub>>
|
|
|
|
:hook
|
|
|
|
<<hook-visual-fill-column>>
|
|
|
|
<<hook-nov-mode-center>>
|
|
|
|
:config
|
|
|
|
<<disable-text-filling>>)
|
|
|
|
|
|
|
|
(use-package nov
|
|
|
|
:straight t)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+name: hook-epub
|
|
|
|
#+begin_src emacs-lisp :tangle no
|
2024-02-09 12:44:25 +01:00
|
|
|
:mode ("\\.epub\\'" . nov-mode)
|
2023-11-03 20:26:12 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+name: hook-visual-fill-column
|
|
|
|
#+begin_src emacs-lisp :tangle no
|
|
|
|
(nov-mode . visual-fill-column-mode)
|
|
|
|
(nov-mode . visual-line-mode)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+name: disable-text-filling
|
|
|
|
#+begin_src emacs-lisp :tangle no
|
|
|
|
(setq nov-text-width t)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+name: hook-nov-mode-center
|
|
|
|
#+begin_src emacs-lisp :tangle no
|
|
|
|
(nov-mode . nov-mode-center)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+name: define-center-hook
|
|
|
|
#+begin_src emacs-lisp :tangle no
|
|
|
|
(defun nov-mode-center ()
|
|
|
|
(setq visual-fill-column-center-text t))
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
|