From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 05 17:03:09 2012 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? From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 05 17:55:49 2012 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 From unknown Sat Sep 13 19:18:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 03 Nov 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator