unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Tex-mode binding of C-return
@ 2005-05-02 11:25 Kim F. Storm
  2005-05-02 19:14 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Kim F. Storm @ 2005-05-02 11:25 UTC (permalink / raw)



In a different thread, I suggested to change CUA's
"toggle rectangle mark" command from S-return to C-return.

The only real conflict is with Tex-mode which binds
C-return to tex-feed-input which is also on C-c C-m.

Since my plan (after the release) is to separate the rectangle
handling from CUA, having a good "toggle rectangle mark" command
will eventually become important even for non-CUA users.

C-return is such a "good command", analogue to C-SPC for the
normal mark.

Do tex users really use C-return ?


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

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

* Re: Tex-mode binding of C-return
  2005-05-02 11:25 Tex-mode binding of C-return Kim F. Storm
@ 2005-05-02 19:14 ` Stefan Monnier
  2005-05-03  8:02   ` Kim F. Storm
  2005-05-02 21:44 ` Daniel Brockman
  2005-05-04  5:53 ` Harald Maier
  2 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2005-05-02 19:14 UTC (permalink / raw)
  Cc: emacs-devel

> Since my plan (after the release) is to separate the rectangle
> handling from CUA, having a good "toggle rectangle mark" command
> will eventually become important even for non-CUA users.

> C-return is such a "good command", analogue to C-SPC for the
> normal mark.

I don't find C-return a particularly good choice (especially since it
doesn't work on ttys).  But to tell you the truth, it's hard to judge
without the whole context (i.e. what would be the interface for that
new rectangle handling thingy?).

Is the idea that to kill a rectangle you could do

   C-RET C-SPC .... M-w

or equivalently

   C-SPC ... C-RET ... M-w

> Do tex users really use C-return ?

At least I don't.


        Stefan

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

* Re: Tex-mode binding of C-return
  2005-05-02 11:25 Tex-mode binding of C-return Kim F. Storm
  2005-05-02 19:14 ` Stefan Monnier
@ 2005-05-02 21:44 ` Daniel Brockman
  2005-05-04  5:53 ` Harald Maier
  2 siblings, 0 replies; 11+ messages in thread
From: Daniel Brockman @ 2005-05-02 21:44 UTC (permalink / raw)


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

> In a different thread, I suggested to change CUA's
> "toggle rectangle mark" command from S-return to C-return.

I'd hate to see this turned down; it's such a nice symmetry.
It's also mnemonically nice, as SPC and RET retain their usual
relation --- horizontal vs. vertical.

-- 
Daniel Brockman <daniel@brockman.se>

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

* Re: Tex-mode binding of C-return
  2005-05-02 19:14 ` Stefan Monnier
@ 2005-05-03  8:02   ` Kim F. Storm
  2005-05-03 15:42     ` Stefan Monnier
                       ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Kim F. Storm @ 2005-05-03  8:02 UTC (permalink / raw)
  Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> C-return is such a "good command", analogue to C-SPC for the
>> normal mark.
>
> I don't find C-return a particularly good choice (especially since it
> doesn't work on ttys).  

Neither does S-return...    Does C-space work on ttys?


>
> Is the idea that to kill a rectangle you could do
>
>    C-RET C-SPC .... M-w

Just do:
     C-RET ... M-w 

>
> or equivalently
>
>    C-SPC ... C-RET ... M-w

That works, yes, changing the normal mark to
a rectangle mark.


>                         But to tell you the truth, it's hard to judge
> without the whole context (i.e. what would be the interface for that
> new rectangle handling thingy?).

Try this:

- Open some text in a buffer

- M-x cua-mode RET

- Place the cursor on the top left corner of "a" rectangle.

- S-return

- move to cursor to bottom right corner of that rectangle,
  using C-f, C-b, C-n, C-p or any other normal cursor movement.

- C-w


- Move somewhere else in the buffer

- C-y



I'm suggesting to use C-return instead of S-return to toggle the
rectangle mark, just like C-space toggles the normal mark.



>
>> Do tex users really use C-return ?
>
> At least I don't.

