mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-28 19:16:14 +01:00
55 lines
1.1 KiB
Org Mode
55 lines
1.1 KiB
Org Mode
|
: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
|
||
|
|
||
|
|
||
|
|