unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Cua-mode binding of S-return
@ 2005-04-28 21:48 Kim F. Storm
  2005-04-28 22:35 ` David Kastrup
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Kim F. Storm @ 2005-04-28 21:48 UTC (permalink / raw)



Currently cua-mode uses S-return to toggle rectangle marking.

This works nicely most of the time, but it is just too easy to
accidentally hit it after another shifted key, e.g. an upper case
letter.

Therefore, I would like to move this to another binding, but I 
don't quite know which.  

C-return seems like a good candidate, analogue to C-space for the normal mark.

Unfortunately, C-return is used by tex-mode and thumbs-mode:

   (define-key map [(control return)] 'tex-feed-input)
   (define-key map [(control return)] 'thumbs-set-image-at-point-to-root-window)

Calculator also uses it, but this is in a special environment where rectangle
marking doesn't make much sense anyway:

   (calculator-save-and-quit [(control return)]

The thumbs binding is a bit odd, as it could just as well be bound to a regular
key, such as `r'.

That really leaves just the tex-mode binding -- so I wonder how commonly
used that binding is (C-c C-m also runs tex-feed-input).

Of course, this is all relevant only when you use cua-mode.

But we have talked about separating the cua-mode rectangle code
from cua, and as such a good binding to toggle rectangle marking
will have to be found anyway.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Cua-mode binding of S-return
  2005-04-28 21:48 Cua-mode binding of S-return Kim F. Storm
@ 2005-04-28 22:35 ` David Kastrup
  2005-04-29 16:53 ` Kevin Rodgers
  2005-05-07  0:46 ` Peter Heslin
  2 siblings, 0 replies; 7+ messages in thread
From: David Kastrup @ 2005-04-28 22:35 UTC (permalink / raw)
  Cc: emacs-devel

storm@cua.dk (Kim F. Storm) writes:

> Currently cua-mode uses S-return to toggle rectangle marking.
>
> This works nicely most of the time, but it is just too easy to
> accidentally hit it after another shifted key, e.g. an upper case
> letter.
>
>
> That really leaves just the tex-mode binding -- so I wonder how
> commonly used that binding is (C-c C-m also runs tex-feed-input).
>
> Of course, this is all relevant only when you use cua-mode.
>
> But we have talked about separating the cua-mode rectangle code
> from cua, and as such a good binding to toggle rectangle marking
> will have to be found anyway.

For what it's worth: AUCTeX has M-RET, M-j, C-j, C-c RET, but indeed
C-return is, much to my surprise, unbound.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Cua-mode binding of S-return
  2005-04-28 21:48 Cua-mode binding of S-return Kim F. Storm
  2005-04-28 22:35 ` David Kastrup
@ 2005-04-29 16:53 ` Kevin Rodgers
  2005-05-07  0:46 ` Peter Heslin
  2 siblings, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2005-04-29 16:53 UTC (permalink / raw)