Good :-)

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

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

* Re: Tex-mode binding of C-return
  2005-05-03  8:02   ` Kim F. Storm
@ 2005-05-03 15:42     ` Stefan Monnier
  2005-05-04  2:38     ` Luc Teirlinck
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2005-05-03 15:42 UTC (permalink / raw)
  Cc: emacs-devel

>>> C-return is such a "good command", analogue to C-SPC for the
>>> normal mark.
>> I don't find C-return a particularly good choice (especially since it
>> doesn't work on ttys).  
> Neither does S-return...

Indeed, so it's not a good choice either.

> Does C-space work on ttys?

Yes and no: it typically isn't recognized as C-SPC but as C-@ (aka ASCII
NUL).  Luckily (well it's actually done on purpose) C-@ has the
same binding, so it does DTRT.

In contrast on most tty C-return just sends a RET and we can't put that
special binding on RET as well.

I'm not saying C-return can't be used, but it would be good to also find
a key that works on ttys (just like we have undo bound to C-x u for "works
everywhere" as well as to C-_ and C-/ for more convenient alternatives
that don't always work).  Maybe we could just use C-x r (except it would
hide the register commands ;-( ).

>> Is the idea that to kill a rectangle you could do
>> C-RET C-SPC .... M-w

> Just do:
>      C-RET ... M-w 

Hmmm... OK.  I was thinking it would be good to make it work like a general
prefix command so you could also do C-return M-C-SPC, but after thinking
about it, I see it's not that important as long as M-C-SPC C-return works
as well.

>> or equivalently
>> 
>> C-SPC ... C-RET ... M-w

> That works, yes, changing the normal mark to
> a rectangle mark.

Good.  I assume it only works if you use transient-mark-mode, otherwise it
has no way to know whether you're "in the middle of marking" or not.

> I'm suggesting to use C-return instead of S-return to toggle the
> rectangle mark, just like C-space toggles the normal mark.

Fine with me, C-return is no worse than S-return.


        Stefan

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

* Re: Tex-mode binding of C-return
  2005-05-03  8:02   ` Kim F. Storm
  2005-05-03 15:42     ` Stefan Monnier
@ 2005-05-04  2:38     ` Luc Teirlinck
  2005-05-04  8:18       ` Kim F. Storm
  2005-05-04  2:53     ` Luc Teirlinck
  2005-05-04  9:20     ` Andreas Schwab
  3 siblings, 1 reply; 11+ messages in thread
From: Luc Teirlinck @ 2005-05-04  2:38 UTC (permalink / raw)
  Cc: monnier, emacs-devel

Kim Storm wrote:

   Neither does S-return...    Does C-space work on ttys?

Yes.  But S-TAB does not and S-TAB is unfortunately used for TAB in
the inverse direction in tons of spaces in Emacs, which is a nuisance.
On ttys S-TAB is normally the same as TAB.  You can make tty's
recognize these things but how to do it depends on the tty.  Not stuff
for newbies.

Sincerely,

Luc.

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

* Re: Tex-mode binding of C-return
  2005-05-03  8:02   ` Kim F. Storm
  2005-05-03 15:42     ` Stefan Monnier
  2005-05-04  2:38     ` Luc Teirlinck
@ 2005-05-04  2:53     ` Luc Teirlinck
  2005-05-04  9:20     ` Andreas Schwab
  3 siblings, 0 replies; 11+ messages in thread
From: Luc Teirlinck @ 2005-05-04  2:53 UTC (permalink / raw)
  Cc: monnier, emacs-devel

Kim Storm wrote:

   Does C-space work on ttys?

To correct my previous answer: strictly speaking no, but
_in practice_, yes.

>From `(emacs)Setting Mark':

   There is no such character as `C-<SPC>' in ASCII; when you type
