10

I use eww to read online articles in Emacs instead of in a browser because it is less distracting and I can take notes in an org-mode quickly without switching applications.

I wonder how feasible it is to read an e-books in epub, or pdf format in Emacs? I found the epubmode.el on emacswiki.org but it is broken and haven't been updated since 2011.

  • 3
    Opening PDF should work out of the box. – Malabarba Mar 27 '15 at 9:53
  • 3
    And the pdf-tools package makes them look and behave even better. At this point I'm frustrated using anything else. – wdkrnls Mar 27 '15 at 15:35
6

Try nov (installable via melpa). It is a reasonable start for reading ePUBs in Emacs.

4

.epub are in fact .zip file with .xhtml file inside. You can just open them, find the .xhtml file that has the content (often content.html), and open it. Then you can call shr-render-buffer to display the html.

This do not solve several problem:

  • finding automatically the correct .xhtml
  • use the table of content,
  • bigger epub have several .xhtml (say, one by chapter), one need a way to go from one to the next.
  • shr-render-buffer is great! I can go though all the xhtml files and convert all to a single org file, based on the table of content. thanks! – yi.tang.uni Mar 27 '15 at 14:47
  • I don't seem to have shr-render-buffer in emacs 24.3? It also looks like someone started to make an epub-mode, but I was unable to get that working either: emacswiki.org/emacs/EpubMode – Brian Z Nov 8 '15 at 6:42
  • Ah... I had to load shr with load-library. Still not working very well though! A real, working epub-mode would be nice. – Brian Z Nov 8 '15 at 6:49
  • The emacspeak package has a mode for reading epub files in eww. I use it all the time. You won't want the whole emacspeak package, but you should be able to use how it does this as a way to roll your own solution. – Tim X Feb 25 '17 at 23:40
1

I recommend emacs-ereader. My experience is that it errs out less often while parsing an epub than nov and it too is installable as a package. Further, it supports annotations, integrates decent with Org, in a slightly more primitive way than the awesome pdf-tools does for PDFs.

  • FYI, invalid EPUBs are not supported in nov.el. If you run into a valid EPUB still triggering errors, please report a bug and send me the file via email or so. – wasamasa Mar 3 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.