Kim F. Storm wrote:
 > Unfortunately, C-return is used by tex-mode and thumbs-mode:
 >
 >    (define-key map [(control return)] 'tex-feed-input)
 >    (define-key map [(control return)] 
'thumbs-set-image-at-point-to-root-window)
...
 > The thumbs binding is a bit odd, as it could just as well be bound to 
a regular
 > key, such as `r'.

How about `/', as a mnemonic for "root"?

-- 
Kevin Rodgers

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

* Re: Cua-mode binding of S-return
  2005-04-28 21:48 Cua-mode binding of S-return Kim F. Storm
  2005-04-28 22:35 ` David Kastrup
  2005-04-29 16:53 ` Kevin Rodgers
@ 2005-05-07  0:46 ` Peter Heslin
  2005-05-07 21:58   ` Kim F. Storm
  2 siblings, 1 reply; 7+ messages in thread
From: Peter Heslin @ 2005-05-07  0:46 UTC (permalink / raw)


Apologies for coming late to this thread ...

On 2005-04-28, Kim F. Storm <storm@cua.dk> wrote:
> 
>  Currently cua-mode uses S-return to toggle rectangle marking.
> 
>  This works nicely most of the time, but it is just too easy to
>  accidentally hit it after another shifted key, e.g. an upper case
>  letter.

I have never had this problem, even though I use cua-mode and I am a
very bad, horribly sloppy typist.

>  Therefore, I would like to move this to another binding, but I 
>  don't quite know which.  
> 
>  C-return seems like a good candidate, analogue to C-space for the normal mark.

C-return is used by nxml-mode for nxml-complete, its incredibly useful
context-sensitive autocompletion function.  nxml-mode is not a part of
Emacs (yet), so strictly speaking it's not a conflict, but ...

Here is a bit more detail from James Clark (in nxml-mode.texi)

    The traditional GNU Emacs key combination for completion in a
    buffer is `M-<TAB>'. However, many window systems and window
    managers use this key combination themselves (typically for
    switching between windows) and do not pass it to
    applications. It's hard to find key combinations in GNU Emacs that
    are both easy to type and not taken by something else.  `C-<RET>'
    (i.e.  pressing the Enter or Return key, while the Ctrl key is
    held down) is available.  It won't be available on a traditional
    terminal (because it is indistinguishable from Return), but it
    will work with a window system.  Therefore we adopt the following
    solution by default: use `C-<RET>' when there's a window system
    and `M-<TAB>' when there's not.  In the following, I will assume
    that a window system is being used and will therefore refer to
    `C-<RET>'.

>  But we have talked about separating the cua-mode rectangle code
>  from cua, and as such a good binding to toggle rectangle marking
>  will have to be found anyway.

Have you really had complaints about S-return?

Peter

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

* Re: Cua-mode binding of S-return
  2005-05-07  0:46 ` Peter Heslin
@ 2005-05-07 21:58   ` Kim F. Storm
  2005-05-08 16:12     ` Richard Stallman
  2005-05-16 15:25     ` Kai Großjohann
  0 siblings, 2 replies; 7+ messages in thread
From: Kim F. Storm @ 2005-05-07 21:58 UTC (permalink / raw)
  Cc: emacs-devel

Peter Heslin <public@heslin.eclipse.co.uk> writes:

> C-return is used by nxml-mode for nxml-complete, its incredibly useful
> context-sensitive autocompletion function.  nxml-mode is not a part of
> Emacs (yet), so strictly speaking it's not a conflict, but ...
>
> Here is a bit more detail from James Clark (in nxml-mode.texi)
>
>     The traditional GNU Emacs key combination for completion in a
>     buffer is `M-<TAB>'. However, many window systems and window
>     managers use this key combination themselves (typically for
>     switching between windows) and do not pass it to
>     applications. It's hard to find key combinations in GNU Emacs that
>     are both easy to type and not taken by something else.  `C-<RET>'
>     (i.e.  pressing the Enter or Return key, while the Ctrl key is
>     held down) is available.  It won't be available on a traditional
>     terminal (because it is indistinguishable from Return), but it
>     will work with a window system.  Therefore we adopt the following
>     solution by default: use `C-<RET>' when there's a window system
>     and `M-<TAB>' when there's not.  In the following, I will assume
>     that a window system is being used and will therefore refer to
>     `C-<RET>'.

As James explains, this is a general problem, i.e. not limited to nxml-mode.

As such, it should be solved generally, rather than hotch-potch fixes in
individual packages.

Usually, I just use ESC TAB for completion when M-TAB doesn't work, and
I guess other users do the same, as I don't hear many complaints that
M-TAB doesn't work...

I don't know what other good alternative there is for M-TAB, but
although C-return could seem ok, I still think it would be better
used for rectangle marking due to the analogy with C-SPC.

>>  But we have talked about separating the cua-mode rectangle code
>>  from cua, and as such a good binding to toggle rectangle marking
>>  will have to be found anyway.
>
> Have you really had complaints about S-return?

Yes, and I make the mistake myself too often!

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Cua-mode binding of S-return
  2005-05-07 21:58   ` Kim F. Storm
@ 2005-05-08 16:12     ` Richard Stallman
  2005-05-16 15:25     ` Kai Großjohann
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2005-05-08 16:12 UTC (permalink / raw)
  Cc: public, emacs-devel

    As James explains, this is a general problem, i.e. not limited to nxml-mode.

    As such, it should be solved generally, rather than hotch-potch fixes in
    individual packages.

That is right.  When specific modes try to solve perceived problems in
general Emacs conventions by departing from them, the overall result
is to make things worse.  Every general convention, those we use and
the alternatives we might have used, is a trade-off, so there will be
plenty situations where these conventions are inconvenient for
someone.  But when modes don't follow them, that creates worse
problems.

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

* Re: Cua-mode binding of S-return
  2005-05-07 21:58   ` Kim F. Storm
  2005-05-08 16:12     ` Richard Stallman
@ 2005-05-16 15:25     ` Kai Großjohann
  1 sibling, 0 replies; 7+ messages in thread
From: Kai Großjohann @ 2005-05-16 15:25 UTC (permalink / raw)


storm@cua.dk (Kim F. Storm) writes:

> Usually, I just use ESC TAB for completion when M-TAB doesn't work, and
> I guess other users do the same, as I don't hear many complaints that
> M-TAB doesn't work...

C-M-i might also be easy to type.

We could make C-<tab> be another way to type M-TAB.

Kai

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

end of thread, other threads:[~2005-05-16 15:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-28 21:48 Cua-mode binding of S-return Kim F. Storm
2005-04-28 22:35 ` David Kastrup
2005-04-29 16:53 ` Kevin Rodgers
2005-05-07  0:46 ` Peter Heslin
2005-05-07 21:58   ` Kim F. Storm
2005-05-08 16:12     ` Richard Stallman
2005-05-16 15:25     ` Kai Großjohann

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