From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: On the Printing Problem Date: Thu, 2 Nov 2006 13:54:26 -0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1162504607 10828 80.91.229.2 (2 Nov 2006 21:56:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 2 Nov 2006 21:56:47 +0000 (UTC) Cc: viniciusjl@ig.com.br, rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 02 22:56:44 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GfkXP-0005m4-Sf for ged-emacs-devel@m.gmane.org; Thu, 02 Nov 2006 22:55:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GfkXP-0003qu-DF for ged-emacs-devel@m.gmane.org; Thu, 02 Nov 2006 16:55:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GfkWu-0003jF-Kr for emacs-devel@gnu.org; Thu, 02 Nov 2006 16:55:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GfkWr-0003ij-Tj for emacs-devel@gnu.org; Thu, 02 Nov 2006 16:55:20 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GfkWr-0003ig-O6 for emacs-devel@gnu.org; Thu, 02 Nov 2006 16:55:17 -0500 Original-Received: from [148.87.113.118] (helo=rgminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GfkWo-00076N-Ta; Thu, 02 Nov 2006 16:55:16 -0500 Original-Received: from rcsmt251.oracle.com (rcsmt251.oracle.com [148.87.90.196]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id kA24SZCU004651; Thu, 2 Nov 2006 14:55:10 -0700 Original-Received: from dhcp-4op11-4op12-west-130-35-178-179.us.oracle.com by rcsmt251.oracle.com with ESMTP id 2166053881162504467; Thu, 02 Nov 2006 14:54:27 -0700 Original-To: "Herbert Euler" , X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Whitelist: TRUE X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:61639 Archived-At: > >From: Vinicius Jose Latorre > >For some reason the command: > > (easy-menu-change '("file") "Print" pr-menu-spec "print-buffer") > >has no effect just after step 5. > >The command above is correct, but has no effect, that is, > >"Print" submenu is not created. > > > >But if after step 5, you do: > > 5.1 C-h v global-map RET ;; create *Help* buffer in another window > > 5.2 C-x o ;; switch to *Help* buffer > >Now, all works. Yes, there seems to be a bug there. > Herber Euler wrote: > I tried that, the evaluation of (pr-update-menus t) failed again. > > Below is what I wrote to Drew. > >... > >Please take a look at (info "(elisp) Remapping Commands"). As I replied to Herbert off list, Icicles does also use command remapping, where appropriate. There is no equivalent of the OLDMAP arg to substitute-key-definition for command remapping, and that is what is used here. Icicles simply creates another keymap that has a particular entry in the File menu. Whether Icicles adds that menu item to menu File (in the minor-mode map) using substitute-key-definition or some other way is irrelevant. This is not a problem with Icicles. The problem occurs because printing.el runs into that minor-mode map, not the global-map, when trying to look something up in submenu File > Print. It should not make any assumptions about which minor-mode and local keymaps might exist when it tries to look up submenu File > Print. It cannot simply add the Print submenu to only the global map and then traverse each active keymap (global-map last) expecting submenu Print to be found under menu File for each map. It should look only in the keymap(s) where it actually added submenu Print. If it added Print to the File menu of all existing maps, then it could look in all existing maps. (I don't claim that it should add Print to File in all maps; I claim only that it should not look for Print where it has never placed Print.)