Project

General

Profile

Feature #608

Emacs UI: C-return for send-line and send-region

Added by Anna Maria Bigatti over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
EmacsUI
Target version:
Start date:
28 Aug 2014
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

C-return (or ALT/META/..-return) now calls cocoa5-send-line (in addition to the old C-c C-l)
and cocoa5-source-region is called by C-c C-r.

Is it possible to have the same key-binding doing both?
(depending whether a region is selected or not)


Related issues

Related to CoCoA-5 - Feature #352: Should SourceRegion echo the "region"?Closed2013-05-21

History

#1 Updated by John Abbott over 9 years ago

Not sure I understand what you mean.
You want C-return to send the region if a region is selected, and otherwise to send just the current line?

I'm not sure I like this "flexible semantics". I think it could be confusing. If you gone to the trouble to select a region, then it is not that onerous having to type C-c C-r rather than C-return. It might make sense to define also C-c r for sending the region (in case someone lets go of the CTRL key before pressing "r").

#2 Updated by Anna Maria Bigatti over 9 years ago

John Abbott wrote:

Not sure I understand what you mean.
You want C-return to send the region if a region is selected, and otherwise to send just the current line?

Exactly. Just one key-binding for line and for region (as in old GUI)
That would make life easier for new (and old) EmacsUI users.
(and for writing user manual ;-)

#3 Updated by John Abbott over 9 years ago

  • Status changed from New to Resolved
  • Assignee set to John Abbott
  • % Done changed from 0 to 80

I have added cocoa5-send-line-or-region as well as bindings to C-RET and M-RET.

Try it; see what you think (I remain unconvinced).

Checked in. Doc is minimal.

#4 Updated by Anna Maria Bigatti over 9 years ago

Well done John! it works!
(almost: I had to make a tiny change to make it work also on emacs 22)
Now I have no excuse.... I have to write the user manual for CoCoA under emacs!
(but it should fit entirely in a page ;-)

#5 Updated by John Abbott over 9 years ago

  • Target version changed from CoCoA-5.1.2 summer 2015 to CoCoA-5.1.1 Seoul14

#6 Updated by John Abbott over 9 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 80 to 100

Anna's happy, so closing. I hope it is documented somewhere.

Also available in: Atom PDF