GNU bug report logs - #4917
Error: Attempt to modify read-only object

Previous Next

Package: emacs;

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

Date: Fri, 13 Nov 2009 00:15:08 UTC

Severity: normal

Done: Dan Nicolaescu <dann <at> ics.uci.edu>

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 4917 in the body.
You can then email your comments to 4917 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 bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4917; Package emacs. (Fri, 13 Nov 2009 00:15:09 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 Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 13 Nov 2009 00:15:09 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Error: Attempt to modify read-only object
Date: Fri, 13 Nov 2009 02:01:37 +0200
Starting Emacs fails with the error:

  Warning (initialization): An error occurred while loading `/home/juri/.emacs':

  error: Attempt to modify read-only object

  To ensure normal operation, you should investigate and remove the
  cause of the error in your initialization file.  Start Emacs with
  the `--debug-init' option to view a complete error backtrace.

Starting Emacs with the `--debug-init' option displays:

  Debugger entered--Lisp error: (error "Attempt to modify read-only object")
    delete(("\\`\357\273\277" . utf-8-with-signature) (("\\`BABYL OPTIONS:[ 	]*-\\*-[ 	]*rmail[ 	]*-\\*-" . no-conversion) ("\\`\376\377" . utf-16be-with-signature) ("\\`\377\376" . utf-16le-with-signature) ("\\`\357\273\277" . utf-8-with-signature) ("\\`;ELC" . emacs-mule)))
    (setq auto-coding-regexp-alist (delete (rassoc ... auto-coding-regexp-alist) auto-coding-regexp-alist))

The reason of this error in .emacs is the lines that remove a match
for `utf-8-with-signature' from `auto-coding-regexp-alist' that allows
to always display the BOM (Byte-order mark signature) to be able
to remove it without the need to visit files literally:

  (setq auto-coding-regexp-alist
	(delete (rassoc 'utf-8-with-signature auto-coding-regexp-alist)
		auto-coding-regexp-alist))

Before yesterday there were no problems with this.

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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4917; Package emacs. (Fri, 13 Nov 2009 00:40:04 GMT) Full text and rfc822 format available.

Message #8 received at 4917 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: Juri Linkov <juri <at> jurta.org>
Cc: 4917 <at> debbugs.gnu.org
Subject: Re: bug#4917: Error: Attempt to modify read-only object
Date: Thu, 12 Nov 2009 16:35:06 -0800 (PST)
Juri Linkov <juri <at> jurta.org> writes:

  > Starting Emacs fails with the error:
  > 
  >   Warning (initialization): An error occurred while loading `/home/juri/.emacs':
  > 
  >   error: Attempt to modify read-only object
  > 
  >   To ensure normal operation, you should investigate and remove the
  >   cause of the error in your initialization file.  Start Emacs with
  >   the `--debug-init' option to view a complete error backtrace.
  > 
  > Starting Emacs with the `--debug-init' option displays:
  > 
  >   Debugger entered--Lisp error: (error "Attempt to modify read-only object")
  >     delete(("\\`\357\273\277" . utf-8-with-signature) (("\\`BABYL OPTIONS:[ 	]*-\\*-[ 	]*rmail[ 	]*-\\*-" . no-conversion) ("\\`\376\377" . utf-16be-with-signature) ("\\`\377\376" . utf-16le-with-signature) ("\\`\357\273\277" . utf-8-with-signature) ("\\`;ELC" . emacs-mule)))
  >     (setq auto-coding-regexp-alist (delete (rassoc ... auto-coding-regexp-alist) auto-coding-regexp-alist))
  > 
  > The reason of this error in .emacs is the lines that remove a match
  > for `utf-8-with-signature' from `auto-coding-regexp-alist' that allows
  > to always display the BOM (Byte-order mark signature) to be able
  > to remove it without the need to visit files literally:
  > 
  >   (setq auto-coding-regexp-alist
  > 	(delete (rassoc 'utf-8-with-signature auto-coding-regexp-alist)
  > 		auto-coding-regexp-alist))
  > 
  > Before yesterday there were no problems with this.

This is mine, too aggressive use of purecopy.
auto-coding-regexp-alist needs to be changed like this:

(defcustom auto-coding-regexp-alist
  (mapcar (lambda (arg) (cons (purecopy (car arg)) (cdr arg)))
  '(("\\`BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-"  . no-conversion)
[....]

I'll check it in when I get a chance.  If it's in your way, please feel
free to do it earlier.



Reply sent to Dan Nicolaescu <dann <at> ics.uci.edu>:
You have taken responsibility. (Fri, 13 Nov 2009 02:50:04 GMT) Full text and rfc822 format available.

Notification sent to Juri Linkov <juri <at> jurta.org>:
bug acknowledged by developer. (Fri, 13 Nov 2009 02:50:04 GMT) Full text and rfc822 format available.

Message #13 received at 4917-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: 4917-done <at> debbugs.gnu.org
Cc: Juri Linkov <juri <at> jurta.org>
Subject: Re: bug#4917: Error: Attempt to modify read-only object
Date: Thu, 12 Nov 2009 18:41:53 -0800 (PST)
Dan Nicolaescu <dann <at> ics.uci.edu> writes:

  > Juri Linkov <juri <at> jurta.org> writes:
  > 
  >   > Starting Emacs fails with the error:
  >   > 
  >   >   Warning (initialization): An error occurred while loading `/home/juri/.emacs':
  >   > 
  >   >   error: Attempt to modify read-only object
  >   > 
  >   >   To ensure normal operation, you should investigate and remove the
  >   >   cause of the error in your initialization file.  Start Emacs with
  >   >   the `--debug-init' option to view a complete error backtrace.
  >   > 
  >   > Starting Emacs with the `--debug-init' option displays:
  >   > 
  >   >   Debugger entered--Lisp error: (error "Attempt to modify read-only object")
  >   >     delete(("\\`\357\273\277" . utf-8-with-signature) (("\\`BABYL OPTIONS:[ 	]*-\\*-[ 	]*rmail[ 	]*-\\*-" . no-conversion) ("\\`\376\377" . utf-16be-with-signature) ("\\`\377\376" . utf-16le-with-signature) ("\\`\357\273\277" . utf-8-with-signature) ("\\`;ELC" . emacs-mule)))
  >   >     (setq auto-coding-regexp-alist (delete (rassoc ... auto-coding-regexp-alist) auto-coding-regexp-alist))
  >   > 
  >   > The reason of this error in .emacs is the lines that remove a match
  >   > for `utf-8-with-signature' from `auto-coding-regexp-alist' that allows
  >   > to always display the BOM (Byte-order mark signature) to be able
  >   > to remove it without the need to visit files literally:
  >   > 
  >   >   (setq auto-coding-regexp-alist
  >   > 	(delete (rassoc 'utf-8-with-signature auto-coding-regexp-alist)
  >   > 		auto-coding-regexp-alist))
  >   > 
  >   > Before yesterday there were no problems with this.
  > 
  > This is mine, too aggressive use of purecopy.
  > auto-coding-regexp-alist needs to be changed like this:
  > 
  > (defcustom auto-coding-regexp-alist
  >   (mapcar (lambda (arg) (cons (purecopy (car arg)) (cdr arg)))
  >   '(("\\`BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-"  . no-conversion)
  > [....]
  > 
  > I'll check it in when I get a chance.  If it's in your way, please feel
  > free to do it earlier.

Fixed.  Thanks for catching this.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Fri, 11 Dec 2009 15:24:15 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 140 days ago.

Previous Next


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