Don't bind C-c C-h

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Don't bind C-c C-h

Deniz Dogan-3
Please, don't bind C-c C-h to anything. This prevents people from
viewing all the bindings that start with C-c, which C-c C-h would
normally display.

--
Deniz Dogan
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Andreas Röhler-2
Deniz Dogan wrote:
> Please, don't bind C-c C-h to anything. This prevents people from
> viewing all the bindings that start with C-c, which C-c C-h would
> normally display.
>

Hi Deniz,

it may help, if you write your suggestion into the bug-tracker. So it doesn't get lost.

https://bugs.launchpad.net/python-mode

When reporting, please explain a little bit more the reasons. What's there as mentioned normally for you?
Exists some coding convention which contradicts?

Thanks taking part

Andreas

--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/



_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Deniz Dogan-3
2010/3/18 Andreas Roehler <[hidden email]>:

> Deniz Dogan wrote:
>> Please, don't bind C-c C-h to anything. This prevents people from
>> viewing all the bindings that start with C-c, which C-c C-h would
>> normally display.
>>
>
> Hi Deniz,
>
> it may help, if you write your suggestion into the bug-tracker. So it doesn't get lost.
>
> https://bugs.launchpad.net/python-mode
>
> When reporting, please explain a little bit more the reasons. What's there as mentioned normally for you?
> Exists some coding convention which contradicts?
>
> Thanks taking part
>

Would someone mind reporting the issue there for me? I don't plan on
using Launchpad any time soon other than for this. If anyone gets
around to doing that, you can use the following description of the
problem:

I'm not sure there is an actual convention that says one shouldn't use
C-h in a key sequence. However, I often use C-h as a "suffix" key to
find out more about key sequences that start out a certain way. You
can try this by hitting e.g. "C-x n C-h", which should give you:

 C-x n d         narrow-to-defun
C-x n n         narrow-to-region
C-x n p         narrow-to-page
C-x n w         widen

I use this feature quite often in Emacs and I'm sure some other people
do it to. Of course, one can use "C-h m" to find out more about the
mode-specific key bindings, but there is still use for C-h as a
suffix, as it shows you _all_ of the bindings that start with a
particular key sequence.

--
Deniz Dogan
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Andreas Röhler-2
Deniz Dogan wrote:

> 2010/3/18 Andreas Roehler <[hidden email]>:
>> Deniz Dogan wrote:
>>> Please, don't bind C-c C-h to anything. This prevents people from
>>> viewing all the bindings that start with C-c, which C-c C-h would
>>> normally display.
>>>
>> Hi Deniz,
>>
>> it may help, if you write your suggestion into the bug-tracker. So it doesn't get lost.
>>
>> https://bugs.launchpad.net/python-mode
>>
>> When reporting, please explain a little bit more the reasons. What's there as mentioned normally for you?
>> Exists some coding convention which contradicts?
>>
>> Thanks taking part
>>
>
> Would someone mind reporting the issue there for me? I don't plan on
> using Launchpad any time soon other than for this. If anyone gets
> around to doing that, you can use the following description of the
> problem:
>
> I'm not sure there is an actual convention that says one shouldn't use
> C-h in a key sequence. However, I often use C-h as a "suffix" key to
> find out more about key sequences that start out a certain way. You
> can try this by hitting e.g. "C-x n C-h", which should give you:
>
>  C-x n d         narrow-to-defun
> C-x n n         narrow-to-region
> C-x n p         narrow-to-page
> C-x n w         widen
>
> I use this feature quite often in Emacs and I'm sure some other people
> do it to. Of course, one can use "C-h m" to find out more about the
> mode-specific key bindings, but there is still use for C-h as a
> suffix, as it shows you _all_ of the bindings that start with a
> particular key sequence.
>

You mentioned a binding starting with C-c, not with C-x as your example shows now.
So the matter is done?



_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Reinout van Rees
On 03/19/2010 07:27 AM, Andreas Roehler wrote:

