all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Subject: Re: Should `auto-coding-functions' be mode-specific?
Date: Sun, 07 Jan 2007 01:33:55 +0200	[thread overview]
Message-ID: <8764bkeydx.fsf@jurta.org> (raw)
In-Reply-To: <87irfn5ggf.fsf@pacem.orebokech.com> (Romain Francoise's message of "Thu, 04 Jan 2007 09:44:32 +0100")

>> 2006-06-02  Juri Linkov  <juri@jurta.org>
>
>> 	* international/mule.el (sgml-html-meta-auto-coding-function):
>> 	Remove the condition `(search-forward "<html" size t)'.
>
> Thanks for noticing this Kevin, I had missed it.  I think this
> change should be reverted, it's okay to make Emacs handle Mozilla's
> broken HTML, but only as long as it doesn't get in the way of valid
> use cases!
>
> And your proposed change to also recognize a doctype at the
> beginning of the buffer looks good to me.
>
> So unless someone objects, I'll revert Juri's change and extend the
> function as Kevin suggests.  Perhaps I'll also make it recognize
> Mozilla's specific doctype ('<!DOCTYPE NETSCAPE-Bookmark-file-1>').

The reported bug can occur even without my change because "<html" was
not anchored at the beginning of the buffer and can match "<html" in
the presented HTML snippet near the top.

Your change is an improvement since it reduces the false positive
rate while not significantly increasing the false negative rate.
But then why not to go further and use the same regexp as used for
detecting HTML files in `magic-mode-alist'?  It seems reasonable
to detect the HTML encoding exactly in the same files that later
recognized as HTML according to the file contents.

-- 
Juri Linkov
http://www.jurta.org/emacs/

  reply	other threads:[~2007-01-06 23:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-02 20:43 Should `auto-coding-functions' be mode-specific? Romain Francoise
2007-01-02 22:14 ` Lennart Borgman (gmail)
2007-01-03  0:54 ` Kevin Ryde
2007-01-03  3:34 ` Richard Stallman
2007-01-03 12:09   ` Vincent Lefevre
2007-01-04  2:31     ` Richard Stallman
2007-01-04  4:14       ` Kenichi Handa
2007-01-04 19:02         ` Romain Francoise
2007-01-04 22:33         ` Richard Stallman
2007-01-05 18:04           ` Romain Francoise
2007-01-03  5:26 ` Kevin Rodgers
2007-01-03 14:18   ` Ralf Mattes
2007-01-04  8:44   ` Romain Francoise
2007-01-06 23:33     ` Juri Linkov [this message]
2007-01-07 13:47       ` Romain Francoise
2007-01-07 16:22         ` Juri Linkov
2007-01-08 19:46           ` Romain Francoise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8764bkeydx.fsf@jurta.org \
    --to=juri@jurta.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.