GNU bug report logs - #8317
Subject: 24.0.50; sh-script.el took my key

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> online.de>

Date: Tue, 22 Mar 2011 08:14:01 UTC

Severity: minor

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8317 in the body.
You can then email your comments to 8317 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8317; Package emacs. (Tue, 22 Mar 2011 08:14:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Röhler <andreas.roehler <at> online.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 22 Mar 2011 08:14:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> online.de>
To: bug-gnu-emacs <at> gnu.org
Subject: Subject: 24.0.50; sh-script.el took my key
Date: Tue, 22 Mar 2011 09:18:57 +0100
Hi,

having defined "C-c (" onto some useful function here,
when in Shell-script mode `sh-function` took it.

Seems bad, as "C-c" should be a reserved key for users.

Seeing the are some more issues of this kind at place.

BTW simply commenting out these keys should be a good choice. Usually 
prefer to define keys myself.

Thanks all

Andreas

;;;;;;;;;;;;;;;;;;;

C-c ( runs the command sh-function, which is an interactive compiled
Lisp function in `sh-script.el'.

It is bound to C-c (, <menu-bar> <sh-script> <sh-function>.

(sh-function &optional STR ARG)


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/dresden/emacs-20110321/etc/DEBUG.


In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.18.6)
 of 2011-03-21
Windowing system distributor `The X.Org Foundation', version 11.0.10605000
configured using `configure  '--without-makeinfo' 'CFLAGS=-g -O2 
-fno-optimize-sibling-calls''

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: de_DE.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Shell-script

Minor modes in effect:
  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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<up> <return> <help-echo> <help-echo> C-x C-f <M-backspace>
<M-backspace> <M-backspace> p r o g a r <tab> b u b
<backspace> <backspace> i n / a n s t r <backspace>
i t <backspace> s t <tab> <backspace> <backspace> <backspace>
<backspace> t i f t <return> M-> C-c ) C-c ( C-g M-x
r r e p o <backspace> <backspace> <backspace> <backspace>
e p o r t - e m a c s - b u <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Setting up indent for shell type bash
setting up indent stuff
Indentation variables are now local.
Indentation setup for shell type bash
Mark set
Quit

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message sendmail format-spec rfc822 mml easymenu
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev mail-utils gmm-utils mailheader emacsbug url-util
url-parse auth-source eieio byte-opt bytecomp byte-compile assoc
gnus-util time-date password-cache url-vars mm-util mail-prsvr skeleton
vc-rcs regexp-opt sh-script executable 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
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 files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8317; Package emacs. (Tue, 22 Mar 2011 09:39:02 GMT) Full text and rfc822 format available.

Message #8 received at 8317 <at> debbugs.gnu.org (full text, mbox):

From: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>
To: Andreas Röhler <andreas.roehler <at> online.de>
Cc: 8317 <at> debbugs.gnu.org
Subject: Re: bug#8317: Subject: 24.0.50; sh-script.el took my key
Date: Tue, 22 Mar 2011 10:38:07 +0100
2011/3/22 Andreas Röhler <andreas.roehler <at> online.de>:
> Hi,
>
> having defined "C-c (" onto some useful function here,
> when in Shell-script mode `sh-function` took it.
>
> Seems bad, as "C-c" should be a reserved key for users.
>

Only C-c <letter> bindings are reserved for users.

-- 
Deniz Dogan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8317; Package emacs. (Tue, 22 Mar 2011 09:56:02 GMT) Full text and rfc822 format available.

Message #11 received at 8317 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Andreas Röhler <andreas.roehler <at> online.de>
Cc: 8317 <at> debbugs.gnu.org
Subject: Re: bug#8317: Subject: 24.0.50; sh-script.el took my key
Date: Tue, 22 Mar 2011 10:55:29 +0100
Andreas Röhler <andreas.roehler <at> online.de> writes:

> having defined "C-c (" onto some useful function here,
> when in Shell-script mode `sh-function` took it.
>
> Seems bad, as "C-c" should be a reserved key for users.

*Note (elisp) Major Mode Conventions::

   * The key sequences bound in a major mode keymap should usually
     start with `C-c', followed by a control character, a digit, or `{',
     `}', `<', `>', `:' or `;'.  The other punctuation characters are
     reserved for minor modes, and ordinary letters are reserved for
     users.

So while C-c ( should not be bound by a major mode, it can still be
bound by a minor mode, and you should move your binding to a letter.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8317; Package emacs. (Tue, 22 Mar 2011 10:13:02 GMT) Full text and rfc822 format available.

Message #14 received at 8317 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> online.de>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 8317 <at> debbugs.gnu.org
Subject: Re: bug#8317: Subject: 24.0.50; sh-script.el took my key
Date: Tue, 22 Mar 2011 11:18:15 +0100
Am 22.03.2011 10:55, schrieb Andreas Schwab:
> Andreas Röhler<andreas.roehler <at> online.de>  writes:
>
>> having defined "C-c (" onto some useful function here,
>> when in Shell-script mode `sh-function` took it.
>>
>> Seems bad, as "C-c" should be a reserved key for users.
>
> *Note (elisp) Major Mode Conventions::
>
>     * The key sequences bound in a major mode keymap should usually
>       start with `C-c', followed by a control character, a digit, or `{',
>       `}', `<', `>', `:' or `;'.  The other punctuation characters are
>       reserved for minor modes, and ordinary letters are reserved for
>       users.
>
> So while C-c ( should not be bound by a major mode, it can still be
> bound by a minor mode, and you should move your binding to a letter.
>
> Andreas.
>

Thanks and sorry for the noise.






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8317; Package emacs. (Tue, 22 Mar 2011 13:05:02 GMT) Full text and rfc822 format available.

Message #17 received at 8317 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Andreas Röhler'" <andreas.roehler <at> online.de>,
	<8317 <at> debbugs.gnu.org>
Subject: RE: bug#8317: Subject: 24.0.50; sh-script.el took my key
Date: Tue, 22 Mar 2011 06:04:09 -0700
> having defined "C-c (" onto some useful function here,
> when in Shell-script mode `sh-function` took it.
> Seems bad, as "C-c" should be a reserved key for users.

See (elisp)Coding Conventions.
The last section quoted here covers `C-c ('.

     Don't define `C-c LETTER' as a key in Lisp programs.  Sequences
     consisting of `C-c' and a letter (either upper or lower case) are
     reserved for users; they are the *only* sequences reserved for
     users, so do not block them.

     Changing all the Emacs major modes to respect this convention was a
     lot of work; abandoning this convention would make that work go to
     waste, and inconvenience users.  Please comply with it.

...

   * Sequences consisting of `C-c' followed by a control character or a
     digit are reserved for major modes.

   * Sequences consisting of `C-c' followed by `{', `}', `<', `>', `:'
     or `;' are also reserved for major modes.

   * Sequences consisting of `C-c' followed by any other punctuation
     character are allocated for minor modes.  Using them in a major
     mode is not absolutely prohibited, but if you do that, the major
     mode binding may be shadowed from time to time by minor modes.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8317; Package emacs. (Tue, 22 Mar 2011 13:26:02 GMT) Full text and rfc822 format available.

Message #20 received at 8317 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> online.de>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 8317 <at> debbugs.gnu.org
Subject: Re: bug#8317: Subject: 24.0.50; sh-script.el took my key
Date: Tue, 22 Mar 2011 14:30:59 +0100
Am 22.03.2011 14:04, schrieb Drew Adams:
>> having defined "C-c (" onto some useful function here,
>> when in Shell-script mode `sh-function` took it.
>> Seems bad, as "C-c" should be a reserved key for users.
>
> See (elisp)Coding Conventions.
> The last section quoted here covers `C-c ('.
>
>       Don't define `C-c LETTER' as a key in Lisp programs.  Sequences
>       consisting of `C-c' and a letter (either upper or lower case) are
>       reserved for users; they are the *only* sequences reserved for
>       users, so do not block them.
>
>       Changing all the Emacs major modes to respect this convention was a
>       lot of work; abandoning this convention would make that work go to
>       waste, and inconvenience users.  Please comply with it.
>
> ...
>
>     * Sequences consisting of `C-c' followed by a control character or a
>       digit are reserved for major modes.
>
>     * Sequences consisting of `C-c' followed by `{', `}', `<', `>', `:'
>       or `;' are also reserved for major modes.
>
>     * Sequences consisting of `C-c' followed by any other punctuation
>       character are allocated for minor modes.  Using them in a major
>       mode is not absolutely prohibited, but if you do that, the major
>       mode binding may be shadowed from time to time by minor modes.
>
>

Yeah, thanks all, see it.

BTW maybe have a look nonetheless at

ar-parentized-atpt, ar-bracketed-atpt, ar-braced-atpt

in
thing-at-point-utils.el
of
https://code.launchpad.net/~a-roehler/python-mode/python-mode-components

With `C-c (' for example I get the whole expression reported, copied, 
marked, where-ever in parent cursor is.

These just-one-key tools save a lot of time here....


Andreas

--

https://code.launchpad.net/s-x-emacs-werkstatt/






bug closed, send any further explanations to 8317 <at> debbugs.gnu.org and Andreas Röhler <andreas.roehler <at> online.de> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 25 Mar 2011 07:23:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 22 Apr 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.