reddit / emacs
A new epub reader in Emacs: nov-xwidget.el
DR_MING · 2022-06-01 12:11
`nov-xwidget` extends `nov.el` with the built-in xwidget webkit and render the epub html/xhtml
files with any customised CSS styles or JavaScript scripts.
[https://github.com/chenyanming/nov-xwidget](https://github.com/chenyanming/nov-xwidget)
Compile emacs with xwidget support and install nov before using this package.
Dark Mode:
https://preview.redd.it/0cg1qo6a30391.png?width=826&format=png&auto=webp&s=1de38cb380304fc09b88de7011771e5269098fc8
Light Mode:
​
https://preview.redd.it/aercmssd30391.png?width=838&format=png&auto=webp&s=9eb04c9d65ca9868760bfe815c77d1f418efa628
Happy reading\~
kkvi115 · 2022-06-01 12:19
Thanks for your contributions. I like read in Emacs. Gonna try your package.
pailanderCO · 2022-06-01 12:44
I had problems installing it using Straight.
DR_MING · 2022-06-01 12:46
oops, what errors?
DR_MING · 2022-06-01 12:48
Maybe you need to install nov first.
funk443 · 2022-06-01 12:58
Great work!
AlanYx · 2022-06-01 13:57
This looks fantastic, thank you.
AsterOps · 2022-06-01 15:06
Can you provide example of configration without `use-package`?
DR_MING · 2022-06-01 15:10
If no use-package, you need to use `(add-to-list 'load-path where-nov-xwidget-folder-is)`, then `(require 'nov-xwidget)`.
Open epub file in emacs, `M-x nov-xwidget-view`
AsterOps · 2022-06-01 15:23
Damn, I use `pgtk` and receive
```
Your Emacs was not compiled with xwidgets support
```
I'll try later :)
mwzx · 2022-06-01 16:29
Pardon my ignorance but is the map! (macro, I assume) from use-package declaration a new thing or you made it? It's very nice.
pailanderCO · 2022-06-01 16:47
Yes, and install it using the git repo.
ajgrf · 2022-06-01 17:06
It's a macro from Doom Emacs, and it is indeed quite nice.
harizvi · 2022-06-01 18:41
This looks very good, congrats. I've moved away to the calibre ebook viewer, to satisfy my need for simpler highlighting / commenting capabilities.
A somewhat relevant plug: for those not aware, calibredb (https://github.com/chenyanming/calibredb.el) from the same author is an excellent package if you use calibre for managing your books library.
--
copperbranch · 2022-06-01 20:11
This looks great, congrats!
Is it possible to link to specific parts of the ebook ?
That would come really handy for research.
mwzx · 2022-06-01 20:39
Thanks! I'll probably write my own and mimic it.
delm666 · 2022-06-02 02:54
So cool, thanks!
DR_MING · 2022-06-02 06:46
that is possible, use org link. Will check later.
a-c-d-w · 2022-06-02 15:02
If your package requires nov, have you included `Package-Requires: ((nov "<version>"))` in your package file?
gravygrowinggreen · 2022-06-18 17:38
This looks fantastic, but it is giving me a "Byte-code: Invalid function: evil-define-key" error whenever I open any epub, when installed.
1nc0ns1st3nt · 2022-06-24 01:17
I had a similar situation.
This is my setup:
```
(use-package nov-xwidget
:straight (:host github :repo "chenyanming/nov-xwidget"
:files (:defaults "*.el"))
:config (add-hook 'nov-mode-hook 'nov-xwidget-inject-all-files))
```
Emacs or straight just hangs on the following message:
```
Building nov-xwidget → Cloning nov.el...
```
I have to force quit using `C-g`, which interrupts the installation process and unable install nov-xwidget.
Any idea how this can be fixed?
[deleted] · 2022-06-24 02:44
[deleted]
DR_MING · 2022-06-24 02:45
That is wired, but I tried to add missing header in the latest commit. You can try again.
1nc0ns1st3nt · 2022-06-24 09:24
I have just tried it now again, and unfortunated failed again.
This lead to me reporting it as an issue to straight on github.
Many thanks still :)
Unhappy-Performer-64 · 2022-07-23 21:39
Error (use-package): Failed to install nov-xwidget: Package ‘nov-xwidget-’ is unavailable
Not in melpa repo too https://melpa.org/.
suikakajyu · 2022-11-02 05:15
How would one go about installing this in Doom Emacs?