> Deniz Dogan wrote:
>> 2010/3/18 Andreas Roehler<[hidden email]>:
>>> Deniz Dogan wrote:
>>>> Please, don't bind C-c C-h to anything. This prevents people from
>>>> viewing all the bindings that start with C-c, which C-c C-h would
>>>> normally display.
>>>>
>>> Hi Deniz,
>>>
>>> it may help, if you write your suggestion into the bug-tracker. So it doesn't get lost.
>>>
>>> https://bugs.launchpad.net/python-mode
>>>
>>> When reporting, please explain a little bit more the reasons. What's there as mentioned normally for you?
>>> Exists some coding convention which contradicts?
>>>
>>> Thanks taking part
>>>
>>
>> Would someone mind reporting the issue there for me? I don't plan on
>> using Launchpad any time soon other than for this. If anyone gets
>> around to doing that, you can use the following description of the
>> problem:
>>
>> I'm not sure there is an actual convention that says one shouldn't use
>> C-h in a key sequence. However, I often use C-h as a "suffix" key to
>> find out more about key sequences that start out a certain way. You
>> can try this by hitting e.g. "C-x n C-h", which should give you:
>>
>>   C-x n d         narrow-to-defun
>> C-x n n         narrow-to-region
>> C-x n p         narrow-to-page
>> C-x n w         widen
>>
>> I use this feature quite often in Emacs and I'm sure some other people
>> do it to. Of course, one can use "C-h m" to find out more about the
>> mode-specific key bindings, but there is still use for C-h as a
>> suffix, as it shows you _all_ of the bindings that start with a
>> particular key sequence.
>>
>
> You mentioned a binding starting with C-c, not with C-x as your example shows now.
> So the matter is done?

Nope. What he actually meant was "don't use ctrl-h in a binding".
Regardless of whether it is ctrl-c or ctrl-x or ctrl-ä.

Ctrl-h is the standard emacs key you can press anywhere in a sequence of
alt/ctrl commands to get a description of everything that's possible there.

ctrl-c ctrl-h: show everything I can do after ctrl-c here.

ctrl-x v ctrl-h: what where those version control commands again...


