unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8317: Subject: 24.0.50; sh-script.el took my key
@ 2011-03-22  8:18 Andreas Röhler
  2011-03-22  9:38 ` Deniz Dogan
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andreas Röhler @ 2011-03-22  8:18 UTC (permalink / raw)
  To: 8317

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)





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#8317: Subject: 24.0.50; sh-script.el took my key
  2011-03-22  8:18 bug#8317: Subject: 24.0.50; sh-script.el took my key Andreas Röhler
@ 2011-03-22  9:38 ` Deniz Dogan
  2011-03-22  9:55 ` Andreas Schwab
  2011-03-22 13:04 ` Drew Adams
  2 siblings, 0 replies; 6+ messages in thread
From: Deniz Dogan @ 2011-03-22  9:38 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: 8317

2011/3/22 Andreas Röhler <andreas.roehler@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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#8317: Subject: 24.0.50; sh-script.el took my key
  2011-03-22  8:18 bug#8317: Subject: 24.0.50; sh-script.el took my key Andreas Röhler
  2011-03-22  9:38 ` Deniz Dogan
@ 2011-03-22  9:55 ` Andreas Schwab
  2011-03-22 10:18   ` Andreas Röhler
  2011-03-22 13:04 ` Drew Adams
  2 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2011-03-22  9:55 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: 8317

Andreas Röhler <andreas.roehler@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@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#8317: Subject: 24.0.50; sh-script.el took my key
  2011-03-22  9:55 ` Andreas Schwab
@ 2011-03-22 10:18   ` Andreas Röhler
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Röhler @ 2011-03-22 10:18 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 8317

Am 22.03.2011 10:55, schrieb Andreas Schwab:
> Andreas Röhler<andreas.roehler@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.







^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#8317: Subject: 24.0.50; sh-script.el took my key
  2011-03-22  8:18 bug#8317: Subject: 24.0.50; sh-script.el took my key Andreas Röhler
  2011-03-22  9:38 ` Deniz Dogan
  2011-03-22  9:55 ` Andreas Schwab
@ 2011-03-22 13:04 ` Drew Adams
  2011-03-22 13:30   ` Andreas Röhler
  2 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2011-03-22 13:04 UTC (permalink / raw)
  To: 'Andreas Röhler', 8317

> 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.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#8317: Subject: 24.0.50; sh-script.el took my key
  2011-03-22 13:04 ` Drew Adams
@ 2011-03-22 13:30   ` Andreas Röhler
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Röhler @ 2011-03-22 13:30 UTC (permalink / raw)
  To: Drew Adams; +Cc: 8317

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/







^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-03-22 13:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22  8:18 bug#8317: Subject: 24.0.50; sh-script.el took my key Andreas Röhler
2011-03-22  9:38 ` Deniz Dogan
2011-03-22  9:55 ` Andreas Schwab
2011-03-22 10:18   ` Andreas Röhler
2011-03-22 13:04 ` Drew Adams
2011-03-22 13:30   ` Andreas Röhler

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).