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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6083 in the body.
You can then email your comments to 6083 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6083; Package emacs. (Mon, 03 May 2010 00:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 03 May 2010 00:37:02 GMT) Full text and rfc822 format available.

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

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/





Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. (Mon, 03 May 2010 02:04:02 GMT) Full text and rfc822 format available.

Notification sent to Juri Linkov <juri <at> jurta.org>:
bug acknowledged by developer. (Mon, 03 May 2010 02:04:02 GMT) Full text and rfc822 format available.

Message #10 received at 6083-done <at> debbugs.gnu.org (full text, mbox):

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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 31 May 2010 11:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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