* Re: Move selection up, down [not found] <1422fa24-05d5-436b-82e2-b436af0a00a3@m3g2000hsc.googlegroups.com> @ 2008-08-19 21:47 ` Lennart Borgman (gmail) 2008-08-19 22:31 ` Drew Adams 2008-08-20 23:11 ` Richard M. Stallman 0 siblings, 2 replies; 10+ messages in thread From: Lennart Borgman (gmail) @ 2008-08-19 21:47 UTC (permalink / raw) To: jiri.pejchal@gmail.com; +Cc: Emacs Devel jiri.pejchal@gmail.com wrote: > Hi, > > in Netbeans when you press M-S-up/M-S-down you move the selected text > up/down. When nothing is selected it moves the current line. > > With C-S-up/C-S-down you copy the selection up/down. When nothings is > selected it copies the current line up/down. > > Is such functionality available in emacs? > > Jiri Pejchal Based on Jiri's question I suggest that the transpose-* commands should be changed so that they transpose an active highlighted region according to the amount given by the transpose-* name. Any thoughts about that? ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Move selection up, down 2008-08-19 21:47 ` Move selection up, down Lennart Borgman (gmail) @ 2008-08-19 22:31 ` Drew Adams 2008-08-19 22:58 ` Lennart Borgman (gmail) 2008-08-20 23:11 ` Richard M. Stallman 1 sibling, 1 reply; 10+ messages in thread From: Drew Adams @ 2008-08-19 22:31 UTC (permalink / raw) To: 'Lennart Borgman (gmail)', jiri.pejchal; +Cc: 'Emacs Devel' > > in Netbeans when you press M-S-up/M-S-down you move the > selected text > > up/down. When nothing is selected it moves the current line. > > > > With C-S-up/C-S-down you copy the selection up/down. When > nothings is > > selected it copies the current line up/down. > > > > Is such functionality available in emacs? > > > > Jiri Pejchal > > Based on Jiri's question I suggest that the transpose-* > commands should > be changed so that they transpose an active highlighted > region according > to the amount given by the transpose-* name. > > Any thoughts about that? Huh? What will you do with `transpose-word', for instance, when there is an active region? I don't follow the suggestion. How about some examples? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Move selection up, down 2008-08-19 22:31 ` Drew Adams @ 2008-08-19 22:58 ` Lennart Borgman (gmail) 2008-08-19 23:21 ` Drew Adams 0 siblings, 1 reply; 10+ messages in thread From: Lennart Borgman (gmail) @ 2008-08-19 22:58 UTC (permalink / raw) To: Drew Adams; +Cc: jiri.pejchal, 'Emacs Devel' Drew Adams wrote: >>> in Netbeans when you press M-S-up/M-S-down you move the >> selected text >>> up/down. When nothing is selected it moves the current line. >>> >>> With C-S-up/C-S-down you copy the selection up/down. When >> nothings is >>> selected it copies the current line up/down. >>> >>> Is such functionality available in emacs? >>> >>> Jiri Pejchal >> Based on Jiri's question I suggest that the transpose-* >> commands should >> be changed so that they transpose an active highlighted >> region according >> to the amount given by the transpose-* name. >> >> Any thoughts about that? > > Huh? > > What will you do with `transpose-word', for instance, when there is an active > region? I don't follow the suggestion. How about some examples? Move the next or previous word (depending on which side of the region you are on) to the other side of the region. Is not that a natural extension? ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Move selection up, down 2008-08-19 22:58 ` Lennart Borgman (gmail) @ 2008-08-19 23:21 ` Drew Adams 2008-08-19 23:30 ` Lennart Borgman (gmail) 0 siblings, 1 reply; 10+ messages in thread From: Drew Adams @ 2008-08-19 23:21 UTC (permalink / raw) To: 'Lennart Borgman (gmail)'; +Cc: jiri.pejchal, 'Emacs Devel' > > What will you do with `transpose-word', for instance, when > > there is an active region? I don't follow the suggestion. > > How about some examples? > > Move the next or previous word (depending on which side of the region > you are on) to the other side of the region. Is not that a natural > extension? Dunno. I would expect it instead to swap the region and the next or previous word, leaving the separator chars between them. `transpose-word' recognizes intervening non-word chars (any number), and swaps the words around them. Sounds OK to me, but I don't have much of a opinion one way or the other. It might require users to sometimes deactivate the region to get today's effect, but that's no biggee. Presumably, the region would be kept active, so you could repeat the operation - e.g. `transpose-line' would move the region down a line each time. (That's another difference from today's commands - they deactivate the region.) Either there used to be a command that moved the region this way or I had my own, long ago. I remember using it, but I haven't missed it for many moon. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Move selection up, down 2008-08-19 23:21 ` Drew Adams @ 2008-08-19 23:30 ` Lennart Borgman (gmail) 2008-08-19 23:40 ` Drew Adams 2008-08-20 7:45 ` Jiri Pejchal 0 siblings, 2 replies; 10+ messages in thread From: Lennart Borgman (gmail) @ 2008-08-19 23:30 UTC (permalink / raw) To: Drew Adams; +Cc: jiri.pejchal, 'Emacs Devel' Drew Adams wrote: >>> What will you do with `transpose-word', for instance, when >>> there is an active region? I don't follow the suggestion. >>> How about some examples? >> Move the next or previous word (depending on which side of the region >> you are on) to the other side of the region. Is not that a natural >> extension? > > Dunno. I would expect it instead to swap the region and the next or previous > word, leaving the separator chars between them. `transpose-word' recognizes > intervening non-word chars (any number), and swaps the words around them. Isn't that the same thing? > Sounds OK to me, but I don't have much of a opinion one way or the other. It > might require users to sometimes deactivate the region to get today's effect, > but that's no biggee. > > Presumably, the region would be kept active, so you could repeat the operation - > e.g. `transpose-line' would move the region down a line each time. (That's > another difference from today's commands - they deactivate the region.) Yes. > Either there used to be a command that moved the region this way or I had my > own, long ago. I remember using it, but I haven't missed it for many moon. > > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Move selection up, down 2008-08-19 23:30 ` Lennart Borgman (gmail) @ 2008-08-19 23:40 ` Drew Adams 2008-08-19 23:48 ` Lennart Borgman (gmail) 2008-08-20 7:45 ` Jiri Pejchal 1 sibling, 1 reply; 10+ messages in thread From: Drew Adams @ 2008-08-19 23:40 UTC (permalink / raw) To: 'Lennart Borgman (gmail)'; +Cc: jiri.pejchal, 'Emacs Devel' > >>> What will you do with `transpose-word', for instance, when > >>> there is an active region? I don't follow the suggestion. > >>> How about some examples? > >> Move the next or previous word (depending on which side of > >> the region you are on) to the other side of the region. > >> Is not that a natural > >> extension? > > > > Dunno. I would expect it instead to swap the region and the > > next or previous word, leaving the separator chars between > > them. `transpose-word' recognizes intervening non-word chars > > (any number), and swaps the words around them. > > Isn't that the same thing? It depends on what you meant. If that's what you meant, then it's the same thing. ;-) But just moving the next or previous word to the other side of the region is different from swapping their places around the separators. region sep word 1. word region sep (word moved to other side of region) 2. word sep region (word and region swapped around separator) I thought perhaps you meant #1. I described #2. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Move selection up, down 2008-08-19 23:40 ` Drew Adams @ 2008-08-19 23:48 ` Lennart Borgman (gmail) 0 siblings, 0 replies; 10+ messages in thread From: Lennart Borgman (gmail) @ 2008-08-19 23:48 UTC (permalink / raw) To: Drew Adams; +Cc: jiri.pejchal, 'Emacs Devel' Drew Adams wrote: >>>>> What will you do with `transpose-word', for instance, when >>>>> there is an active region? I don't follow the suggestion. >>>>> How about some examples? >>>> Move the next or previous word (depending on which side of >>>> the region you are on) to the other side of the region. >>>> Is not that a natural >>>> extension? >>> Dunno. I would expect it instead to swap the region and the >>> next or previous word, leaving the separator chars between >>> them. `transpose-word' recognizes intervening non-word chars >>> (any number), and swaps the words around them. >> Isn't that the same thing? > > It depends on what you meant. If that's what you meant, then it's the same > thing. ;-) > > But just moving the next or previous word to the other side of the region is > different from swapping their places around the separators. > > region sep word > > 1. word region sep > (word moved to other side of region) > > 2. word sep region > (word and region swapped around separator) > > I thought perhaps you meant #1. I described #2. I think #1 would not be consistent with word definitions etc. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Move selection up, down 2008-08-19 23:30 ` Lennart Borgman (gmail) 2008-08-19 23:40 ` Drew Adams @ 2008-08-20 7:45 ` Jiri Pejchal 2008-08-20 8:15 ` martin rudalics 1 sibling, 1 reply; 10+ messages in thread From: Jiri Pejchal @ 2008-08-20 7:45 UTC (permalink / raw) To: Lennart Borgman (gmail); +Cc: Drew Adams, Emacs Devel On Wed, Aug 20, 2008 at 1:30 AM, Lennart Borgman (gmail) <lennart.borgman@gmail.com> wrote: > Drew Adams wrote: >>>> What will you do with `transpose-word', for instance, when >>>> there is an active region? I don't follow the suggestion. >>>> How about some examples? >>> Move the next or previous word (depending on which side of the region >>> you are on) to the other side of the region. Is not that a natural >>> extension? >> >> Dunno. I would expect it instead to swap the region and the next or previous >> word, leaving the separator chars between them. `transpose-word' recognizes >> intervening non-word chars (any number), and swaps the words around them. > > Isn't that the same thing? > >> Sounds OK to me, but I don't have much of a opinion one way or the other. It >> might require users to sometimes deactivate the region to get today's effect, >> but that's no biggee. >> >> Presumably, the region would be kept active, so you could repeat the operation - >> e.g. `transpose-line' would move the region down a line each time. (That's >> another difference from today's commands - they deactivate the region.) Just to make it clear the netbeans implementation is actually only line oriented. If the selection span less than one line the move/copy operations works on the line with cursor. If the selection span more than one line it operates on those lines. Alt-Shift Left/Right/Up/Down Shift lines left/right/up/down Ctrl-Shift-Up/D Copy lines up/down Jiri Pejchal ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Move selection up, down 2008-08-20 7:45 ` Jiri Pejchal @ 2008-08-20 8:15 ` martin rudalics 0 siblings, 0 replies; 10+ messages in thread From: martin rudalics @ 2008-08-20 8:15 UTC (permalink / raw) To: Jiri Pejchal; +Cc: Emacs Devel [-- Attachment #1: Type: text/plain, Size: 593 bytes --] > Just to make it clear the netbeans implementation is actually only > line oriented. > If the selection span less than one line the move/copy operations > works on the line with cursor. > If the selection span more than one line it operates on those lines. > > Alt-Shift Left/Right/Up/Down Shift lines left/right/up/down > Ctrl-Shift-Up/D Copy lines up/down If you have Emacs 23 you can use the functions `m&d-drag-line-down' and `m&d-drag-line-up' in the attached m&d.el file and add your key bindings. If you have Emacs 22 only I can try to find an older version of this. martin [-- Attachment #2: m&d.el.gz --] [-- Type: application/x-gzip, Size: 7630 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Move selection up, down 2008-08-19 21:47 ` Move selection up, down Lennart Borgman (gmail) 2008-08-19 22:31 ` Drew Adams @ 2008-08-20 23:11 ` Richard M. Stallman 1 sibling, 0 replies; 10+ messages in thread From: Richard M. Stallman @ 2008-08-20 23:11 UTC (permalink / raw) To: Lennart Borgman (gmail); +Cc: jiri.pejchal, emacs-devel Based on Jiri's question I suggest that the transpose-* commands should be changed so that they transpose an active highlighted region according to the amount given by the transpose-* name. Maybe only C-t should do that. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-08-20 23:11 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1422fa24-05d5-436b-82e2-b436af0a00a3@m3g2000hsc.googlegroups.com> 2008-08-19 21:47 ` Move selection up, down Lennart Borgman (gmail) 2008-08-19 22:31 ` Drew Adams 2008-08-19 22:58 ` Lennart Borgman (gmail) 2008-08-19 23:21 ` Drew Adams 2008-08-19 23:30 ` Lennart Borgman (gmail) 2008-08-19 23:40 ` Drew Adams 2008-08-19 23:48 ` Lennart Borgman (gmail) 2008-08-20 7:45 ` Jiri Pejchal 2008-08-20 8:15 ` martin rudalics 2008-08-20 23:11 ` Richard M. Stallman
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).