GNU bug report logs - #43775
28.0.50; Feature request: to include EPUB reading into doc-view

Previous Next

Package: emacs;

Reported by: Jean Louis <bugs <at> gnu.support>

Date: Sat, 3 Oct 2020 09:05:02 UTC

Severity: wishlist

Found in version 28.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43775 in the body.
You can then email your comments to 43775 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Sat, 03 Oct 2020 09:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jean Louis <bugs <at> gnu.support>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 03 Oct 2020 09:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Feature request: to include EPUB reading into doc-view
Date: Sat, 03 Oct 2020 11:03:48 +0200
Situation is that doc-view can read PDF files, and Libreoffice or Open
Document files, and others, but EPUB files are not included. Many
digital books are made in EPUB format.

Vasilij Schneidermann <mail 📧 vasilij.de> have written the nov-mode
which when aded to auto-mode-list, opens EPUB files

(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))

I have asked him, he would be somehow willing to cooperate if this is
also confirmed by more users, there are few problems with it, as it
depends on dash.el and other packages.

Maybe doc-view could be expanded with similar feature such as nov-mode
so that it can read EPUB files natively.

I am myself working on project to help local libraries and school
install and use offline Wikipedia, Gutenberg books and similar, there
will be course about Emacs and introduction to computing, EPUB files
are handy. I am each time getting surprised that I cannot read EPUB
files with native Emacs.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Sat, 03 Oct 2020 10:27:01 GMT) Full text and rfc822 format available.

Message #8 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: arthur miller <arthur.miller <at> live.com>
Cc: 43775 <at> debbugs.gnu.org, Vasilij Schneidermann <mail <at> vasilij.de>
Subject: Re: Sv: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into doc-view
Date: Sat, 3 Oct 2020 13:26:02 +0300
Thank you for support Arthur, me too, I read EPUBs inside of Emacs.

* arthur miller <arthur.miller <at> live.com> [2020-10-03 12:35]:
> I use nov mode to read epubs. I think it works well for the most;
> but some epubs are not rendered correctly. I don't know what
> it depends on. It would be needed to find out which epubs can not
> render correctly and offer some message to user to maybe
> open the file in some other viewer or at least to inform that there
> will be errors in viewing.
> 
> Otherwise it would be nice to see it included in Emacs; if you can sort,
> out the legalities.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Sat, 03 Oct 2020 11:31:01 GMT) Full text and rfc822 format available.

Message #11 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: "Philip K." <philipk <at> posteo.net>
To: Jean Louis <bugs <at> gnu.support>
Cc: 43775 <at> debbugs.gnu.org
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into doc-view
Date: Sat, 03 Oct 2020 13:30:30 +0200
[Message part 1 (text/plain, inline)]
Jean Louis <bugs <at> gnu.support> writes:

