From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#6035: M-x gdb crashes Date: Tue, 6 Jul 2010 11:32:59 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1278410407 31717 80.91.229.12 (6 Jul 2010 10:00:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Jul 2010 10:00:07 +0000 (UTC) Cc: 6035@debbugs.gnu.org, Dmitry Dzhus To: Arni Magnusson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 06 12:00:05 2010 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.69) (envelope-from ) id 1OW4wd-0007Kk-5l for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Jul 2010 12:00:03 +0200 Original-Received: from localhost ([127.0.0.1]:40065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OW4wc-0000YI-F3 for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Jul 2010 06:00:02 -0400 Original-Received: from [140.186.70.92] (port=42191 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OW4wP-0000Ww-SG for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2010 05:59:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OW4wO-0006ae-A7 for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2010 05:59:49 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52827) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OW4wO-0006aU-8q for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2010 05:59:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OW4XS-0004nc-If; Tue, 06 Jul 2010 05:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lennart Borgman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Jul 2010 09:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6035 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6035-submit@debbugs.gnu.org id=B6035.127840880518436 (code B ref 6035); Tue, 06 Jul 2010 09:34:02 +0000 Original-Received: (at 6035) by debbugs.gnu.org; 6 Jul 2010 09:33:25 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OW4Wr-0004nJ-F7 for submit@debbugs.gnu.org; Tue, 06 Jul 2010 05:33:25 -0400 Original-Received: from mail-iw0-f172.google.com ([209.85.214.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OW4Wq-0004nD-5K for 6035@debbugs.gnu.org; Tue, 06 Jul 2010 05:33:24 -0400 Original-Received: by iwn38 with SMTP id 38so712601iwn.3 for <6035@debbugs.gnu.org>; Tue, 06 Jul 2010 02:33:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=97BuzKeMr1xKThWLeb1oq2JZF2mQ40zOMP0Kxil/USI=; b=AOCgXG62qsOf3v6gqZkXKUlF0ZRk92cp8O3oNr7FlN4dfb8H3YgaM782SxVvp4BP4l x+UZCA5cqktjLyY+8++b8DC+s37yQFYfYdO7QFN1HGvk8y61SXdfGfRpmsHrz2tFjlrn yJxR1HuR7XVJu32PYf0245ZYnuwQXzyLR8cQI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=YiyCp07xKUtY3Gu3KZjS3cLLkmVyRVDNs62NZL4Lrwebgt4ThZZL1gwqIVUkWhkqwT dyq99WMcm/CIoVgPgse7MQcGGCN0sWWJVIcjnWx/NbzoQ5pdMXowvkMddi8VD9oT9M2Y EkpXDxBP0by9u9xjMWwVrWiuH4thrlp/25Q/U= Original-Received: by 10.42.9.83 with SMTP id l19mr1349662icl.35.1278408801154; Tue, 06 Jul 2010 02:33:21 -0700 (PDT) Original-Received: by 10.231.170.83 with HTTP; Tue, 6 Jul 2010 02:32:59 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 06 Jul 2010 05:34:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org 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:38256 Archived-At: Ah, my bad, C-x C-char, I thought it was C-c C-char you were looking at. C-c C-char is reserved for major modes only and should not be used by minor modes AFAICS. Yes, the manual says nothing about C-x. In my opinion it should, but others disagreed in a recent discussion. And yes, M-x gdb could use a global minor mode for the C-x C-a binding to avoid the problem: (define-key global-map "\C-x\C-a" (lambda () (interactive) (message "C-x C-a here!!"))) (defvar my-test-mode-map (let ((map (make-sparse-keymap))) (define-key map "\C-x\C-a\C-l" (lambda () (interactive) (message "C-x C-a C-l there!!"))) (define-key map "\C-l" (lambda () (interactive) (message "C-l also!!"))= ) map)) (define-minor-mode my-test-mode "Testing key binding" :global t ) On Tue, Jul 6, 2010 at 10:47 AM, Arni Magnusson wrote: > C-c C-char: reserved for major and minor modes (source: elisp manual) > > C-x C-char: free game for anyone, potential tug-of-wars between users and > modes, but no should pose no danger of crashing a mode (source: my > interpretation and experience) > > Given the nature of Emacs, some tug-of-war of keybindings can be expected= . > Many of my mode hooks, for example, rebind M-n and M-p to what I like the= m > to do, overriding what the mode author thought I might like. This is > harmless, and has not crashed any mode. The elisp manual (23.2.2) allows > major modes to use these and other keystrokes, but I'm sure many Emacs us= ers > have bound them to generic functions they find useful in all modes. > > We sound like lawyers here, but all I'm asking is whether it's easy to > prevent M-x gdb from crashing if C-x C-a is bound. If it's not easy, then= so > be it; the current error message accurately describes the quirk. > > Cheers, > > Arni > > > > On Tue, 6 Jul 2010, Lennart Borgman wrote: > >> On Tue, Jul 6, 2010 at 2:27 AM, Arni Magnusson wrote: >>> >>> I can find no warning >>> against redefining C-x C-char, such as C-x C-a. >> >> The elisp manual chapter mentioned before here >> >> =C2=A0(info "(elisp) Key Binding Conventions") >> >> says that >> >> =C2=A0* Sequences consisting of `C-c' followed by a control character or= a >> =C2=A0 =C2=A0digit are reserved for major modes. >> >> So it looks to me like GUD does follow that rule. >> >> Maybe the error message could include a link to that part of the elisp >> manual, but that would rather be a general thing in Emacs, not >> specific to GUD. >> >