Received: (at 5553) by debbugs.gnu.org; 11 Feb 2010 02:12:58 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 10 21:12:58 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1NfOY6-0006V8-NX for submit <at> debbugs.gnu.org; Wed, 10 Feb 2010 21:12:58 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <monnier@HIDDEN>) id 1NfOXs-0006Ux-GD for 5553 <at> debbugs.gnu.org; Wed, 10 Feb 2010 21:12:56 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAAP2cktLd+Rw/2dsb2JhbACaeXW+A4RVBIMTh10 X-IronPort-AV: E=Sophos;i="4.49,448,1262581200"; d="scan'208";a="55851337" Received: from 75-119-228-112.dsl.teksavvy.com (HELO pastel.home) ([75.119.228.112]) by ironport2-out.pppoe.ca with ESMTP; 10 Feb 2010 21:12:43 -0500 Received: by pastel.home (Postfix, from userid 20848) id EFB5589D5; Wed, 10 Feb 2010 21:12:42 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> To: Juri Linkov <juri@HIDDEN> Subject: Re: bug#5553: 23.1.92; Archives with wrong coding system Message-ID: <jwvaavgwmi4.fsf-monnier+emacs@HIDDEN> References: <87bpfzxana.fsf@HIDDEN> <83y6j2ca3r.fsf@HIDDEN> <87d40dvrar.fsf@HIDDEN> <jwvd40cyhng.fsf-monnier+emacs@HIDDEN> <87y6j0souk.fsf@HIDDEN> Date: Wed, 10 Feb 2010 21:12:42 -0500 In-Reply-To: <87y6j0souk.fsf@HIDDEN> (Juri Linkov's message of "Thu, 11 Feb 2010 00:33:23 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 5553 Cc: Eli Zaretskii <eliz@HIDDEN>, 5553 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -2.0 (--) >> I think that auto-coding-alist should allow mapping not only file-names >> but also major modes to coding-systems. This should hopefully take care >> of those issues by mapping image-mode and archive-mode to no-conversion. > I don't understand how this is possible because currently a coding system > should be recognized before mode is chosen: This is the reason why my suggestion did not come with a patch ;-) This said, I don't think it's impossible, but it would require a reorganization indeed. Stefan
owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#5553
; Package emacs
.
Full text available.Received: (at 5553) by debbugs.gnu.org; 10 Feb 2010 22:39:20 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 10 17:39:20 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1NfLDL-00042e-RA for submit <at> debbugs.gnu.org; Wed, 10 Feb 2010 17:39:20 -0500 Received: from smtp-out3.starman.ee ([85.253.0.5] helo=mx1.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <juri@HIDDEN>) id 1NfLDJ-00042V-V0 for 5553 <at> debbugs.gnu.org; Wed, 10 Feb 2010 17:39:18 -0500 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.93.219.cable.starman.ee [82.131.93.219]) by mx1.starman.ee (Postfix) with ESMTP id DF6BE3F408F; Thu, 11 Feb 2010 00:39:10 +0200 (EET) From: Juri Linkov <juri@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> Subject: Re: bug#5553: 23.1.92; Archives with wrong coding system Organization: JURTA References: <87bpfzxana.fsf@HIDDEN> <83y6j2ca3r.fsf@HIDDEN> <87d40dvrar.fsf@HIDDEN> <jwvd40cyhng.fsf-monnier+emacs@HIDDEN> Date: Thu, 11 Feb 2010 00:33:23 +0200 In-Reply-To: <jwvd40cyhng.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message of "Wed, 10 Feb 2010 15:14:42 -0500") Message-ID: <87y6j0souk.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 5553 Cc: Eli Zaretskii <eliz@HIDDEN>, 5553 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -3.5 (---) >> 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'? > > I think that auto-coding-alist should allow mapping not only file-names > but also major modes to coding-systems. This should hopefully take care > of those issues by mapping image-mode and archive-mode to no-conversion. I don't understand how this is possible because currently a coding system should be recognized before mode is chosen: 1. Recognizing Coding Systems 1.1. coding-system-for-read if non-nil 1.2. auto-coding-alist matching a filename 1.3. auto-coding-regexp-alist matching first bytes 1.4. `-*- coding: -*-' tag 1.5. auto-coding-functions (e.g. unicad-universal-charset-detect) 1.6. file-coding-system-alist matching a filename 2. Choosing Modes 2.1. `-*- mode: -*-' tag 2.2. interpreter-mode-alist 2.3. magic-mode-alist 2.4. auto-mode-alist 2.5. magic-fallback-mode-alist -- Juri Linkov http://www.jurta.org/emacs/
owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#5553
; Package emacs
.
Full text available.Received: (at 5553) by debbugs.gnu.org; 10 Feb 2010 20:14:47 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 10 15:14:47 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1NfIxT-0002HL-49 for submit <at> debbugs.gnu.org; Wed, 10 Feb 2010 15:14:47 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <monnier@HIDDEN>) id 1NfIxQ-0002HF-Uk for 5553 <at> debbugs.gnu.org; Wed, 10 Feb 2010 15:14:45 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAM+icktLd+Rw/2dsb2JhbACaZHW/CYRVBIpv X-IronPort-AV: E=Sophos;i="4.49,446,1262581200"; d="scan'208";a="55831289" Received: from 75-119-228-112.dsl.teksavvy.com (HELO pastel.home) ([75.119.228.112]) by ironport2-out.pppoe.ca with ESMTP; 10 Feb 2010 15:14:42 -0500 Received: by pastel.home (Postfix, from userid 20848) id AC24A89D5; Wed, 10 Feb 2010 15:14:42 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> To: Juri Linkov <juri@HIDDEN> Subject: Re: bug#5553: 23.1.92; Archives with wrong coding system Message-ID: <jwvd40cyhng.fsf-monnier+emacs@HIDDEN> References: <87bpfzxana.fsf@HIDDEN> <83y6j2ca3r.fsf@HIDDEN> <87d40dvrar.fsf@HIDDEN> Date: Wed, 10 Feb 2010 15:14:42 -0500 In-Reply-To: <87d40dvrar.fsf@HIDDEN> (Juri Linkov's message of "Wed, 10 Feb 2010 02:09:56 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 5553 Cc: Eli Zaretskii <eliz@HIDDEN>, 5553 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -2.0 (--) > 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'? I think that auto-coding-alist should allow mapping not only file-names but also major modes to coding-systems. This should hopefully take care of those issues by mapping image-mode and archive-mode to no-conversion. Stefan
owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#5553
; Package emacs
.
Full text available.Received: (at 5553) by debbugs.gnu.org; 10 Feb 2010 01:04:07 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 09 20:04:07 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1Nf0zi-0005Gz-W2 for submit <at> debbugs.gnu.org; Tue, 09 Feb 2010 20:04:07 -0500 Received: from smtp-out4.starman.ee ([85.253.0.6] helo=mx2.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <juri@HIDDEN>) id 1Nf0zh-0005Go-88 for 5553 <at> debbugs.gnu.org; Tue, 09 Feb 2010 20:03:53 -0500 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Received: from mail.starman.ee (82.131.32.208.cable.starman.ee [82.131.32.208]) by mx2.starman.ee (Postfix) with ESMTP id 5FDBF3F40AA; Wed, 10 Feb 2010 03:03:44 +0200 (EET) From: Juri Linkov <juri@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#5553: 23.1.92; Archives with wrong coding system Organization: JURTA References: <87bpfzxana.fsf@HIDDEN> <83y6j2ca3r.fsf@HIDDEN> Date: Wed, 10 Feb 2010 02:09:56 +0200 In-Reply-To: <83y6j2ca3r.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 10 Feb 2010 00:34:00 +0200") Message-ID: <87d40dvrar.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 5553 Cc: 5553 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -3.0 (---) > 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/
owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#5553
; Package emacs
.
Full text available.Received: (at 5553) by debbugs.gnu.org; 9 Feb 2010 22:35:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 09 17:35:15 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1Neyfq-0003hV-SK for submit <at> debbugs.gnu.org; Tue, 09 Feb 2010 17:35:15 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <eliz@HIDDEN>) id 1Neyfb-0003gz-3M for 5553 <at> debbugs.gnu.org; Tue, 09 Feb 2010 17:35:13 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0KXL00100IJSFJ00@HIDDEN> for 5553 <at> debbugs.gnu.org; Wed, 10 Feb 2010 00:33:53 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.70.67.249]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KXL00K8DIOGWFD0@HIDDEN>; Wed, 10 Feb 2010 00:33:53 +0200 (IST) Date: Wed, 10 Feb 2010 00:34:00 +0200 From: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#5553: 23.1.92; Archives with wrong coding system In-reply-to: <87bpfzxana.fsf@HIDDEN> X-012-Sender: halo1@HIDDEN To: Juri Linkov <juri@HIDDEN> Message-id: <83y6j2ca3r.fsf@HIDDEN> References: <87bpfzxana.fsf@HIDDEN> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 5553 Cc: 5553 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii <eliz@HIDDEN> List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: Juri Linkov <juri@HIDDEN> > Date: Tue, 09 Feb 2010 23:19:27 +0200 > Cc: > > When `archive-mode' is enabled for an archive file with an unknown file > extension, using the rule ("\\(PK00\\)?[P]K\003\004" . archive-mode) > from `magic-fallback-mode-alist', visiting such a file fails with the > args-out-of-range error. > > The following patch should fix this bug using the same regexp as in > `magic-fallback-mode-alist' and the same coding system as for archive > file extensions in `auto-coding-alist': Thanks, but please provide a self-contained recipe for reproducing the problem, starting with "emacs -Q".
owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#5553
; Package emacs
.
Full text available.Received: (at 5553) by debbugs.gnu.org; 9 Feb 2010 22:25:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 09 17:25:35 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1NeyWV-0003ZV-4B for submit <at> debbugs.gnu.org; Tue, 09 Feb 2010 17:25:35 -0500 Received: from smtp-out4.starman.ee ([85.253.0.6] helo=mx2.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <juri@HIDDEN>) id 1NeyWT-0003ZP-By for 5553 <at> debbugs.gnu.org; Tue, 09 Feb 2010 17:25:33 -0500 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Received: from mail.starman.ee (82.131.55.178.cable.starman.ee [82.131.55.178]) by mx2.starman.ee (Postfix) with ESMTP id 576163F6762 for <5553 <at> debbugs.gnu.org>; Wed, 10 Feb 2010 00:23:32 +0200 (EET) From: Juri Linkov <juri@HIDDEN> To: 5553 <at> debbugs.gnu.org Subject: Re: bug#5553: 23.1.92; Archives with wrong coding system Organization: JURTA References: <87bpfzxana.fsf@HIDDEN> Date: Wed, 10 Feb 2010 00:19:35 +0200 In-Reply-To: <87bpfzxana.fsf@HIDDEN> (Juri Linkov's message of "Tue, 09 Feb 2010 23:19:27 +0200") Message-ID: <87k4umyrrh.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 5553 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -3.0 (---) > When `archive-mode' is enabled for an archive file with an unknown file > extension, using the rule ("\\(PK00\\)?[P]K\003\004" . archive-mode) > from `magic-fallback-mode-alist', visiting such a file fails with the > args-out-of-range error. > > The following patch should fix this bug using the same regexp as in > `magic-fallback-mode-alist' and the same coding system as for archive > file extensions in `auto-coding-alist': The same problem exists also for images. `magic-fallback-mode-alist' contains: (image-type-auto-detected-p . image-mode) but visiting an image file with a non-standard file extension (i.e. not in `auto-mode-alist') doesn't display it as an image. The following patch fixes this problem, but it seems duplicating image regexps from `image-type-header-regexps' is too ugly? === modified file 'lisp/international/mule.el' --- lisp/international/mule.el 2010-02-09 05:00:56 +0000 +++ lisp/international/mule.el 2010-02-09 22:16:28 +0000 @@ -1655,7 +1655,14 @@ (defcustom auto-coding-regexp-alist ("\\`\xEF\xBB\xBF" . utf-8-with-signature) ("\\`;ELC\024\0\0\0" . emacs-mule) ; Emacs 20-compiled ;; For `archive-mode' in `magic-fallback-mode-alist': - ("\\(PK00\\)?[P]K\003\004" . no-conversion-multibyte))) + ("\\(PK00\\)?[P]K\003\004" . no-conversion-multibyte) + ;; For `image-mode' in `magic-fallback-mode-alist' + ;; (regexps duplicated from `image-type-header-regexps'): + ("\\`GIF8[79]a" . no-conversion) ; gif + ("\\`\x89PNG\r\n\x1a\n" . no-conversion) ; png + ("\\`\\(?:MM\0\\*\\|II\\*\0\\)" . no-conversion) ; tiff + ("\\`\xff\xd8" . no-conversion) ; jpeg + )) "Alist of patterns vs corresponding coding systems. Each element looks like (REGEXP . CODING-SYSTEM). A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading. -- Juri Linkov http://www.jurta.org/emacs/
owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#5553
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 9 Feb 2010 21:27:53 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 09 16:27:53 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1Nexcf-0002ql-5q for submit <at> debbugs.gnu.org; Tue, 09 Feb 2010 16:27:53 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <juri@HIDDEN>) id 1Nexcd-0002qW-Sd for submit <at> debbugs.gnu.org; Tue, 09 Feb 2010 16:27:52 -0500 Received: from mail.gnu.org ([199.232.76.166]:55424 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from <juri@HIDDEN>) id 1NexcZ-0007ai-OZ for submit <at> debbugs.gnu.org; Tue, 09 Feb 2010 16:27:47 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from <juri@HIDDEN>) id 1NexcY-0000pz-5e for submit <at> debbugs.gnu.org; Tue, 09 Feb 2010 16:27:47 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,UNPARSEABLE_RELAY autolearn=ham version=3.1.0 Received: from lists.gnu.org ([199.232.76.165]:58411) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from <juri@HIDDEN>) id 1NexcY-0000pt-0i for submit <at> debbugs.gnu.org; Tue, 09 Feb 2010 16:27:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NexcX-0005dW-ED for bug-gnu-emacs@HIDDEN; Tue, 09 Feb 2010 16:27:45 -0500 Received: from [199.232.76.173] (port=39739 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NexcX-0005dM-0P for bug-gnu-emacs@HIDDEN; Tue, 09 Feb 2010 16:27:45 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from <juri@HIDDEN>) id 1NexcV-0000pl-8J for bug-gnu-emacs@HIDDEN; Tue, 09 Feb 2010 16:27:44 -0500 Received: from smtp-out4.starman.ee ([85.253.0.6]:45949 helo=mx2.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from <juri@HIDDEN>) id 1NexcU-0000pX-Ub for bug-gnu-emacs@HIDDEN; Tue, 09 Feb 2010 16:27:43 -0500 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Received: from mail.starman.ee (82.131.55.178.cable.starman.ee [82.131.55.178]) by mx2.starman.ee (Postfix) with ESMTP id 5007D3F7E60 for <bug-gnu-emacs@HIDDEN>; Tue, 9 Feb 2010 23:27:35 +0200 (EET) From: Juri Linkov <juri@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 23.1.92; Archives with wrong coding system Organization: JURTA Date: Tue, 09 Feb 2010 23:19:27 +0200 Message-ID: <87bpfzxana.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.9 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -5.0 (-----) When `archive-mode' is enabled for an archive file with an unknown file extension, using the rule ("\\(PK00\\)?[P]K\003\004" . archive-mode) from `magic-fallback-mode-alist', visiting such a file fails with the args-out-of-range error. The following patch should fix this bug using the same regexp as in `magic-fallback-mode-alist' and the same coding system as for archive file extensions in `auto-coding-alist': === modified file 'lisp/international/mule.el' --- lisp/international/mule.el 2010-02-01 22:57:45 +0000 +++ lisp/international/mule.el 2010-02-09 21:18:51 +0000 @@ -1653,7 +1653,9 @@ (defcustom auto-coding-regexp-alist ("\\`\xFE\xFF" . utf-16be-with-signature) ("\\`\xFF\xFE" . utf-16le-with-signature) ("\\`\xEF\xBB\xBF" . utf-8-with-signature) - ("\\`;ELC\024\0\0\0" . emacs-mule))) ; Emacs 20-compiled + ("\\`;ELC\024\0\0\0" . emacs-mule) ; Emacs 20-compiled + ;; For `archive-mode' in `magic-fallback-mode-alist': + ("\\(PK00\\)?[P]K\003\004" . no-conversion-multibyte))) "Alist of patterns vs corresponding coding systems. Each element looks like (REGEXP . CODING-SYSTEM). A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading. -- Juri Linkov http://www.jurta.org/emacs/
Juri Linkov <juri@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#5553
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.