(What I don't know is where in python mode he found a ctrl-h binding, btw).

Reinout

--
Reinout van Rees - [hidden email] - http://reinout.vanrees.org
Programmer at http://www.nelen-schuurmans.nl
"Military engineers build missiles. Civil engineers build targets"

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Rohan Nicholls-3
In reply to this post by Andreas Röhler-2
I am going to weigh in here.  Denis is absolutely correct.

It is an official binding and convention in emacs, and I believe
xemacs.

C-h is sacred. It has a bunch of functionality behind it tied in with
prefix keys.  This means that in creating a map, and binding it to a
prefix key, when you hit: <prefix-key>, C-h it will list all the
bindings for that key's map.

As a very practical example, I use F5 for various org-mode
functionality. This is accomplished by defining F5 as a prefix key,
and binding a keymap I populated with various bindings to that key.
Now whenever I forget (frequently) what I had bound to what I just hit
F5,C-h and all the bindings are displayed.

And this holds for C-c.  If I hit C-c,C-h it is because I want to see what
the bindings are for the current mode.  I and many other emacs
users would be seriously thrown, not to say upset, if this functionality
was changed.

The C-h binding is very important for discoverability, and I think it
is a very, very bad idea to bind it to anything.

Just my 2 cents worth.

Thanks,

Rohan

On Fri, Mar 19, 2010 at 7:27 AM, Andreas Roehler
<[hidden email]> wrote:

> Deniz Dogan wrote:
>> 2010/3/18 Andreas Roehler <[hidden email]>:
>>> Deniz Dogan wrote:
>>>> Please, don't bind C-c C-h to anything. This prevents people from
>>>> viewing all the bindings that start with C-c, which C-c C-h would
>>>> normally display.
>>>>
>>> Hi Deniz,
>>>
>>> it may help, if you write your suggestion into the bug-tracker. So
it doesn't get lost.
>>>
>>> https://bugs.launchpad.net/python-mode
>>>
>>> When reporting, please explain a little bit more the reasons.
What's there as mentioned normally for you?
>>> Exists some coding convention which contradicts?
>>>
>>> Thanks taking part
>>>
>>
>> Would someone mind reporting the issue there for me? I don't plan
on
>> using Launchpad any time soon other than for this. If anyone gets
>> around to doing that, you can use the following description of the
>> problem:
>>
>> I'm not sure there is an actual convention that says one shouldn't
use
>> C-h in a key sequence. However, I often use C-h as a "suffix" key
to
>> find out more about key sequences that start out a certain way. You
>> can try this by hitting e.g. "C-x n C-h", which should give you:
>>
>>  C-x n d         narrow-to-defun
>> C-x n n         narrow-to-region
>> C-x n p         narrow-to-page
>> C-x n w         widen
>>
>> I use this feature quite often in Emacs and I'm sure some other
people
>> do it to. Of course, one can use "C-h m" to find out more about the
>> mode-specific key bindings, but there is still use for C-h as a
>> suffix, as it shows you _all_ of the bindings that start with a
>> particular key sequence.
>>
>
> You mentioned a binding starting with C-c, not with C-x as your
example shows now.
> So the matter is done?
>
>
>
> _______________________________________________
> Python-mode mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/python-mode
>
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Deniz Dogan-3
In reply to this post by Reinout van Rees
2010/3/19 Reinout van Rees <[hidden email]>:

> On 03/19/2010 07:27 AM, Andreas Roehler wrote:
>>
>> Deniz Dogan wrote:
>>>
>>> 2010/3/18 Andreas Roehler<[hidden email]>:
>>>>
>>>> Deniz Dogan wrote:
>>>>>
>>>>> Please, don't bind C-c C-h to anything. This prevents people from
>>>>> viewing all the bindings that start with C-c, which C-c C-h would
>>>>> normally display.
>>>>>
>>>> Hi Deniz,
>>>>
>>>> it may help, if you write your suggestion into the bug-tracker. So it
>>>> doesn't get lost.
>>>>
>>>> https://bugs.launchpad.net/python-mode
>>>>
>>>> When reporting, please explain a little bit more the reasons. What's
>>>> there as mentioned normally for you?
>>>> Exists some coding convention which contradicts?
>>>>
>>>> Thanks taking part
>>>>
>>>
>>> Would someone mind reporting the issue there for me? I don't plan on
>>> using Launchpad any time soon other than for this. If anyone gets
>>> around to doing that, you can use the following description of the
>>> problem:
>>>
>>> I'm not sure there is an actual convention that says one shouldn't use
>>> C-h in a key sequence. However, I often use C-h as a "suffix" key to
>>> find out more about key sequences that start out a certain way. You
>>> can try this by hitting e.g. "C-x n C-h", which should give you:
>>>
>>>  C-x n d         narrow-to-defun
>>> C-x n n         narrow-to-region
>>> C-x n p         narrow-to-page
>>> C-x n w         widen
>>>
>>> I use this feature quite often in Emacs and I'm sure some other people
>>> do it to. Of course, one can use "C-h m" to find out more about the
>>> mode-specific key bindings, but there is still use for C-h as a
>>> suffix, as it shows you _all_ of the bindings that start with a
>>> particular key sequence.
>>>
>>
>> You mentioned a binding starting with C-c, not with C-x as your example
>> shows now.
>> So the matter is done?
>
> Nope. What he actually meant was "don't use ctrl-h in a binding". Regardless
> of whether it is ctrl-c or ctrl-x or ctrl-ä.
>
> Ctrl-h is the standard emacs key you can press anywhere in a sequence of
> alt/ctrl commands to get a description of everything that's possible there.
>
> ctrl-c ctrl-h: show everything I can do after ctrl-c here.
>
> ctrl-x v ctrl-h: what where those version control commands again...
>
>
> (What I don't know is where in python mode he found a ctrl-h binding, btw).
>
> Reinout
>

In python-mode.el with py-version "5.1.0+" whatever that means:

Line 692:
  (define-key py-mode-map "\C-c\C-h"  'py-help-at-point)

--
Deniz Dogan
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Reinout van Rees
On 03/19/2010 10:57 AM, Deniz Dogan wrote:
> 2010/3/19 Reinout van Rees<[hidden email]>:
>>
>> (What I don't know is where in python mode he found a ctrl-h binding, btw).
>>
>
> In python-mode.el with py-version "5.1.0+" whatever that means:
>
> Line 692:
>    (define-key py-mode-map "\C-c\C-h"  'py-help-at-point)

Ouch.  Yes, that's evil.  It breaks a major emacs convention.

ctrl-h *is* sadly the logical key for some help-related function.  Would
"ctrl-c h" be an alternative?


Reinout

--
Reinout van Rees - [hidden email] - http://reinout.vanrees.org
Programmer at http://www.nelen-schuurmans.nl
"Military engineers build missiles. Civil engineers build targets"

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Skip Montanaro-3
In reply to this post by Deniz Dogan-3

    Deniz> In python-mode.el with py-version "5.1.0+" whatever that means:

    Deniz> Line 692:
    Deniz>   (define-key py-mode-map "\C-c\C-h"  'py-help-at-point)

Yeah, that was probably my doing a long time ago.

Skip
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Deniz Dogan-3
In reply to this post by Reinout van Rees
2010/3/19 Reinout van Rees <[hidden email]>:

> On 03/19/2010 10:57 AM, Deniz Dogan wrote:
>>
>> 2010/3/19 Reinout van Rees<[hidden email]>:
>>>
>>> (What I don't know is where in python mode he found a ctrl-h binding,
>>> btw).
>>>
>>
>> In python-mode.el with py-version "5.1.0+" whatever that means:
>>
>> Line 692:
>>   (define-key py-mode-map "\C-c\C-h"  'py-help-at-point)
>
> Ouch.  Yes, that's evil.  It breaks a major emacs convention.
>
> ctrl-h *is* sadly the logical key for some help-related function.  Would
> "ctrl-c h" be an alternative?
>

Unfortunately, that breaks yet another convention, which is that C-c
<letter> are for users and should not be bound to anything in any
external mode. C-c ? would be okay, but that's already bound to
py-describe-mode. Maybe C-c C-? would work, but I'm not sure how that
is recognized by terminals.

--
Deniz Dogan
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Andreas Röhler-2
In reply to this post by Skip Montanaro-3
[hidden email] wrote:

>     Deniz> In python-mode.el with py-version "5.1.0+" whatever that means:
>
>     Deniz> Line 692:
>     Deniz>   (define-key py-mode-map "\C-c\C-h"  'py-help-at-point)
>
> Yeah, that was probably my doing a long time ago.
>
> Skip
> _______________________________________________
> Python-mode mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/python-mode
>

Thanks Deniz, thanks all,

made a bug report.

https://bugs.launchpad.net/python-mode/+bug/541833

Any suggestions how to replace the key?

Andreas
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Skip Montanaro-3
In reply to this post by Deniz Dogan-3
>>>>> "Deniz" == Deniz Dogan <[hidden email]> writes:
    Deniz> Maybe C-c C-? would work, but I'm not sure how that is recognized
    Deniz> by terminals.

Not at all on my Sun (Intel) box running Solaris 10 with a Dell keyboard.
It maps to C-c ?...

S

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Barry Warsaw
In reply to this post by Reinout van Rees
On Mar 19, 2010, at 09:54 AM, Reinout van Rees wrote:

>ctrl-c ctrl-h: show everything I can do after ctrl-c here.

C-c C-h is not bound to anything in c-mode or conf-mode AFAICT.  So, if it's
not a standard Emacs key binding, does that mean it's explicitly reserved for
users by Emacs?

-Barry


_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Barry Warsaw
In reply to this post by Reinout van Rees
On Mar 19, 2010, at 11:07 AM, Reinout van Rees wrote:

>> Line 692:
>>    (define-key py-mode-map "\C-c\C-h"  'py-help-at-point)
>
>Ouch.  Yes, that's evil.  It breaks a major emacs convention.
>
>ctrl-h *is* sadly the logical key for some help-related function.  Would
>"ctrl-c h" be an alternative?

Hi Reinout.  Is that defined in an Emacs Lisp standard somewhere?  I'm having
a hard time finding /any/ other mode where C-c C-h is bound to anything
(mail-mode and shell-mode are two others I've checked).

-Barry


_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Barry Warsaw
In reply to this post by Rohan Nicholls-3
On Mar 19, 2010, at 10:13 AM, Rohan Nicholls wrote:

>The C-h binding is very important for discoverability, and I think it
>is a very, very bad idea to bind it to anything.

If we /do/ change it, may I suggest C-c C-e?  'e' being a mnemonic for
'explain', and C-c C-e is currently unused in python-mode.

-Barry

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Reinout van Rees
In reply to this post by Barry Warsaw
On 03/19/2010 03:34 PM, Barry Warsaw wrote:
> On Mar 19, 2010, at 11:07 AM, Reinout van Rees wrote:
>
>> ctrl-h *is* sadly the logical key for some help-related function.  Would
>> "ctrl-c h" be an alternative?
>
> Hi Reinout.  Is that defined in an Emacs Lisp standard somewhere?  I'm having
> a hard time finding /any/ other mode where C-c C-h is bound to anything
> (mail-mode and shell-mode are two others I've checked).

Hm. It is apparently not as clear-cut as I always took it to be.  Emacs'
info (for instance
http://www.chemie.fu-berlin.de/chemnet/use/info/emacs/emacs_11.html ):

   C-h or F1 means "help" in various other contexts as well. For
   example, in query-replace, it describes the options available.
   After a prefix key, it displays a list of the alternatives that
   can follow the prefix key. (A few prefix keys don't support this
   because they define other meanings for C-h.)

So it *is* apparently OK to use ctrl-h in other meanings!

But ctrl-c ctrl-h seems to work in every mode I just tested it on: it
gives a nice overview of possible keys.

I know most basic keybindings, but the particulars of all those major
modes... That's what ctrl-c ctrl-h is for.

Similarly the version control (minor?) mode: ctrl-x v ctrl-h ("what was
the annotate/blame/praise command again?")


And I just discovered that the "emacs starter kit" I'm using has
re-bound ctrl-x ctrl-h to some open-a-url function, sigh :-)


Reinout


--
Reinout van Rees - [hidden email] - http://reinout.vanrees.org
Programmer at http://www.nelen-schuurmans.nl
"Military engineers build missiles. Civil engineers build targets"

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Barry Warsaw
On Mar 19, 2010, at 03:58 PM, Reinout van Rees wrote:

>Hm. It is apparently not as clear-cut as I always took it to be.  Emacs'
>info (for instance
>http://www.chemie.fu-berlin.de/chemnet/use/info/emacs/emacs_11.html ):
>
>   C-h or F1 means "help" in various other contexts as well. For
>   example, in query-replace, it describes the options available.
>   After a prefix key, it displays a list of the alternatives that
>   can follow the prefix key. (A few prefix keys don't support this
>   because they define other meanings for C-h.)
>
>So it *is* apparently OK to use ctrl-h in other meanings!
:)

>But ctrl-c ctrl-h seems to work in every mode I just tested it on: it
>gives a nice overview of possible keys.

I'm not opposed to moving it and leaving C-c C-h for common functionality.  I
know how much it hurts when modes break your DNA-ingrained assumptions (hello,
gud?!).

Any objections to C-c C-e?

-Barry


_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Reinout van Rees
On 03/19/2010 04:21 PM, Barry Warsaw wrote:
>
> Any objections to C-c C-e?

None at all.  That e-for-explain you mentioned sounds fine.


Reinout

--
Reinout van Rees - [hidden email] - http://reinout.vanrees.org
Programmer at http://www.nelen-schuurmans.nl
"Military engineers build missiles. Civil engineers build targets"

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Barry Warsaw
On Mar 19, 2010, at 05:12 PM, Reinout van Rees wrote:

>On 03/19/2010 04:21 PM, Barry Warsaw wrote:
>>
>> Any objections to C-c C-e?
>
>None at all.  That e-for-explain you mentioned sounds fine.

Cool.  Bug updated.
-B

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Don't bind C-c C-h

Skip Montanaro-3
In reply to this post by Barry Warsaw

    >> The C-h binding is very important for discoverability, and I think it
    >> is a very, very bad idea to bind it to anything.

    Barry> If we /do/ change it, may I suggest C-c C-e?  'e' being a
    Barry> mnemonic for 'explain', and C-c C-e is currently unused in
    Barry> python-mode.

Is there any other programming mode with something akin to py-help-at-point?
If so, what binding(s) do they use?

S

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
12