> Situation is that doc-view can read PDF files, and Libreoffice or Open
> Document files, and others, but EPUB files are not included. Many
> digital books are made in EPUB format.
>
> Vasilij Schneidermann <mail 📧 vasilij.de> have written the nov-mode
> which when aded to auto-mode-list, opens EPUB files
>
> (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
>
> I have asked him, he would be somehow willing to cooperate if this is
> also confirmed by more users, there are few problems with it, as it
> depends on dash.el and other packages.

I sent him a patch a few weeks ago to remove dash (attached below), so
that shouldn't be an issue if he's interested. It's not a radical
change, but at the time he wasn't interested.

The second dependency, esxml is practically part of nov-mode, and
wouldn't make sense to factor it out.

-- 
	Philip K.

[0001-Drop-dash-dependency.patch (text/x-patch, inline)]
From a50b42281c8dfa4bb727f43f006cbaefa0d88640 Mon Sep 17 00:00:00 2001
From: Philip K <philipk <at> posteo.net>
Date: Fri, 28 Aug 2020 23:34:05 +0200
Subject: [PATCH] Drop dash dependency

---
 nov.el | 96 +++++++++++++++++++++++++++++++---------------------------
 1 file changed, 51 insertions(+), 45 deletions(-)

diff --git a/nov.el b/nov.el
index 0072ea1..43749de 100644
--- a/nov.el
+++ b/nov.el
@@ -5,7 +5,7 @@
 ;; Author: Vasilij Schneidermann <mail <at> vasilij.de>
 ;; URL: https://depp.brause.cc/nov.el
 ;; Version: 0.3.0
-;; Package-Requires: ((dash "2.12.0") (esxml "0.3.3") (emacs "24.4"))
+;; Package-Requires: ((esxml "0.3.3") (emacs "24.4"))
 ;; Keywords: hypermedia, multimedia, epub
 
 ;; This file is NOT part of GNU Emacs.
@@ -44,7 +44,7 @@
 ;;; Code:
 
 (require 'cl-lib)
-(require 'dash)
+(require 'pcase)
 (require 'esxml-query)
 (require 'shr)
 (require 'url-parse)
@@ -148,8 +148,9 @@ Each element of the stack is a list (NODEINDEX BUFFERPOS).")
 
 (defun nov-directory-files (directory)
   "Returns a list of files in DIRECTORY except for . and .."
-  (--remove (string-match-p "/\\.\\(?:\\.\\)?\\'" it)
-            (directory-files directory t)))
+  (cl-loop for file in (directory-files directory t)
+	   unless (string-match-p "/\\.\\(?:\\.\\)?\\'" file)
+	   collect file))
 
 (defun nov-contains-nested-directory-p (directory)
   "Non-nil if DIRECTORY contains exactly one directory."
@@ -167,9 +168,9 @@ Each element of the stack is a list (NODEINDEX BUFFERPOS).")
   (delete-directory child))
 
 (defun nov--fix-permissions (file-or-directory mode)
-  (->> (file-modes file-or-directory)
-       (file-modes-symbolic-to-number mode)
-       (set-file-modes file-or-directory)))
+  (let* ((modes (file-modes file-or-directory))
+	 (symbolic (file-modes-symbolic-to-number mode modes)))
+    (set-file-modes file-or-directory symbolic)))
 
 (defun nov-fix-permissions (directory)
   "Iterate recursively through DIRECTORY to fix its files."
@@ -306,7 +307,9 @@ Required keys are 'identifier and everything in
   "Extract an alist of manifest files for CONTENT in DIRECTORY.
 Each alist item consists of the identifier and full path."
   (mapcar (lambda (node)
-            (-let [(&alist 'id id 'href href) (esxml-node-attributes node)]
+            (let* ((attr (esxml-node-attributes node))
+		   (id (cdr (assq 'id attr)))
+		   (href (cdr (assq 'href attr))))
               (cons (intern id)
                     (nov-make-path directory (nov-urldecode href)))))
           (esxml-query-all "package>manifest>item" content)))
@@ -336,7 +339,7 @@ Each alist item consists of the identifier and full path."
     (let ((toc-file (assq nov-toc-id manifest)))
       (when (not toc-file)
         (error "EPUB 3 <nav> file not found"))
-      (setq files (--remove (eq (car it) nov-toc-id) files))
+      (setq files (cl-remove nov-toc-id files :key #'car))
       (cons toc-file files))))
 
 (defun nov-content-files (directory content)
@@ -351,8 +354,9 @@ Each alist item consists of the identifier and full path."
 
 (defun nov--walk-ncx-node (node)
   (let ((tag (esxml-node-tag node))
-        (children (--filter (eq (esxml-node-tag it) 'navPoint)
-                            (esxml-node-children node))))
+        (children (cl-loop for node in (esxml-node-children node)
+			   when (eq (esxml-node-tag node) 'navPoint)
+			   collect node)))
     (cond
      ((eq tag 'navMap)
       (insert "<ol>\n")
@@ -449,17 +453,18 @@ This function honors `shr-max-image-proportion' if possible."
                 'imagemagick)))
     (if (not (display-graphic-p))
         (insert alt)
-      (-let* (((x1 y1 x2 y2) (window-inside-pixel-edges
-                              (get-buffer-window (current-buffer))))
-              (image
-               ;; `create-image' errors out for unsupported image types
-               (ignore-errors
-                 (create-image path type nil
-                               :ascent 100
-                               :max-width (truncate (* shr-max-image-proportion
-                                                       (- x2 x1)))
-                               :max-height (truncate (* shr-max-image-proportion
-                                                        (- y2 y1)))))))
+      (pcase-let* ((`(,x1 ,y1 ,x2 ,y2)
+		    (window-inside-pixel-edges
+		     (get-buffer-window (current-buffer))))
+		   (image
+		    ;; `create-image' errors out for unsupported image types
+		    (ignore-errors
+                      (create-image path type nil
+				    :ascent 100
+				    :max-width (truncate (* shr-max-image-proportion
+							    (- x2 x1)))
+				    :max-height (truncate (* shr-max-image-proportion
+                                                             (- y2 y1)))))))
         (if image
             (insert-image image)
           (insert alt))))))
@@ -524,13 +529,14 @@ If the document path refers to an image (as determined by
 `image-type-file-name-regexps'), an image is inserted, otherwise
 the HTML is rendered with `nov-render-html-function'."
   (interactive)
-  (-let* (((id . path) (aref nov-documents nov-documents-index))
-          ;; HACK: this should be looked up in the manifest
-          (imagep (--find (string-match-p (car it) path)
-                          image-type-file-name-regexps))
-          ;; NOTE: allows resolving image references correctly
-          (default-directory (file-name-directory path))
-          (buffer-read-only nil))
+  (pcase-let* ((`(,id . ,path) (aref nov-documents nov-documents-index))
+               ;; HACK: this should be looked up in the manifest
+               (imagep (cl-find path image-type-file-name-regexps
+				:test (lambda (a b) (string-match-p b a))
+				:key #'car))
+               ;; NOTE: allows resolving image references correctly
+               (default-directory (file-name-directory path))
+               (buffer-read-only nil))
     (erase-buffer)
 
     (cond
@@ -602,7 +608,7 @@ the HTML is rendered with `nov-render-html-function'."
         (erase-buffer)
         (insert (format "EPUB Version: %s\n" version))
         (dolist (item metadata)
-          (-let [(key . value) item]
+          (pcase-let ((`(,key . ,value) item))
             (insert (format "%s: " (capitalize (symbol-name key))))
             (if value
                 (if (eq key 'description)
@@ -721,10 +727,10 @@ Saving is only done if `nov-save-place-file' is set."
   (interactive)
   (or nov-history
       (user-error "This is the first document you looked at"))
-  (-let ((history-forward
-          (cons (list nov-documents-index (point))
-                nov-history-forward))
-         ((index opoint) (car nov-history)))
+  (pcase-let ((history-forward
+               (cons (list nov-documents-index (point))
+                     nov-history-forward))
+              (`(,index ,opoint) (car nov-history)))
     (setq nov-history (cdr nov-history))
     (nov-goto-document index)
     (setq nov-history (cdr nov-history))
@@ -737,8 +743,8 @@ Saving is only done if `nov-save-place-file' is set."
   (interactive)
   (or nov-history-forward
       (user-error "This is the last document you looked at"))
-  (-let ((history-forward (cdr nov-history-forward))
-         ((index opoint) (car nov-history-forward)))
+  (pcase-let ((history-forward (cdr nov-history-forward))
+              (`(,index ,opoint) (car nov-history-forward)))
     (nov-goto-document index)
     (setq nov-history-forward history-forward)
     (goto-char opoint)
@@ -764,15 +770,15 @@ Saving is only done if `nov-save-place-file' is set."
     (nov-clean-up)
     (error "Invalid EPUB file"))
   (let* ((content (nov-slurp (nov-container-filename nov-temp-dir) t))
-         (content-file (->> (nov-container-content-filename content)
-                            (nov-make-path nov-temp-dir)))
+         (content-file (nov-make-path
+			nov-temp-dir
+			(nov-container-content-filename content)))
          (work-dir (file-name-directory content-file))
          (content (nov-slurp content-file t)))
     (setq nov-content-file content-file)
     (setq nov-epub-version (nov-content-version content))
     (setq nov-metadata (nov-content-metadata content))
-    (setq nov-documents (->> (nov-content-files work-dir content)
-                             (apply 'vector)))
+    (setq nov-documents (apply 'vector (nov-content-files work-dir content)))
     (setq nov-documents-index 0))
   (setq buffer-undo-list t)
   (setq nov-file-name (buffer-file-name))
@@ -880,11 +886,11 @@ See also `nov-bookmark-make-record'."
                 (libxml-parse-html-region (point-min) (point-max)))))
     (mapcar
      (lambda (node)
-       (-let* ((href (esxml-node-attribute 'href node))
-               (label (mapconcat 'string-trim-whitespace
-                                 (esxml-find-descendants #'stringp node) " "))
-               ((filename target) (nov-url-filename-and-target href)))
-         (list label filename 'nov-imenu-goto-function target)))
+       (pcase-let* ((href (esxml-node-attribute 'href node))
+		    (label (mapconcat 'string-trim-whitespace
+                                      (esxml-find-descendants #'stringp node) " "))
+		    (`(,filename ,target) (nov-url-filename-and-target href)))
+	 (list label filename 'nov-imenu-goto-function target)))
      (esxml-query-all "a" toc))))
 
 (defun nov-imenu-setup ()
-- 
2.26.2


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Sun, 04 Oct 2020 03:45:02 GMT) Full text and rfc822 format available.

Message #14 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: "Philip K." <philipk <at> posteo.net>
Cc: 43775 <at> debbugs.gnu.org, bugs <at> gnu.support
Subject: Re: bug#43775: 28.0.50;
 Feature request: to include EPUB reading into doc-view
Date: Sat, 03 Oct 2020 23:44:15 -0400
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

It looks like nov-mode is not included in Emacs.  At least, grep-find
did not find it.  Is it part of ELPA?

Doc-view cannot refer to it if not is not in Emacs.

Why is it called 'nov-mode'?


-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Sun, 04 Oct 2020 04:41:02 GMT) Full text and rfc822 format available.

Message #17 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Richard Stallman <rms <at> gnu.org>
Cc: 43775 <at> debbugs.gnu.org, "Philip K." <philipk <at> posteo.net>,
 Vasilij Schneidermann <mail <at> vasilij.de>
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into main Emacs
Date: Sun, 4 Oct 2020 07:40:45 +0300
* Richard Stallman <rms <at> gnu.org> [2020-10-04 06:44]:
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> 
> It looks like nov-mode is not included in Emacs.  At least, grep-find
> did not find it.  Is it part of ELPA?

Name of package is "nov", and is included in ELPA.

I proposed for doc-view to be standard, but Author Vasilij
Schneidermann <mail <at> vasilij.de> said that is not related to doc-view,
as EPUB files are like packaged HTML files. Author is willing to
contribute, and is Emacs contributor, so I understood.

Many digital books are in EPUB format. I got every time surprised to
find that Emacs could not read EPUB, but could read PDF and other
documents.

> Why is it called 'nov-mode'?

Maybe Vasilij can answer.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Sun, 04 Oct 2020 05:49:02 GMT) Full text and rfc822 format available.

Message #20 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Vasilij Schneidermann <mail <at> vasilij.de>
To: Jean Louis <bugs <at> gnu.support>
Cc: 43775 <at> debbugs.gnu.org, "Philip K." <philipk <at> posteo.net>,
 Richard Stallman <rms <at> gnu.org>
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into main Emacs
Date: Sun, 4 Oct 2020 07:48:34 +0200
[Message part 1 (text/plain, inline)]
> > It looks like nov-mode is not included in Emacs.  At least, grep-find
> > did not find it.  Is it part of ELPA?

FWIW, I think that it would make more sense to contribute the package to
GNU ELPA first:

- Greater flexibility of update cycle
- Still reasonably easy to install
- There's a significant dependency on esxml-query.el for XML/HTML
  traversal which I don't expect to get included into Emacs any
  time soon.

> > Why is it called 'nov-mode'?

Actually, I called it nov.el because it's for reading novels.  The
package prefix however is nov-, so the package name was turned into nov
when I submitted the package to MELPA.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Sun, 04 Oct 2020 07:24:01 GMT) Full text and rfc822 format available.

Message #23 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rms <at> gnu.org, Vasilij Schneidermann <v.schneidermann <at> gmail.com>
Cc: 43775 <at> debbugs.gnu.org, philipk <at> posteo.net, bugs <at> gnu.support
Subject: Re: bug#43775: 28.0.50;
 Feature request: to include EPUB reading into doc-view
Date: Sun, 04 Oct 2020 10:22:43 +0300
> From: Richard Stallman <rms <at> gnu.org>
> Date: Sat, 03 Oct 2020 23:44:15 -0400
> Cc: 43775 <at> debbugs.gnu.org, bugs <at> gnu.support
> 
> It looks like nov-mode is not included in Emacs.  At least, grep-find
> did not find it.  Is it part of ELPA?

No, it has its own site, AFAIU:

  https://depp.brause.cc/nov.el/

It is also on MELPA, AFAICT.

> Why is it called 'nov-mode'?

I don't know, perhaps because it allows to read novels?  Vasilij?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Mon, 05 Oct 2020 03:16:01 GMT) Full text and rfc822 format available.

Message #26 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Vasilij Schneidermann <mail <at> vasilij.de>
Cc: 43775 <at> debbugs.gnu.org, philipk <at> posteo.net, bugs <at> gnu.support
Subject: Re: bug#43775: 28.0.50;
 Feature request: to include EPUB reading into main Emacs
Date: Sun, 04 Oct 2020 23:15:19 -0400
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > FWIW, I think that it would make more sense to contribute the package to
  > GNU ELPA first:

The other Emacs maintainers will be glad to work with you on that.
Thank you for contributing.

  > Actually, I called it nov.el because it's for reading novels.

We've been having a discussion about how to make Emacs easier to
learn.  I think one important way is to cease giving packages cryptic
names, and start giving each mode or package a name whose meaning will
be clear to everyone who sees it.

The name "Nov mode" is not clear -- witness the fact that it wasn't
obvious to me what it meant.  One needs to be told its meaning.

What would you think of "E-Reader mode"?  "E-Book View mode"?
(I am making a surmise here about what it does -- please forgive
me if I'm mistaken.)

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Mon, 05 Oct 2020 04:13:02 GMT) Full text and rfc822 format available.

Message #29 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Richard Stallman <rms <at> gnu.org>
Cc: 43775 <at> debbugs.gnu.org, philipk <at> posteo.net,
 Vasilij Schneidermann <mail <at> vasilij.de>
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into main Emacs
Date: Mon, 5 Oct 2020 07:12:38 +0300
* Richard Stallman <rms <at> gnu.org> [2020-10-05 06:15]:
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> 
>   > FWIW, I think that it would make more sense to contribute the package to
>   > GNU ELPA first:
> 
> The other Emacs maintainers will be glad to work with you on that.
> Thank you for contributing.
> 
>   > Actually, I called it nov.el because it's for reading novels.
> 
> We've been having a discussion about how to make Emacs easier to
> learn.  I think one important way is to cease giving packages cryptic
> names, and start giving each mode or package a name whose meaning will
> be clear to everyone who sees it.
> 
> The name "Nov mode" is not clear -- witness the fact that it wasn't
> obvious to me what it meant.  One needs to be told its meaning.
> 
> What would you think of "E-Reader mode"?  "E-Book View mode"?
> (I am making a surmise here about what it does -- please forgive
> me if I'm mistaken.)

Just make it epub-mode





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Mon, 05 Oct 2020 04:24:01 GMT) Full text and rfc822 format available.

Message #32 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Vasilij Schneidermann <mail <at> vasilij.de>
To: Richard Stallman <rms <at> gnu.org>
Cc: 43775 <at> debbugs.gnu.org, philipk <at> posteo.net, bugs <at> gnu.support
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into main Emacs
Date: Mon, 5 Oct 2020 06:22:55 +0200
[Message part 1 (text/plain, inline)]
> We've been having a discussion about how to make Emacs easier to
> learn.  I think one important way is to cease giving packages cryptic
> names, and start giving each mode or package a name whose meaning will
> be clear to everyone who sees it.

That's a laudable goal, but it's hard to fulfill given the crutch of
identifier prefixing Emacs Lisp is stuck with.  The choice of a unique,
yet short prefix is more important as chances are that someone else beat
you to the punch and picked the obvious ones first.  In my case,
epub-mode.el (no adherence to prefixing) and ereader.el (ereader-
prefix) were already taken.

> What would you think of "E-Reader mode"?  "E-Book View mode"?
> (I am making a surmise here about what it does -- please forgive
> me if I'm mistaken.)

These are display names, they don't tell me how they'd map to the file
name or package prefix.  With "E-Reader mode" there would be high
confusion potential with ereader.el and maybe even namespace collisions
as it defines ereader-mode and other identifiers of that kind.  "E-Book
View mode" might work (ebook-view-mode?), but is overall too long to
comfortably work with.  How much I wish that Emacs Lisp were more like
other Lisp dialects and offered you to write code without having to
spell out package prefixes for every single identifier you write...
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Mon, 05 Oct 2020 05:18:02 GMT) Full text and rfc822 format available.

Message #35 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Vasilij Schneidermann <mail <at> vasilij.de>
Cc: 43775 <at> debbugs.gnu.org, philipk <at> posteo.net, Richard Stallman <rms <at> gnu.org>,
 bugs <at> gnu.support
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into main Emacs
Date: Mon, 5 Oct 2020 08:17:20 +0300
[Message part 1 (text/plain, inline)]
* Vasilij Schneidermann <mail <at> vasilij.de> [2020-10-05 07:23]:
> > We've been having a discussion about how to make Emacs easier to
> > learn.  I think one important way is to cease giving packages cryptic
> > names, and start giving each mode or package a name whose meaning will
> > be clear to everyone who sees it.
> 
> That's a laudable goal, but it's hard to fulfill given the crutch of
> identifier prefixing Emacs Lisp is stuck with.  The choice of a unique,
> yet short prefix is more important as chances are that someone else beat
> you to the punch and picked the obvious ones first.  In my case,
> epub-mode.el (no adherence to prefixing) and ereader.el (ereader-
> prefix) were already taken.

epub-reader-mode

[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Mon, 05 Oct 2020 07:55:02 GMT) Full text and rfc822 format available.

Message #38 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Vasilij Schneidermann <mail <at> vasilij.de>
Cc: 43775 <at> debbugs.gnu.org, "Philip K." <philipk <at> posteo.net>,
 Richard Stallman <rms <at> gnu.org>, Jean Louis <bugs <at> gnu.support>
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into main Emacs
Date: Mon, 05 Oct 2020 09:53:38 +0200
Vasilij Schneidermann <mail <at> vasilij.de> writes:

> - Greater flexibility of update cycle
> - Still reasonably easy to install
> - There's a significant dependency on esxml-query.el for XML/HTML
>   traversal which I don't expect to get included into Emacs any
>   time soon.

Is there any reason why?  esxml-query looks really cool.

>> > Why is it called 'nov-mode'?
>
> Actually, I called it nov.el because it's for reading novels.  The
> package prefix however is nov-, so the package name was turned into nov
> when I submitted the package to MELPA.

nov sounds like a good name to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Mon, 05 Oct 2020 08:53:02 GMT) Full text and rfc822 format available.

Message #41 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Arthur Miller <arthur.miller <at> live.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43775 <at> debbugs.gnu.org, "Philip K." <philipk <at> posteo.net>,
 Richard Stallman <rms <at> gnu.org>, Jean Louis <bugs <at> gnu.support>,
 Vasilij Schneidermann <mail <at> vasilij.de>
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into main Emacs
Date: Mon, 05 Oct 2020 10:52:17 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Vasilij Schneidermann <mail <at> vasilij.de> writes:
>
>> - Greater flexibility of update cycle
>> - Still reasonably easy to install
>> - There's a significant dependency on esxml-query.el for XML/HTML
>>   traversal which I don't expect to get included into Emacs any
>>   time soon.
>
> Is there any reason why?  esxml-query looks really cool.
>
>>> > Why is it called 'nov-mode'?
>>
>> Actually, I called it nov.el because it's for reading novels.  The
>> package prefix however is nov-, so the package name was turned into nov
>> when I submitted the package to MELPA.
>
> nov sounds like a good name to me.

Is there already epub.el and epub-mode? If epub.el could be merged with
doc-view, then maybe doc-view-epub mode; if it needs separate name?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Mon, 05 Oct 2020 11:33:02 GMT) Full text and rfc822 format available.

Message #44 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Vasilij Schneidermann <mail <at> vasilij.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43775 <at> debbugs.gnu.org, "Philip K." <philipk <at> posteo.net>,
 Richard Stallman <rms <at> gnu.org>, Jean Louis <bugs <at> gnu.support>
Subject: Re: bug#43775: 28.0.50;
 Feature request: to include EPUB reading into main Emacs
Date: Mon, 05 Oct 2020 13:32:38 +0200

>Is there any reason why?  esxml-query looks really cool.

It could be added as it's independent from esxml.el, I am the only contributor and it doesn't depend on anything from the rest of the esxml package. I expect some adjustments though before it can be included, both with regards to style (commit messages don't adhere to GNU standards) and architecture (most of the code is for parsing CSS selectors, it might make more sense to have a s-expression syntax instead and integrate it into xml.el).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Mon, 05 Oct 2020 11:37:02 GMT) Full text and rfc822 format available.

Message #47 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Vasilij Schneidermann <mail <at> vasilij.de>
To: Arthur Miller <arthur.miller <at> live.com>,Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43775 <at> debbugs.gnu.org, "Philip K." <philipk <at> posteo.net>,
 Richard Stallman <rms <at> gnu.org>, Jean Louis <bugs <at> gnu.support>
Subject: Re: bug#43775: 28.0.50;
 Feature request: to include EPUB reading into main Emacs
Date: Mon, 05 Oct 2020 13:36:02 +0200

>Is there already epub.el and epub-mode? If epub.el could be merged with
>doc-view, then maybe doc-view-epub mode; if it needs separate name?

That wouldn't make much sense: doc-view operates on images of pages and offers navigation in terms of that, whereas this mode operates in terms of subdocuments that are rendered as htmlized text using shr.el.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Tue, 06 Oct 2020 01:32:02 GMT) Full text and rfc822 format available.

Message #50 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Vasilij Schneidermann <mail <at> vasilij.de>
Cc: 43775 <at> debbugs.gnu.org, "Philip K." <philipk <at> posteo.net>,
 Richard Stallman <rms <at> gnu.org>, Jean Louis <bugs <at> gnu.support>
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into main Emacs
Date: Tue, 06 Oct 2020 03:31:08 +0200
Vasilij Schneidermann <mail <at> vasilij.de> writes:

>>Is there any reason why?  esxml-query looks really cool.
>
> It could be added as it's independent from esxml.el, I am the only
> contributor and it doesn't depend on anything from the rest of the
> esxml package. I expect some adjustments though before it can be
> included, both with regards to style (commit messages don't adhere to
> GNU standards) and architecture (most of the code is for parsing CSS
> selectors, it might make more sense to have a s-expression syntax
> instead and integrate it into xml.el).

Or integrate it with dom.el, which covers much the same area, but with a
different approach.  The query selectors in esxml-query would complement
those functions nicely, I think. 

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Tue, 06 Oct 2020 02:32:01 GMT) Full text and rfc822 format available.

Message #53 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Vasilij Schneidermann <mail <at> vasilij.de>
Cc: 43775 <at> debbugs.gnu.org, philipk <at> posteo.net, bugs <at> gnu.support
Subject: Re: bug#43775: 28.0.50;
 Feature request: to include EPUB reading into main Emacs
Date: Mon, 05 Oct 2020 22:30:50 -0400
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > These are display names, they don't tell me how they'd map to the file
  > name or package prefix.

THe intention is to use them as the name of the mode and the command
to select it.  For instance, the command could be M-x ebook-view-mode.
That is where we need names that are clear to the user.

The file name does not have to be the same as that.
We don't need file names to be obvious to the user.

  >   How much I wish that Emacs Lisp were more like
  > other Lisp dialects and offered you to write code without having to
  > spell out package prefixes for every single identifier you write...

I understand the issue, but since the file prefix can be different
from (and shorter than) the name of the mode, it isn't as bad as it
seems.

Meanwhile, Joao is working on a symbol renaming feature which might
make things more convenient.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Wed, 07 Oct 2020 17:52:01 GMT) Full text and rfc822 format available.

Message #56 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Vasilij Schneidermann <mail <at> vasilij.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43775 <at> debbugs.gnu.org, "Philip K." <philipk <at> posteo.net>,
 Richard Stallman <rms <at> gnu.org>, Jean Louis <bugs <at> gnu.support>
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into main Emacs
Date: Wed, 7 Oct 2020 19:50:51 +0200
[Message part 1 (text/plain, inline)]
> Or integrate it with dom.el, which covers much the same area, but with a
> different approach.  The query selectors in esxml-query would complement
> those functions nicely, I think. 

That's an interesting proposal as esxml-query.el contains ad-hoc
functions to retrieve tag attributes/children which have been covered by
dom.el already.  How about changing the file name from esxml-query.el to
dom-query.el and the package prefix from esxml- to dom-, would that work
for you?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Thu, 08 Oct 2020 16:07:02 GMT) Full text and rfc822 format available.

Message #59 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Vasilij Schneidermann <mail <at> vasilij.de>
To: Richard Stallman <rms <at> gnu.org>
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into main Emacs
Date: Wed, 7 Oct 2020 19:47:13 +0200
[Message part 1 (text/plain, inline)]
> In what sense are those names taken?
> Are packages with those names included in Emacs, or in GNU ELPA?
> 
> If it simply means that people published files with those names, that
> doesn't mean the names are off limits for anyone else.  We can install
> a file in Emacs core or in GNU ELPA with either of those names.

Neither are in Emacs or GNU ELPA because the effort to do that is
prohibitively high for the majority of the Emacs community.  Sure, one
can ignore their existence, but that will make things confusing as one
needs to clarify whether they mean the package in Emacs/GNU ELPA or the
community one that preceded them.  Names are important after all and so
are communities.

> By the way, I know that your package can be used to read some ebooks,
> but that is all I know.  Could you please tell me just a little more?
> For instance, which formats does it aspire to handle?  Which formats
> does it handle now?

It handles standards-complying EPUB2 and EPUB3 ebooks.  I've considered
extending it to handle the FB2 format, but that would pretty much
require a full rewrite.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Fri, 09 Oct 2020 04:18:02 GMT) Full text and rfc822 format available.

Message #62 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Vasilij Schneidermann <mail <at> vasilij.de>
Cc: 43775 <at> debbugs.gnu.org, "Philip K." <philipk <at> posteo.net>,
 Richard Stallman <rms <at> gnu.org>, Jean Louis <bugs <at> gnu.support>
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into main Emacs
Date: Fri, 09 Oct 2020 06:16:43 +0200
Vasilij Schneidermann <mail <at> vasilij.de> writes:

> That's an interesting proposal as esxml-query.el contains ad-hoc
> functions to retrieve tag attributes/children which have been covered by
> dom.el already.  How about changing the file name from esxml-query.el to
> dom-query.el and the package prefix from esxml- to dom-, would that work
> for you?

Yes, sounds like a good idea.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Mon, 12 Oct 2020 06:37:01 GMT) Full text and rfc822 format available.

Message #65 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Vasilij Schneidermann <mail <at> vasilij.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43775 <at> debbugs.gnu.org, "Philip K." <philipk <at> posteo.net>,
 Richard Stallman <rms <at> gnu.org>, Jean Louis <bugs <at> gnu.support>
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into main Emacs
Date: Mon, 12 Oct 2020 08:36:36 +0200
[Message part 1 (text/plain, inline)]
> Yes, sounds like a good idea.

Great, now how do I get there?  Presumably I'll need write access and
someone to guide me into the exact Git workflow used there?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Mon, 12 Oct 2020 14:56:01 GMT) Full text and rfc822 format available.

Message #68 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vasilij Schneidermann <mail <at> vasilij.de>
Cc: 43775 <at> debbugs.gnu.org, larsi <at> gnus.org, philipk <at> posteo.net, bugs <at> gnu.support,
 rms <at> gnu.org
Subject: Re: bug#43775: 28.0.50;
 Feature request: to include EPUB reading into main Emacs
Date: Mon, 12 Oct 2020 17:55:22 +0300
> Date: Mon, 12 Oct 2020 08:36:36 +0200
> From: Vasilij Schneidermann <mail <at> vasilij.de>
> Cc: 43775 <at> debbugs.gnu.org, "Philip K." <philipk <at> posteo.net>,
>  Richard Stallman <rms <at> gnu.org>, Jean Louis <bugs <at> gnu.support>
> 
> > Yes, sounds like a good idea.
> 
> Great, now how do I get there?  Presumably I'll need write access and
> someone to guide me into the exact Git workflow used there?

To get write access, create a user on Savannah, and then request to
make that use a member of the Emacs project.  I will then approve you,
and that will give you write access to the Git repository.

For the Git worklfow, I'm not sure what you mean.  You are going to
add code to an existing file, right?  If so, just post the patches for
review, and when all the comments are addressed, push the changeset to
the master branch.

Some details are in CONTRIBUTE and in admin/notes/git-workflow, but
I'm not sure you need that.  In general, new features are always
pushed to the master branch, and bugfixes either to the release branch
or the master branch; the release branch is then merged periodically
onto master.  If you are not sure about something, just ask.

TIA




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43775; Package emacs. (Sat, 23 Apr 2022 14:51:02 GMT) Full text and rfc822 format available.

Message #71 received at 43775 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 43775 <at> debbugs.gnu.org
Subject: Re: bug#43775: 28.0.50; Feature request: to include EPUB reading
 into doc-view
Date: Sat, 23 Apr 2022 16:50:12 +0200
Jean Louis <bugs <at> gnu.support> writes:

> Situation is that doc-view can read PDF files, and Libreoffice or Open
> Document files, and others, but EPUB files are not included. Many
> digital books are made in EPUB format.

This was added to Emacs 29 in:

commit d633db5189f335873a03544f9f41dcaf77c8e31d
Author:     Daniel Nicolai <dalanicolai <at> gmail.com>
AuthorDate: Thu Jan 27 17:03:38 2022 +0100


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 43775 <at> debbugs.gnu.org and Jean Louis <bugs <at> gnu.support> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 23 Apr 2022 14:51:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 22 May 2022 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.