GNU bug report logs - #6083
Regression bug in auto-coding-alist

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Mon, 3 May 2010 00:37:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Juri Linkov <juri <at> jurta.org>
Subject: bug#6083: closed (Re: bug#6083: Regression bug in auto-coding-alist)
Date: Mon, 03 May 2010 02:04:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#6083: Regression bug in auto-coding-alist

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 6083 <at> debbugs.gnu.org.

-- 
6083: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6083
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Chong Yidong <cyd <at> stupidchicken.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: 6083-done <at> debbugs.gnu.org
Subject: Re: bug#6083: Regression bug in auto-coding-alist
Date: Sun, 02 May 2010 22:02:59 -0400
Juri Linkov <juri <at> jurta.org> writes:

>   ;; By default, Emacs thinks .arc is an archive extension.
>   ;; This makes it normal.
>   (dolist (coding auto-coding-alist)
>     (when (and (string-match "[Aa][Rr][Cc]\\\\|" (car coding))
>                (or (eq (cdr coding) 'no-conversion)
>                    (eq (cdr coding) 'no-conversion-multibyte)))
>       (setcar coding (replace-match "" nil nil (car coding)))))
>
> This code fails with
>
>   (error "Attempt to modify read-only object")
>
> A similar bug#4917 http://debbugs.gnu.org/4917
> for `auto-coding-regexp-alist' was fixed 2009-11-13
> by using purecopy only for car or each item,
> not the whole list.
>
> To make the code above to not fail, purecopy should be removed
> from `auto-coding-alist'.

Thanks, I've fixed it in the branch.

[Message part 3 (message/rfc822, inline)]
From: Juri Linkov <juri <at> jurta.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Regression bug in auto-coding-alist
Date: Mon, 03 May 2010 03:34:00 +0300
I just discovered a regression bug wrt 23.1.

Loading arc-mode fails.

Arc-mode is a mode for the programming language Arc,
not for file archives.

It contains the following code to remove `no-conversion' associated with
the .arc extension from `auto-coding-alist' because there is a file
extension clash between Arc the programming language and file archives:

  ;; By default, Emacs thinks .arc is an archive extension.
  ;; This makes it normal.
  (dolist (coding auto-coding-alist)
    (when (and (string-match "[Aa][Rr][Cc]\\\\|" (car coding))
               (or (eq (cdr coding) 'no-conversion)
                   (eq (cdr coding) 'no-conversion-multibyte)))
      (setcar coding (replace-match "" nil nil (car coding)))))

This code fails with

  (error "Attempt to modify read-only object")

A similar bug#4917 http://debbugs.gnu.org/4917
for `auto-coding-regexp-alist' was fixed 2009-11-13
by using purecopy only for car or each item,
not the whole list.

To make the code above to not fail, purecopy should be removed
from `auto-coding-alist'.

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




This bug report was last modified 15 years and 80 days ago.

Previous Next


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