GNU bug report logs - #43511
27.1; [PATCH] Files with lowercase doctype are not in mhtml-mode by default

Previous Next

Package: emacs;

Reported by: Daniel Martín <mardani29 <at> yahoo.es>

Date: Sat, 19 Sep 2020 14:36:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 27.1

Fixed in version 28.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 43511 in the body.
You can then email your comments to 43511 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#43511; Package emacs. (Sat, 19 Sep 2020 14:36:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Martín <mardani29 <at> yahoo.es>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 19 Sep 2020 14:36:02 GMT) Full text and rfc822 format available.

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

From: Daniel Martín <mardani29 <at> yahoo.es>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; [PATCH] Files with lowercase doctype are not in mhtml-mode by
 default
Date: Sat, 19 Sep 2020 16:35:14 +0200
[Message part 1 (text/plain, inline)]
This is a regression caused by the fix for bug 36401.

Steps to reproduce:

emacs -Q
M-x browse-url-emacs RET https://www.gnu.org/software/emacs/ RET

Expected results:

The HTML contents of the Emacs website are shown, and the buffer is in
mhtml-mode.

Actual results:

The HTML contents of the Emacs website are shown, but the buffer is in
fundamental-mode.

The proposed solution to accomodate both wanted behaviors is to extend
the regular expression to cover a "DOCTYPE" in a case-insensitive
way. The standard says that's also supported:
https://html.spec.whatwg.org/multipage/syntax.html#the-doctype

I've attached a patch with the proposed solution, on top of
emacs-27. Let me know if you'd want to apply it on top of master
instead.

Thanks.

[0001-Put-files-in-mhtml-mode-when-they-have-DOCTYPE-case-.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43511; Package emacs. (Sat, 19 Sep 2020 17:18:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: 43511 <at> debbugs.gnu.org
Subject: Re: bug#43511: 27.1; [PATCH] Files with lowercase doctype are not
 in mhtml-mode by default
Date: Sat, 19 Sep 2020 19:17:08 +0200
Daniel Martín <mardani29 <at> yahoo.es> writes:

> I've attached a patch with the proposed solution, on top of
> emacs-27. Let me know if you'd want to apply it on top of master
> instead.

Thanks; I've applied it to Emacs 28.  While this is a regression, I
don't think the impact it has is large enough to warrant putting it in
Emacs 27.2.

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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 19 Sep 2020 17:18:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 43511 <at> debbugs.gnu.org and Daniel Martín <mardani29 <at> yahoo.es> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 19 Sep 2020 17:18: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, 18 Oct 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 243 days ago.

Previous Next


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