From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Brent Goodrick Newsgroups: gmane.emacs.bugs Subject: bug#5062: 23.1.50; image-toggle-display overwrites nxml-mode local key map Date: Sat, 28 Nov 2009 07:26:13 -0800 Message-ID: References: Reply-To: Brent Goodrick , 5062@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1259423263 27254 80.91.229.12 (28 Nov 2009 15:47:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Nov 2009 15:47:43 +0000 (UTC) Cc: 5062@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 28 16:47:36 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NEPWJ-0007pe-8j for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Nov 2009 16:47:35 +0100 Original-Received: from localhost ([127.0.0.1]:34400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEPWI-0001EF-NC for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Nov 2009 10:47:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NEPWE-0001BZ-Nv for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2009 10:47:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NEPWA-00017E-3Q for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2009 10:47:30 -0500 Original-Received: from [199.232.76.173] (port=43201 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEPW9-00017B-UC for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2009 10:47:25 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:32805) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NEPW9-0003pz-IG for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2009 10:47:25 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nASFlMmC011061; Sat, 28 Nov 2009 07:47:23 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nASFU3Kv009490; Sat, 28 Nov 2009 07:30:04 -0800 Resent-Date: Sat, 28 Nov 2009 07:30:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Brent Goodrick Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 28 Nov 2009 15:30:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 5062 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5062-submit@emacsbugs.donarmstrong.com id=B5062.12594219819383 (code B ref 5062); Sat, 28 Nov 2009 15:30:03 +0000 Original-Received: (at 5062) by emacsbugs.donarmstrong.com; 28 Nov 2009 15:26:21 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail-bw0-f227.google.com (mail-bw0-f227.google.com [209.85.218.227]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nASFQJ4Y009379 for <5062@emacsbugs.donarmstrong.com>; Sat, 28 Nov 2009 07:26:20 -0800 Original-Received: by bwz27 with SMTP id 27so1752689bwz.1 for <5062@emacsbugs.donarmstrong.com>; Sat, 28 Nov 2009 07:26:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=TKPECNBHM4Ckj3LB9xn10QIF0DK53IE24AjovfkQYFs=; b=in25YbE2OAxu+0HGxZP9Jd8SL+mUQzBHQhSxM7AF70YhD3KDP636WIWm3E9PBNAslh /2GYS0n9O8s/GELaa3k9K00awszvkq9pXbkPdlg+gS4JDl9B5E5TPNaR1NYsgu4+9K25 KmdTNP6kvnshgBEL7Y1kguAfnQlX1Tmnh/uTY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=QdD2vY7p5mVmJWCpmksC8TK+yMzVtrXe2yOauCQYYu04sMx47jiBJ9oQlyIhjUYYuG OJJAEic5ReDSOZUPOIQiP4DMXQM93LUyIuHkAgDanr7S+w45BRI3N13YBmJff3iol1Y3 +lNi7Pms30Qx/qNVJxp12Co4VFTD7NprhOM4k= Original-Received: by 10.204.15.145 with SMTP id k17mr2312489bka.212.1259421973220; Sat, 28 Nov 2009 07:26:13 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 28 Nov 2009 10:47:30 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33011 Archived-At: On Fri, Nov 27, 2009 at 6:25 PM, Stefan Monnier wrote: > > > 2. Run emacs -Q and wait for it to load and map into the display. > > 3. Type C-x C-f /tmp/test.svg and see that the image of the file is > > displayed. > > 4. Type C-c C-c and note that the XML is shown. All correct behavior > > so far. > > 5. Type C-h k C-M-n and notice that the key for C-M-n is bound to > > `forward-list' which is not correct because the .svg file is a xml > > Indeed, SVG files should be handled like postscript files, i.e. use > image-minor-mode rather than image-mode. > Can someone figure out how to to do that? Hmmm, seems that image-minor-mode is enabled in this case, with a major mode of nxml-mode. But image-minor-mode ultimately calls image-toggle-display, and image-toggle-display is calling use-local-map to obliterate whatever map is already there. image-minor-mode can also call use-local-map, too. All of that arrangement seems to be set up by the image-mode-maybe function. I wonder what the correct "policy" is for a minor mode w.r.t. keybindings that can shadow a major mode? Should the major mode's keymap be the top-most local keymap, with all minor modes as parent maps of that top-most local keymap? Or is it the other way around, with each minor mode "pushing" its own local mode map to be top-most, and causing the current major modes local map to be that parent of that new one that was "pushed"? bg