From: Arni Magnusson <arnima@hafro.is>
To: 6035@debbugs.gnu.org, Dmitry Dzhus <dima@sphinx.net.ru>
Subject: bug#6035: M-x gdb crashes
Date: Tue, 6 Jul 2010 00:27:25 +0000 (UTC) [thread overview]
Message-ID: <alpine.LFD.2.00.1007052106480.22620@hafstormur.hafro.is> (raw)
In-Reply-To: <alpine.LFD.2.00.1004252212210.19779@hafstormur.hafro.is>
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.
>
next prev parent reply other threads:[~2010-07-06 0:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 1:37 bug#6035: M-x gdb crashes Arni Magnusson
2010-04-26 18:54 ` Dmitry Dzhus
2010-07-06 0:27 ` Arni Magnusson [this message]
2010-07-06 1:06 ` Lennart Borgman
2010-07-06 8:47 ` Arni Magnusson
2010-07-06 9:32 ` Lennart Borgman
2021-12-04 20:47 ` bug#6035: gud-key-prefix Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.1007052106480.22620@hafstormur.hafro.is \
--to=arnima@hafro.is \
--cc=6035@debbugs.gnu.org \
--cc=dima@sphinx.net.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).