<SPC> while holding down <CTRL> on a text terminal, what you get is the
character `C-@'.  This key is also bound to `set-mark-command'-so
unless you are unlucky enough to have a text terminal where typing
`C-<SPC>' does not produce `C-@', you might as well think of this
character as `C-<SPC>'.

Sincerely,

Luc.

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

* Re: Tex-mode binding of C-return
  2005-05-02 11:25 Tex-mode binding of C-return Kim F. Storm
  2005-05-02 19:14 ` Stefan Monnier
  2005-05-02 21:44 ` Daniel Brockman
@ 2005-05-04  5:53 ` Harald Maier
  2 siblings, 0 replies; 11+ messages in thread
From: Harald Maier @ 2005-05-04  5:53 UTC (permalink / raw)
  Cc: emacs-devel

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

> In a different thread, I suggested to change CUA's
> "toggle rectangle mark" command from S-return to C-return.
>
> The only real conflict is with Tex-mode which binds
> C-return to tex-feed-input which is also on C-c C-m.

Just for your info nxml-mode uses this key binding too for completion.

Harald

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

* Re: Tex-mode binding of C-return
  2005-05-04  2:38     ` Luc Teirlinck
@ 2005-05-04  8:18       ` Kim F. Storm
  2005-05-04 15:24         ` Luc Teirlinck
  0 siblings, 1 reply; 11+ messages in thread
From: Kim F. Storm @ 2005-05-04  8:18 UTC (permalink / raw)
  Cc: monnier, emacs-devel

Luc Teirlinck <teirllm@dms.auburn.edu> writes:

> Kim Storm wrote:
>
>    Neither does S-return...    Does C-space work on ttys?
>
> Yes.  But S-TAB does not and S-TAB is unfortunately used for TAB in
> the inverse direction in tons of spaces in Emacs, which is a nuisance.

If I hit S-TAB (GNU/Linux + X), I get this message:

   <backtab> (translated from <S-iso-lefttab>) is undefined


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

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

* Re: Tex-mode binding of C-return
  2005-05-03  8:02   ` Kim F. Storm
                       ` (2 preceding siblings ...)
  2005-05-04  2:53     ` Luc Teirlinck
@ 2005-05-04  9:20     ` Andreas Schwab
  3 siblings, 0 replies; 11+ messages in thread
From: Andreas Schwab @ 2005-05-04  9:20 UTC (permalink / raw)
  Cc: Stefan Monnier, emacs-devel

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

> Does C-space work on ttys?

It's usually the same as C-@, ie. NUL, but AFAIK not all terminals support
that.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Tex-mode binding of C-return
  2005-05-04  8:18       ` Kim F. Storm
@ 2005-05-04 15:24         ` Luc Teirlinck
  0 siblings, 0 replies; 11+ messages in thread
From: Luc Teirlinck @ 2005-05-04 15:24 UTC (permalink / raw)
  Cc: monnier, emacs-devel

Kim Storm wrote:

   > Yes.  But S-TAB does not and S-TAB is unfortunately used for TAB in
   > the inverse direction in tons of spaces in Emacs, which is a nuisance.

   If I hit S-TAB (GNU/Linux + X), I get this message:

      <backtab> (translated from <S-iso-lefttab>) is undefined

It is only bound in certain modes.  For instance, Info-prev-reference
is a rather important command in Info, but it is, by default, not
bound to any key on a tty.  Strictly speaking, it is bound to
<backtab> or <S-tab>, but on a tty, that gets translated to <tab>, so
if you press S-tab, you go to the _next_ reference instead of the
previous one.  Same for widget-backward in Custom, but there at least
you can use `p' if you know about it.

Sincerely,

Luc.

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

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

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-02 11:25 Tex-mode binding of C-return Kim F. Storm
2005-05-02 19:14 ` Stefan Monnier
2005-05-03  8:02   ` Kim F. Storm
2005-05-03 15:42     ` Stefan Monnier
2005-05-04  2:38     ` Luc Teirlinck
2005-05-04  8:18       ` Kim F. Storm
2005-05-04 15:24         ` Luc Teirlinck
2005-05-04  2:53     ` Luc Teirlinck
2005-05-04  9:20     ` Andreas Schwab
2005-05-02 21:44 ` Daniel Brockman
2005-05-04  5:53 ` Harald Maier

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