From unknown Mon Aug 18 06:58:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6035: M-x gdb crashes Resent-From: Arni Magnusson Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Apr 2010 01:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6035 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6035@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.12722458777709 (code B ref -1); Mon, 26 Apr 2010 01:38:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Apr 2010 01:37:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6DGm-00020I-O7 for submit@debbugs.gnu.org; Sun, 25 Apr 2010 21:37:56 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6DGk-00020A-U5 for submit@debbugs.gnu.org; Sun, 25 Apr 2010 21:37:55 -0400 Received: from lists.gnu.org ([199.232.76.165]:52514) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O6DGh-00014R-4S for submit@debbugs.gnu.org; Sun, 25 Apr 2010 21:37:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6DGg-0002Dn-Qk for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2010 21:37:50 -0400 Received: from [140.186.70.92] (port=48418 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6DGe-0002CV-EM for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2010 21:37:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6DGc-0005j3-Tq for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2010 21:37:47 -0400 Received: from hafgarpur.hafro.is ([130.208.64.48]:48804) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6DGc-0005if-FL for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2010 21:37:46 -0400 X-Virus-Scanned: amavisd-new at hafro.is Received: from hafstormur.hafro.is (hafstormur [130.208.66.52]) by hafgarpur.hafro.is (8.14.2/8.14.2/hafro-2.46) with ESMTP id o3Q1bapM022803 for ; Mon, 26 Apr 2010 01:37:37 GMT Received: from hafstormur.hafro.is (localhost [127.0.0.1]) by hafstormur.hafro.is (8.14.3/8.14.3/hafro-1.6) with ESMTP id o3Q1ba4R020647 for ; Mon, 26 Apr 2010 01:37:36 GMT Received: from localhost (arnima@localhost) by hafstormur.hafro.is (8.14.3/8.14.3/hafro-0.3) with ESMTP id o3Q1bZBY020642 for ; Mon, 26 Apr 2010 01:37:36 GMT X-Authentication-Warning: hafstormur.hafro.is: arnima owned process doing -bs Date: Mon, 26 Apr 2010 01:37:35 +0000 (GMT) From: Arni Magnusson Message-ID: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.6 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -6.6 (------) When there is no .emacs file, M-x gdb works fine. When the .emacs file defines a keybinding for C-x C-a, for example, (global-set-key [?\C-x ?\C-a] 'align) then M-x gdb crashes with the following error message: Key sequence C-x C-a C-l starts with non-prefix key C-x C-a The Emacs documentation indicates that users are allowed to bind C-x C- keystrokes to functions that they use in their work. Most likely, M-x gdb can be implemented so that it doesn't crash with the above example. Arni From unknown Mon Aug 18 06:58:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6035: M-x gdb crashes In-Reply-To: Resent-From: Dmitry Dzhus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Apr 2010 18:59: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: To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.12723082849986 (code B ref -1); Mon, 26 Apr 2010 18:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Apr 2010 18:58:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6TVL-0002b1-Rw for submit@debbugs.gnu.org; Mon, 26 Apr 2010 14:58:04 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6TTw-0002Zp-U9 for submit@debbugs.gnu.org; Mon, 26 Apr 2010 14:56:38 -0400 Received: from lists.gnu.org ([199.232.76.165]:47295) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O6TTs-0007Lm-41 for submit@debbugs.gnu.org; Mon, 26 Apr 2010 14:56:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6TTr-0000uq-AN for bug-gnu-emacs@gnu.org; Mon, 26 Apr 2010 14:56:31 -0400 Received: from [140.186.70.92] (port=55606 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6TTn-0000qu-VR for bug-gnu-emacs@gnu.org; Mon, 26 Apr 2010 14:56:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6TTh-0000Fo-NX for bug-gnu-emacs@gnu.org; Mon, 26 Apr 2010 14:56:27 -0400 Received: from lo.gmane.org ([80.91.229.12]:59120) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6TTh-0000FW-HS for bug-gnu-emacs@gnu.org; Mon, 26 Apr 2010 14:56:21 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1O6TTd-00016d-38 for bug-gnu-emacs@gnu.org; Mon, 26 Apr 2010 20:56:17 +0200 Received: from 93-80-94-4.broadband.corbina.ru ([93.80.94.4]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Apr 2010 20:56:17 +0200 Received: from dima by 93-80-94-4.broadband.corbina.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Apr 2010 20:56:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory From: Dmitry Dzhus Date: Mon, 26 Apr 2010 22:54:48 +0400 Lines: 31 Message-ID: <87k4ru6o3r.fsf@sphinx.net.ru> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 93-80-94-4.broadband.corbina.ru User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Pr/hw7WlC4KHqjjxthv+GnrgjW8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Mailman-Approved-At: Mon, 26 Apr 2010 14:58:02 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -5.9 (-----) Arni Magnusson wrote: > When there is no .emacs file, M-x gdb works fine. > > When the .emacs file defines a keybinding for C-x C-a, for example, > > (global-set-key [?\C-x ?\C-a] 'align) > > then M-x gdb crashes with the following error message: > > Key sequence C-x C-a C-l starts with non-prefix key C-x C-a > C-x C-a is GUD prefix. gdb-mi.el is based on GUD, so it uses its keybindings too. > The Emacs documentation indicates that users are allowed to bind C-x > C- > keystrokes to functions that they use in their work. Which section of Emacs manual says that? `C-c LETTER` keyspace is reserved for users' needs, as stated in section «D.2 Key binding conventions» of Emacs Lisp manual. You can type C-x C-h and see that pretty much of C-x C- keychords are already occupied by default global bindings. -- Happy Hacking. http://sphinx.net.ru む From unknown Mon Aug 18 06:58:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6035: M-x gdb crashes References: In-Reply-To: Resent-From: Arni Magnusson 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 00:28:01 +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: To: 6035@debbugs.gnu.org, Dmitry Dzhus Received: via spool by 6035-submit@debbugs.gnu.org id=B6035.1278376057598 (code B ref 6035); Tue, 06 Jul 2010 00:28:01 +0000 Received: (at 6035) by debbugs.gnu.org; 6 Jul 2010 00:27:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVw0e-00009b-L9 for submit@debbugs.gnu.org; Mon, 05 Jul 2010 20:27:36 -0400 Received: from hafgarpur.hafro.is ([130.208.64.48]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVw0b-00009V-NH for 6035@debbugs.gnu.org; Mon, 05 Jul 2010 20:27:35 -0400 X-Virus-Scanned: amavisd-new at hafro.is Received: from hafstormur.hafro.is (hafstormur [130.208.66.52]) by hafgarpur.hafro.is (8.14.2/8.14.2/hafro-2.46) with ESMTP id o660RQaY000709; Tue, 6 Jul 2010 00:27:27 GMT Received: from hafstormur.hafro.is (localhost [127.0.0.1]) by hafstormur.hafro.is (8.14.3/8.14.3/hafro-1.6) with ESMTP id o660RQw0023431; Tue, 6 Jul 2010 00:27:26 GMT Received: from localhost (arnima@localhost) by hafstormur.hafro.is (8.14.3/8.14.3/hafro-0.3) with ESMTP id o660RPHK023426; Tue, 6 Jul 2010 00:27:26 GMT X-Authentication-Warning: hafstormur.hafro.is: arnima owned process doing -bs Date: Tue, 6 Jul 2010 00:27:25 +0000 (UTC) From: Arni Magnusson Message-ID: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.7 (---) Thank you Dmitry, for the feedback. As a maintainer of two major modes, I'm familiar with the keybinding conventions that you mention. My interpretation of the conventions is that Emacs developers should try to use C-c C-char when providing keybindings for their modes. Emacs users, on the other hand, are not restricted when binding any keystroke to any command. This is what makes Emacs such an efficient working environment: users customize all keybindings to their liking, and everything just work. The worst thing that can happen is that a command is not available with the keystroke that the developer intended, but the command is still available as M-x foo, and can also be bound to whatever keystroke the user finds practical. In my experience, all modes load and work fine, regardless of the keybindings in my .emacs file. The only exception is `gdb' and C-x C-a. The Emacs Manual demonstrates how users can rebind keystrokes like C-x l, overriding the default binding of that keystroke. I can find no warning against redefining C-x C-char, such as C-x C-a. The default Emacs keybindings are suggestions, not set in stone. I realize gud-mode is big, and that it provides keybindings beyond the standard C-c C-char range that most modes use. But I hope that its robustness can be improved, providing C-x C-a rather than depending on it, so that it loads and runs even if users have redefined the C-x C-a key in their .emacs file. Cheers, Arni On Mon, 26 Apr 2010, Dmitry Dzhus wrote: > Arni Magnusson wrote: > >> When there is no .emacs file, M-x gdb works fine. >> >> When the .emacs file defines a keybinding for C-x C-a, for example, >> >> (global-set-key [?\C-x ?\C-a] 'align) >> >> then M-x gdb crashes with the following error message: >> >> Key sequence C-x C-a C-l starts with non-prefix key C-x C-a > > > C-x C-a is GUD prefix. gdb-mi.el is based on GUD, so it uses its > keybindings too. > >> The Emacs documentation indicates that users are allowed to bind C-x C- >> keystrokes to functions that they use in their work. > > Which section of Emacs manual says that? > > `C-c LETTER` keyspace is reserved for users' needs, as stated in section > D.2 Key binding conventions of Emacs Lisp manual. > > You can type C-x C-h and see that pretty much of C-x C- keychords are > already occupied by default global bindings. > > -- > > Happy Hacking. > From unknown Mon Aug 18 06:58:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6035: M-x gdb crashes 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 01:08: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: To: Arni Magnusson Cc: 6035@debbugs.gnu.org, Dmitry Dzhus Received: via spool by 6035-submit@debbugs.gnu.org id=B6035.12783784442113 (code B ref 6035); Tue, 06 Jul 2010 01:08:02 +0000 Received: (at 6035) by debbugs.gnu.org; 6 Jul 2010 01:07:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVwdA-0000Y2-J6 for submit@debbugs.gnu.org; Mon, 05 Jul 2010 21:07:24 -0400 Received: from mail-ew0-f44.google.com ([209.85.215.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVwd8-0000Xu-PR for 6035@debbugs.gnu.org; Mon, 05 Jul 2010 21:07:23 -0400 Received: by ewy22 with SMTP id 22so1681994ewy.3 for <6035@debbugs.gnu.org>; Mon, 05 Jul 2010 18:07:18 -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; bh=hXW9Exaaowjx2qWNSd1HyxMWkpKVdhMxoGcOJkDctxI=; b=t9PIxCj7D9cJ3LJcmb+Kw0ExAP7aUCEsrjE7Hstb+nDVP2/z8WLEmptPUr/Jl8bxAw iUL+mYZSkF8fc839nDYsvRn7Z+cQ5dWc+N2ghDB7Zl8y6yTpbj7hBgd74v5qpAN0gqq/ axBL3eJ8UtU9oRpIwc2AgXZaFZZ28G2h9ojvk= 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; b=Tn+c3IyWk+Fy+759tTpq9tkJshfVjeRcGz+g8sef1CV/derT7PImpQuR+nq/ItKARP tCPgqXvgbsiGI5WEc/CMgw1tl41vJeRwfH8XDt4wrk9gLTa57j/NMWSoOcdwidwX6cVy kaDsktMcBYK0AOuBhi/nMb9NRcTK2Md9tKahw= Received: by 10.213.2.204 with SMTP id 12mr3164449ebk.4.1278378438507; Mon, 05 Jul 2010 18:07:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.15.132 with HTTP; Mon, 5 Jul 2010 18:06:58 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Tue, 6 Jul 2010 03:06:58 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.9 (--) 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 (info "(elisp) Key Binding Conventions") says that * Sequences consisting of `C-c' followed by a control character or a digit 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. From unknown Mon Aug 18 06:58:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6035: M-x gdb crashes Resent-From: Arni Magnusson 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 08:48:01 +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: To: Lennart Borgman Cc: 6035@debbugs.gnu.org, Dmitry Dzhus Received: via spool by 6035-submit@debbugs.gnu.org id=B6035.127840605017236 (code B ref 6035); Tue, 06 Jul 2010 08:48:01 +0000 Received: (at 6035) by debbugs.gnu.org; 6 Jul 2010 08:47:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OW3oP-0004Tx-O1 for submit@debbugs.gnu.org; Tue, 06 Jul 2010 04:47:30 -0400 Received: from hafgarpur.hafro.is ([130.208.64.48]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OW3oN-0004Tq-Gi for 6035@debbugs.gnu.org; Tue, 06 Jul 2010 04:47:28 -0400 X-Virus-Scanned: amavisd-new at hafro.is Received: from hafstormur.hafro.is (hafstormur [130.208.66.52]) by hafgarpur.hafro.is (8.14.2/8.14.2/hafro-2.46) with ESMTP id o668lLol007144; Tue, 6 Jul 2010 08:47:21 GMT Received: from hafstormur.hafro.is (localhost [127.0.0.1]) by hafstormur.hafro.is (8.14.3/8.14.3/hafro-1.6) with ESMTP id o668lL9g025266; Tue, 6 Jul 2010 08:47:21 GMT Received: from localhost (arnima@localhost) by hafstormur.hafro.is (8.14.3/8.14.3/hafro-0.3) with ESMTP id o668lKK2025261; Tue, 6 Jul 2010 08:47:20 GMT X-Authentication-Warning: hafstormur.hafro.is: arnima owned process doing -bs Date: Tue, 6 Jul 2010 08:47:20 +0000 (GMT) From: Arni Magnusson In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.4 (---) 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 them 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 users 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 > > (info "(elisp) Key Binding Conventions") > > says that > > * Sequences consisting of `C-c' followed by a control character or a > digit 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. > From unknown Mon Aug 18 06:58:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6035: M-x gdb crashes 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: To: Arni Magnusson Cc: 6035@debbugs.gnu.org, Dmitry Dzhus Received: via spool by 6035-submit@debbugs.gnu.org id=B6035.127840880518436 (code B ref 6035); Tue, 06 Jul 2010 09:34:02 +0000 Received: (at 6035) by debbugs.gnu.org; 6 Jul 2010 09:33:25 +0000 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 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 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= Received: by 10.42.9.83 with SMTP id l19mr1349662icl.35.1278408801154; Tue, 06 Jul 2010 02:33:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.170.83 with HTTP; Tue, 6 Jul 2010 02:32:59 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Tue, 6 Jul 2010 11:32:59 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.9 (--) 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. >> > From unknown Mon Aug 18 06:58:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6035: gud-key-prefix Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Dec 2021 20:48:01 +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: To: Lennart Borgman Cc: Arni Magnusson , 6035@debbugs.gnu.org, Dmitry Dzhus Received: via spool by 6035-submit@debbugs.gnu.org id=B6035.163865083711724 (code B ref 6035); Sat, 04 Dec 2021 20:48:01 +0000 Received: (at 6035) by debbugs.gnu.org; 4 Dec 2021 20:47:17 +0000 Received: from localhost ([127.0.0.1]:55182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtbwD-00032p-Hb for submit@debbugs.gnu.org; Sat, 04 Dec 2021 15:47:17 -0500 Received: from quimby.gnus.org ([95.216.78.240]:41142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtbwB-0002xW-Rg for 6035@debbugs.gnu.org; Sat, 04 Dec 2021 15:47:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VD1+Lbi6vQKkkocKYZ5ocfrjuUPMMa0JIpwEtyWy3Tg=; b=Dba8UhpBqWuL63dqKIZXoDV6cz OQNVvvT2pWTv9Pv86tnT0UD8klqWe2of9J+RlLd1ZKO86C/WTu78BmnXKhfAg2tRK3DY6mABR73VT r1x1SwGmi2WgFmAXlzBKY0M/Mwe1Jdpp5Jid58EKplpvzJdlJE64SoIHyBwUY8aaEXr0=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtbw2-0000Kr-6A; Sat, 04 Dec 2021 21:47:09 +0100 From: Lars Ingebrigtsen References: X-Now-Playing: King Crimson's _USA_: "Exiles" Date: Sat, 04 Dec 2021 21:47:05 +0100 In-Reply-To: (Lennart Borgman's message of "Tue, 6 Jul 2010 11:32:59 +0200") Message-ID: <87k0gk2j3q.fsf_-_@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: (I'm going through old bug reports that unfortunately weren't resolved at the time.) Lennart Borgman writes: > Yes, the manual says nothing about C-x. In my opinion it should, but > others disagreed in a recent discussion. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) (I'm going through old bug reports that unfortunately weren't resolved at the time.) Lennart Borgman writes: > Yes, the manual says nothing about C-x. In my opinion it should, but > others disagreed in a recent discussion. Yes, there's no rules for binding things under `C-x' -- the users can do that, but modes are free to bind them, too, which is what gdb does. > 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!!"))) I don't think a mode here is necessary -- just defining a submap the normal way should be sufficient. So I've now done that in Emacs 29, which makes the test case no longer bug out. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 04 15:47:20 2021 Received: (at control) by debbugs.gnu.org; 4 Dec 2021 20:47:21 +0000 Received: from localhost ([127.0.0.1]:55185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtbwG-00035K-OG for submit@debbugs.gnu.org; Sat, 04 Dec 2021 15:47:20 -0500 Received: from quimby.gnus.org ([95.216.78.240]:41156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtbwF-000300-99 for control@debbugs.gnu.org; Sat, 04 Dec 2021 15:47:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=lbYiWdShj/B/E8m4YlHLyHaDpllhwyHELVqga/6PCHw=; b=ZoiXKsY84ZDlmjzyTaKJjv1qzw U7C+QWyr+uPZ2jNSn7NtHvT3soxfPYzfMHBdEUlus1aEp7qoi3axXDpRLywR7mJE3hGNOFPsrsOY1 d47bSS9Wnbs/ea1aXCfB/WXo8pG6PcB24qBcppz6wC0xeT0/aXSWEu9l9Ka9IhnYZPJk=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtbw7-0000Kz-HT for control@debbugs.gnu.org; Sat, 04 Dec 2021 21:47:13 +0100 Date: Sat, 04 Dec 2021 21:47:11 +0100 Message-Id: <87ilw42j3k.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #6035 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 6035 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 6035 29.1 quit