Add nov.el

Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
magic_rb 2023-11-03 20:26:12 +01:00
parent 45511fabf2
commit e7f90c4a87
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E

54
emacs-lisp/nov_el.org Normal file
View file

@ -0,0 +1,54 @@
: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
:mode ("\\.py\\'" . nov-mode)
#+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