From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#5062: marked as done (23.1.50; image-toggle-display overwrites nxml-mode local key map) Date: Fri, 04 Dec 2009 22:00:08 +0000 Message-ID: References: <878wdixvgt.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1259964008-31132-0" X-Trace: ger.gmane.org 1259964494 30840 80.91.229.12 (4 Dec 2009 22:08:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Dec 2009 22:08:14 +0000 (UTC) To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 04 23:08:05 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 1NGgJn-0000rx-Qr for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Dec 2009 23:08:04 +0100 Original-Received: from localhost ([127.0.0.1]:51609 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGgJn-0000fG-Gb for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Dec 2009 17:08:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGgJK-0000Ii-VR for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2009 17:07:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGgJE-0000DD-Vi for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2009 17:07:33 -0500 Original-Received: from [199.232.76.173] (port=41194 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGgJE-0000Cy-S8 for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2009 17:07:28 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:57079) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NGgJE-0001Lx-65 for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2009 17:07:28 -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 nB4M7OI0032503; Fri, 4 Dec 2009 14:07:26 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nB4M08L3031174; Fri, 4 Dec 2009 14:00:08 -0800 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 5062 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:33213 Archived-At: This is a multi-part message in MIME format... ------------=_1259964008-31132-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Fri, 04 Dec 2009 23:47:30 +0200 with message-id <878wdixvgt.fsf@mail.jurta.org> and subject line Re: bug#5062: 23.1.50; image-toggle-display overwrites nxm= l-mode local key map has caused the Emacs bug report #5062, regarding 23.1.50; image-toggle-display overwrites nxml-mode local key map to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 5062: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D5062 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1259964008-31132-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 28 Nov 2009 00:44:36 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.9 required=4.0 tests=AWL,FOURLA,FVGT_m_MULTI_ODD autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAS0iYwe019529 for ; Fri, 27 Nov 2009 16:44:35 -0800 Received: from mx10.gnu.org ([199.232.76.166]:38389) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1NEBQP-0007JP-Sg for emacs-pretest-bug@gnu.org; Fri, 27 Nov 2009 19:44:34 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NEBQO-0007c6-B3 for emacs-pretest-bug@gnu.org; Fri, 27 Nov 2009 19:44:33 -0500 Received: from mail-bw0-f215.google.com ([209.85.218.215]:53031) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NEBQN-0007bs-T5 for emacs-pretest-bug@gnu.org; Fri, 27 Nov 2009 19:44:32 -0500 Received: by bwz7 with SMTP id 7so768807bwz.26 for ; Fri, 27 Nov 2009 16:44:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=YRJl5EjRw/eBqVwSfjuMghhCOFebK734CvWRRZeOYkU=; b=XKDfAaHnqVPpRPGSNU4GaTUBOBk/r0M06G2NqTlqND06D7HehlxfPU41o6s1uqZ71y j6o3LUHmUO558q1FQHWDYj/ySHq3tGbDn6xpsnKRBjQcQ/zmH2OYj7hqH8fJ+NMyIcV8 9exiuPvrfrKbITE+zet3KnxA12LaHVZF13cUk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Bm47T/67TCy750JphoA9bImUl/HX/nhxKzSN32Q0xK8/0C4MEN73omZwCpLxCYqCXo HaUzu5Rzz6Mf6btvkf+YaGH3RNxGjZmXyJb+7N5fD0xT27K1YnBhJ1oyDlDpbMSuBhlK BJWlFrb7Z3CTUlXFcwgry6P2QgqQT7/MVvL8A= MIME-Version: 1.0 Received: by 10.204.152.154 with SMTP id g26mr1745214bkw.54.1259369070066; Fri, 27 Nov 2009 16:44:30 -0800 (PST) Date: Fri, 27 Nov 2009 16:44:30 -0800 Message-ID: Subject: 23.1.50; image-toggle-display overwrites nxml-mode local key map From: Brent Goodrick To: emacs-pretest-bug@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': Insure that you have Emacs 23 built on Debian Squeeze Linux with librsvg2 library (or similar OS's and libraries), just to get the image-mode to interact with nxml-mode in its keybindings for a .svg file which is an XML derivative for SVG files. Then proceed as follows: 1. Store the following XML content into a file called /tmp/test.svg --- cut below this line --- Sample Title Sample Description 10px 1px --- cut above this line --- 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 file, that, by default, should be bound to `nxml-forward-element' by the defvar for nxml-mode-map inside share/emacs/23.1.50/lisp/nxml/nxml-mode.el.gz. Notice also that nxml-mode applies its own local map with this call inside the `nxml-mode' function: (use-local-map nxml-mode-map) But compare that with `image-toggle-display' where it either calls: (use-local-map image-mode-text-map) or (use-local-map image-mode-map) Neither of which respects the nxml-mode's bindings. For validation, you can inject a "trampoline" function on `use-local-map' to show who overwrites the local map, as follows: (progn (defun xx-new-use-local-map (&rest args) (message "xx-new-use-local-map called from:\n") (backtrace) (apply xx-orig-use-local-map args)) (when (not (boundp 'xx-orig-use-local-map)) (setq xx-orig-use-local-map (symbol-function 'use-local-map)) (fset 'use-local-map 'xx-new-use-local-map))) where the "xx-*" functions were arbitrary for this bug report. Once xx-new-use-local-map is injected as given above, then use C-h C-e to see what happens when you first execute C-x C-f /tmp/test.svg, and then see it again when hitting C-c C-c while in the test.svg buffer. You will see that image-mode function obliterates the local map set by the `nxml-mode' function. I don't know what the correct solution here should be, and many questions arise: a. Should image-mode be a minor mode of nxml-mode, or, b. Should `image-mode' stash a copy of the current buffers (current-local-map), and restore it afterwards, but also applying the special binding for C-c C-c, or, c. Should `image-mode' make the other modes local map be the parent of its own local map? I'm thinking (c)? Thanks to whomever added SVG capabilities to Emacs! bgoodr If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /home/brentg/install/Linux.x86_64/share/emacs/23.1.50/etc/DEBUG. Emacs did not crash. In GNU Emacs 23.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.2) of 2009-10-31 on hungover Windowing system distributor `The X.Org Foundation', version 11.0.10605000 configured using `configure '--with-x-toolkit' '--with-xft' '--prefix=/home/brentg/install/Linux.x86_64'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: nXML Minor modes in effect: image-minor-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x C-f C-v / t m p / C-x h C-b C-b C-b C-g C-x C-f C-SPC M-b C-b / t m p C-d C-d C-d C-d C-d / t e s t . s v g C-v C-x C-s C-x C-v C-c C-c C-h k C-M-n M-x r e p o r t - e m Recent messages: File mode specification error: (error "Cannot determine image type") call-interactively: End of buffer Mark set Saving file /tmp/test.svg... Wrote /tmp/test.svg Using vacuous schema Type C-c C-c to view the image as text. Repeat this command to go back to displaying the image Type C-x 1 to delete the help window. Load-path shadows: None found. Features: (shadow mail-extr message ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug sendmail help-fns help-mode view nxml-uchnm rng-xsd xsd-regexp rng-cmpct regexp-opt rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns easymenu nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok cl cl-19 jka-compr image-mode tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gtk x-toolkit x multi-tty emacs) ------------=_1259964008-31132-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 5062-done) by emacsbugs.donarmstrong.com; 4 Dec 2009 21:50:44 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx2.starman.ee (smtp-out4.starman.ee [85.253.0.6]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB4LogSE030614 for <5062-done@emacsbugs.donarmstrong.com>; Fri, 4 Dec 2009 13:50:43 -0800 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Received: from mail.starman.ee (82.131.30.133.cable.starman.ee [82.131.30.133]) by mx2.starman.ee (Postfix) with ESMTP id AA0393F410B; Fri, 4 Dec 2009 23:50:35 +0200 (EET) From: Juri Linkov To: Stefan Monnier Cc: 5062-done@emacsbugs.donarmstrong.com, Brent Goodrick Subject: Re: bug#5062: 23.1.50; image-toggle-display overwrites nxml-mode local key map Organization: JURTA References: <87einifskr.fsf@mail.jurta.org> <87bpim8d5b.fsf@mail.jurta.org> <87fx7x5np9.fsf@mail.jurta.org> <87hbs8zx0u.fsf@mail.jurta.org> Date: Fri, 04 Dec 2009 23:47:30 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 02 Dec 2009 22:28:15 -0500") Message-ID: <878wdixvgt.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> If this is ok, I'm ready to update docstrings and commit. > > Looks good, thank you, Done. -- Juri Linkov http://www.jurta.org/emacs/ ------------=_1259964008-31132-0--