From unknown Sat Sep 13 19:18:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12581: 24.2.50: redo+ fails to modify edit menu Resent-From: Konstantinos Efstathiou Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Oct 2012 21:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12581 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 12581@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.134947098922665 (code B ref -1); Fri, 05 Oct 2012 21:04:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Oct 2012 21:03:09 +0000 Received: from localhost ([127.0.0.1]:56980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TKF37-0005tV-5s for submit@debbugs.gnu.org; Fri, 05 Oct 2012 17:03:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41646) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TKF19-0005qW-Od for submit@debbugs.gnu.org; Fri, 05 Oct 2012 17:01:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKF0r-0004sP-C2 for submit@debbugs.gnu.org; Fri, 05 Oct 2012 17:00:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:47318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKF0r-0004sL-8L for submit@debbugs.gnu.org; Fri, 05 Oct 2012 17:00:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKF0q-0006ci-BW for bug-gnu-emacs@gnu.org; Fri, 05 Oct 2012 17:00:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKF0p-0004s1-Ib for bug-gnu-emacs@gnu.org; Fri, 05 Oct 2012 17:00:48 -0400 Received: from hemel.efstathiou.gr ([178.79.145.232]:59045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKF0p-0004rn-CA for bug-gnu-emacs@gnu.org; Fri, 05 Oct 2012 17:00:47 -0400 Received: from Konstantinos Efstathiou; ESMTPSA id 1E92680A3 for ; Fri, 5 Oct 2012 23:00:44 +0200 (CEST) From: Konstantinos Efstathiou Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 5 Oct 2012 23:00:43 +0200 Message-Id: <849B42E2-D952-4D03-844C-58DCC774D86B@efstathiou.gr> X-Sent-From: konstantinos@efstathiou.gr Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-Mailer: Apple Mail (2.1499) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Mailman-Approved-At: Fri, 05 Oct 2012 17:03:07 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) In the latest versions from the repository it is impossible to load redo+.el (version 1.15 available from ELPA). The command (require 'redo+) fails with (error "Attempt to modify read-only object"). I have tracked this down to the command (setcar (cdr (memq :enable (assq 'undo menu-bar-edit-menu))) nil) that fails with the same error. Actually redo+ attempts to setcar to something else but obviously the problem is that for some reason (car (cdr (memq :enable (assq 'undo menu-bar-edit-menu))) is now read-only while it used to be modifiable. Is this a bug or expected behavior? Should redo+ be modified? From unknown Sat Sep 13 19:18:13 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Konstantinos Efstathiou Subject: bug#12581: closed (Re: bug#12581: 24.2.50: redo+ fails to modify edit menu) Message-ID: References: <849B42E2-D952-4D03-844C-58DCC774D86B@efstathiou.gr> X-Gnu-PR-Message: they-closed 12581 X-Gnu-PR-Package: emacs Reply-To: 12581@debbugs.gnu.org Date: Fri, 05 Oct 2012 21:56:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1349474162-27290-1" This is a multi-part message in MIME format... ------------=_1349474162-27290-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #12581: 24.2.50: redo+ fails to modify edit menu 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 12581@debbugs.gnu.org. --=20 12581: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12581 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1349474162-27290-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 12581-done) by debbugs.gnu.org; 5 Oct 2012 21:55:49 +0000 Received: from localhost ([127.0.0.1]:57015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TKFs5-00075n-8H for submit@debbugs.gnu.org; Fri, 05 Oct 2012 17:55:49 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:22191) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TKFs3-00075a-80 for 12581-done@debbugs.gnu.org; Fri, 05 Oct 2012 17:55:47 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxLQG/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="200767545" Received: from 69-196-180-6.dsl.teksavvy.com (HELO pastel.home) ([69.196.180.6]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 Oct 2012 17:55:28 -0400 Received: by pastel.home (Postfix, from userid 20848) id 0AB43594CB; Fri, 5 Oct 2012 17:55:27 -0400 (EDT) From: Stefan Monnier To: Konstantinos Efstathiou Subject: Re: bug#12581: 24.2.50: redo+ fails to modify edit menu Message-ID: References: <849B42E2-D952-4D03-844C-58DCC774D86B@efstathiou.gr> Date: Fri, 05 Oct 2012 17:55:27 -0400 In-Reply-To: <849B42E2-D952-4D03-844C-58DCC774D86B@efstathiou.gr> (Konstantinos Efstathiou's message of "Fri, 5 Oct 2012 23:00:43 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12581-done Cc: 12581-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) > I have tracked this down to the command > (setcar (cdr (memq :enable (assq 'undo menu-bar-edit-menu))) nil) [...] > that fails with the same error. Actually redo+ attempts to setcar to > something else but obviously the problem is that for some reason [...] > Is this a bug or expected behavior? Should redo+ be modified? It's not a bug, AFAIC. You can change redo+ to use something like: (define-key menu-bar-edit-menu [undo] ;; We use `cdr+assq' instead of `lookup-key' because lookup-key ;; would return the actual binding inside the menu-item, whereas ;; we want the whole menu-item (IOW we don't want the get_keyelt ;; part of lookup-key). We could use ;; (catch 'found ;; (map-keymap (lambda (k v) ;; (if (eq k 'undo) (throw 'found v))) ;; menu-bar-edit-menu)) ;; instead. (let ((elem (copy-sequence (cdr (assq 'undo menu-bar-edit-menu))))) (setcar (cdr (memq :enable elem)) ) elem)) -- Stefan ------------=_1349474162-27290-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 5 Oct 2012 21:03:09 +0000 Received: from localhost ([127.0.0.1]:56980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TKF37-0005tV-5s for submit@debbugs.gnu.org; Fri, 05 Oct 2012 17:03:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41646) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TKF19-0005qW-Od for submit@debbugs.gnu.org; Fri, 05 Oct 2012 17:01:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKF0r-0004sP-C2 for submit@debbugs.gnu.org; Fri, 05 Oct 2012 17:00:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:47318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKF0r-0004sL-8L for submit@debbugs.gnu.org; Fri, 05 Oct 2012 17:00:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKF0q-0006ci-BW for bug-gnu-emacs@gnu.org; Fri, 05 Oct 2012 17:00:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKF0p-0004s1-Ib for bug-gnu-emacs@gnu.org; Fri, 05 Oct 2012 17:00:48 -0400 Received: from hemel.efstathiou.gr ([178.79.145.232]:59045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKF0p-0004rn-CA for bug-gnu-emacs@gnu.org; Fri, 05 Oct 2012 17:00:47 -0400 Received: from Konstantinos Efstathiou; ESMTPSA id 1E92680A3 for ; Fri, 5 Oct 2012 23:00:44 +0200 (CEST) From: Konstantinos Efstathiou Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: 24.2.50: redo+ fails to modify edit menu Date: Fri, 5 Oct 2012 23:00:43 +0200 Message-Id: <849B42E2-D952-4D03-844C-58DCC774D86B@efstathiou.gr> X-Sent-From: konstantinos@efstathiou.gr To: bug-gnu-emacs@gnu.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-Mailer: Apple Mail (2.1499) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 05 Oct 2012 17:03:07 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) In the latest versions from the repository it is impossible to load redo+.el (version 1.15 available from ELPA). The command (require 'redo+) fails with (error "Attempt to modify read-only object"). I have tracked this down to the command (setcar (cdr (memq :enable (assq 'undo menu-bar-edit-menu))) nil) that fails with the same error. Actually redo+ attempts to setcar to something else but obviously the problem is that for some reason (car (cdr (memq :enable (assq 'undo menu-bar-edit-menu))) is now read-only while it used to be modifiable. Is this a bug or expected behavior? Should redo+ be modified? ------------=_1349474162-27290-1--