GNU bug report logs - #18786
(error "Attempt to modify read-only object" (("\\.txz\\'" . tar-mode))) on adding mode

Previous Next

Package: emacs;

Reported by: Boyan Penkov <boyan.penkov <at> gmail.com>

Date: Tue, 21 Oct 2014 13:42:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

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 18786 in the body.
You can then email your comments to 18786 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-gnu-emacs <at> gnu.org:
bug#18786; Package emacs. (Tue, 21 Oct 2014 13:42:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Boyan Penkov <boyan.penkov <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 21 Oct 2014 13:42:03 GMT) Full text and rfc822 format available.

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

From: Boyan Penkov <boyan.penkov <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: (error "Attempt to modify read-only object" (("\\.txz\\'" .
 tar-mode))) on adding mode
Date: Tue, 21 Oct 2014 09:34:10 -0400
Hey folks,

I have a bunch of stuff like: 

    (nconc auto-mode-alist '(("\\.ctl" . scheme-mode))))

in my .emacs.  

When I launch emacs, the complaint is:

error: Attempt to modify read-only object, ((\.txz\' . tar-mode))

Clearing all the auto-mode-alist additions clears this error, by pulling them out of the .emacs.  Can anybody explain what is going on?

This has emerged after upgrading last night to 24.4 using both http://emacsformacosx.com/ and compiling for myself via homebrew.  I’m on Mac OS 10.10 Yosemite.

Please let me know how to help debug this.

Cheers!

--
Boyan Penkov
www.boyanpenkov.com





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18786; Package emacs. (Tue, 21 Oct 2014 15:21:01 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> suse.de>
To: Boyan Penkov <boyan.penkov <at> gmail.com>
Cc: 18786 <at> debbugs.gnu.org
Subject: Re: bug#18786: (error "Attempt to modify read-only object"
 (("\\.txz\\'" . tar-mode))) on adding mode
Date: Tue, 21 Oct 2014 17:20:03 +0200
Boyan Penkov <boyan.penkov <at> gmail.com> writes:

> I have a bunch of stuff like: 
>
>     (nconc auto-mode-alist '(("\\.ctl" . scheme-mode))))
>
> in my .emacs.  

Don't use destructive functions unless you know what you are doing.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18786; Package emacs. (Tue, 21 Oct 2014 15:47:01 GMT) Full text and rfc822 format available.

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

From: Boyan Penkov <boyan.penkov <at> gmail.com>
To: Andreas Schwab <schwab <at> suse.de>
Cc: 18786 <at> debbugs.gnu.org
Subject: Re: bug#18786: (error "Attempt to modify read-only object"
 (("\\.txz\\'" . tar-mode))) on adding mode
Date: Tue, 21 Oct 2014 11:46:34 -0400
[Message part 1 (text/plain, inline)]
--
Boyan Penkov
www.boyanpenkov.com

> On Oct 21, 2014, at 11:20 AM, Andreas Schwab <schwab <at> suse.de> wrote:
> 
> Boyan Penkov <boyan.penkov <at> gmail.com> writes:
> 
>> I have a bunch of stuff like: 
>> 
>>    (nconc auto-mode-alist '(("\\.ctl" . scheme-mode))))
>> 
>> in my .emacs.  
> 
> Don't use destructive functions unless you know what you are doing.

Yeah, predictably, emacs is fine and I’m the idiot: nconc’s have been replaced with add-to-list, documentation read and lesson learned.

Thanks for the pointer!

> 
> Andreas.
> 
> -- 
> Andreas Schwab, SUSE Labs, schwab <at> suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18786; Package emacs. (Tue, 21 Oct 2014 16:40:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Boyan Penkov <boyan.penkov <at> gmail.com>
Cc: 18786 <at> debbugs.gnu.org
Subject: Re: bug#18786: (error "Attempt to modify read-only object"
 (("\\.txz\\'" . tar-mode))) on adding mode
Date: Tue, 21 Oct 2014 12:39:40 -0400
>     (nconc auto-mode-alist '(("\\.ctl" . scheme-mode))))

Try
  (add-to-list 'auto-mode-alist '("\\.ctl\\'" . scheme-mode))


-- Stefan




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Tue, 21 Oct 2014 18:03:02 GMT) Full text and rfc822 format available.

Notification sent to Boyan Penkov <boyan.penkov <at> gmail.com>:
bug acknowledged by developer. (Tue, 21 Oct 2014 18:03:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 18786-done <at> debbugs.gnu.org
Subject: Re: bug#18786: (error "Attempt to modify read-only object"
 (("\\.txz\\'" . tar-mode))) on adding mode
Date: Tue, 21 Oct 2014 14:02:37 -0400
> Thanks for the pointer!

You're welcome, closed,


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 19 Nov 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 267 days ago.

Previous Next


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