unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 5553@debbugs.gnu.org
Subject: bug#5553: 23.1.92; Archives with wrong coding system
Date: Wed, 10 Feb 2010 02:09:56 +0200	[thread overview]
Message-ID: <87d40dvrar.fsf@mail.jurta.org> (raw)
In-Reply-To: <83y6j2ca3r.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 10 Feb 2010 00:34:00 +0200")

> Thanks, but please provide a self-contained recipe for reproducing the
> problem, starting with "emacs -Q".

AFAICS, it is not reproducible with "emacs -Q" where visited archives
and images with non-standard file extensions are visited in proper modes.

The problem appears with using Unicad (http://code.google.com/p/unicad/).
Basically what is does boils down to the following line:

  (add-to-list 'auto-coding-functions 'unicad-universal-charset-detect)

The rest is just statistical guessing of the coding system based solely
on the content of the file, and in case of archives and images, the
guess is incorrect, and `magic-fallback-mode-alist' fails to match
a mode regexp at the beginning of the buffer.

So the question is whether we should complement entries in
`magic-fallback-mode-alist' with the corresponding entries in
`auto-coding-regexp-alist' with the same regexps (like we complement
entries in `auto-mode-alist' with entries in `auto-coding-alist')?

Or every function in `auto-coding-functions' that determines a coding system
should somehow take care of exceptions in `magic-fallback-mode-alist'?

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






  reply	other threads:[~2010-02-10  0:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-09 21:19 bug#5553: 23.1.92; Archives with wrong coding system Juri Linkov
2010-02-09 22:19 ` Juri Linkov
2010-02-09 22:34 ` Eli Zaretskii
2010-02-10  0:09   ` Juri Linkov [this message]
2010-02-10 20:14     ` Stefan Monnier
2010-02-10 22:33       ` Juri Linkov
2010-02-11  2:12         ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87d40dvrar.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=5553@debbugs.gnu.org \
    --cc=eliz@gnu.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 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).