unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#67133: [PATCH] Fix CBZ file detection in doc-view-mode
@ 2023-11-12 17:40 Morgan Smith
  2023-11-15 13:12 ` Eli Zaretskii
       [not found] ` <874jhn58ee.fsf@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Morgan Smith @ 2023-11-12 17:40 UTC (permalink / raw)
  To: 67133

[-- Attachment #1: Type: text/plain, Size: 942 bytes --]

Tags: patch

When opening a CBZ file I get the message "doc-view-set-doc-type:
Conflicting types: name says (cbz) but content says (epub odf)".

Looking at the end of `doc-view-set-doc-type` (lisp/doc-view.el:2141)
it's pretty obvious why and it has an easy fix.  In fact we already did
this fix once before for ODF files as you can see at bug#54947 which
resulted in commit b3ff4905388834994ff26d9d033d6bc62b094c1c



In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.37, cairo version 1.16.0)
System Description: Guix System

Configured using:
 'configure
CONFIG_SHELL=/gnu/store/v9p25q9l5nnaixkhpap5rnymmwbhf9rp-bash-minimal-5.1.16/bin/bash
SHELL=/gnu/store/v9p25q9l5nnaixkhpap5rnymmwbhf9rp-bash-minimal-5.1.16/bin/bash
--prefix=/gnu/store/zfggiiqcxwzb5v48fb6cjkznvcwa12v8-emacs-next-pgtk-git.2117490
--enable-fast-install --with-pgtk --with-cairo --with-modules
--with-native-compilation=aot --disable-build-details'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-CBZ-file-detection-in-doc-view-mode.patch --]
[-- Type: text/patch, Size: 1096 bytes --]

From 1bf925a0ceb43f5472d63e1a8de456d19bb39b73 Mon Sep 17 00:00:00 2001
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 12 Nov 2023 12:31:39 -0500
Subject: [PATCH] Fix CBZ file detection in doc-view-mode

* lisp/doc-view.el (doc-view-set-doc-type): Fix CBZ file detection

This fix is almost identical to the previous fix for ODF file
detection in bug#54947 which resulted in commit
b3ff4905388834994ff26d9d033d6bc62b094c1c
---
 lisp/doc-view.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index fb51661caac..2fdb49f3e42 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -2133,7 +2133,7 @@ doc-view-set-doc-type
             ;; zip-archives, so that this same association is used for
             ;; cbz files. This is fine, as cbz files should be handled
             ;; like epub anyway.
-            ((looking-at "PK") '(epub odf))))))
+            ((looking-at "PK") '(epub odf cbz))))))
     (setq-local
      doc-view-doc-type
      (car (or (nreverse (seq-intersection name-types content-types #'eq))
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#67133: [PATCH] Fix CBZ file detection in doc-view-mode
  2023-11-12 17:40 bug#67133: [PATCH] Fix CBZ file detection in doc-view-mode Morgan Smith
@ 2023-11-15 13:12 ` Eli Zaretskii
       [not found] ` <874jhn58ee.fsf@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2023-11-15 13:12 UTC (permalink / raw)
  To: Morgan Smith, Tassilo Horn; +Cc: 67133

> From: Morgan Smith <Morgan.J.Smith@outlook.com>
> Date: Sun, 12 Nov 2023 12:40:35 -0500
> 
> When opening a CBZ file I get the message "doc-view-set-doc-type:
> Conflicting types: name says (cbz) but content says (epub odf)".
> 
> Looking at the end of `doc-view-set-doc-type` (lisp/doc-view.el:2141)
> it's pretty obvious why and it has an easy fix.  In fact we already did
> this fix once before for ODF files as you can see at bug#54947 which
> resulted in commit b3ff4905388834994ff26d9d033d6bc62b094c1c

Tassilo, any comments on this?

Thanks.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#67133: [PATCH] Fix CBZ file detection in doc-view-mode
       [not found] ` <874jhn58ee.fsf@gnu.org>
@ 2023-11-15 17:10   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2023-11-15 17:10 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: Morgan.J.Smith, 67133-done

> From: Tassilo Horn <tsdh@gnu.org>
> Cc: Eli Zaretskii <eliz@gnu.org>
> Date: Wed, 15 Nov 2023 16:43:53 +0100
> 
> Morgan Smith <Morgan.J.Smith@outlook.com> writes:
> 
> Hi Morgan & Eli,
> 
> > Tags: patch
> >
> > When opening a CBZ file I get the message "doc-view-set-doc-type:
> > Conflicting types: name says (cbz) but content says (epub odf)".
> 
> I approve this patch.  Feel free to commit it where you see fit.

Thanks, installed on the emacs-29 branch, and closing the bug.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-15 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-12 17:40 bug#67133: [PATCH] Fix CBZ file detection in doc-view-mode Morgan Smith
2023-11-15 13:12 ` Eli Zaretskii
     [not found] ` <874jhn58ee.fsf@gnu.org>
2023-11-15 17:10   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).