emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: One-keystroke command to move blocks of text up and down
@ 2013-02-24 16:48 Susan Cragin
  2013-02-24 18:16 ` Nick Dokos
  2013-02-24 18:19 ` Bastien
  0 siblings, 2 replies; 10+ messages in thread
From: Susan Cragin @ 2013-02-24 16:48 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Emacs-orgmode list




-----Original Message-----
>From: Carsten Dominik <carsten.dominik@gmail.com>
>Sent: Feb 24, 2013 11:16 AM
>To: Susan Cragin <susancragin@earthlink.net>
>Cc: emacs-orgmode@gnu.org
>Subject: Re: [O] One-keystroke command to move blocks of text up and down
>
>
>On 24.2.2013, at 16:53, Susan Cragin <susancragin@earthlink.net> wrote:
>
>> I use Meta-up-arrow and Meta-down-arrow to move headings in org and entries in spreadsheets. 
>> Would like to be able to use the same or similar command to move blocks of text up or down. 
>> The current solution--highlight then kill/yank--is just too slow.
>> Suggestions?
>
>Hi Susan,
>
>what do you mean by "blocks".  A paragraph?  Does the command
>
>M-x mark-paragraph
>
>select the right amount of text?  If so, you could try the command transpose-paragraphs.
>
>- Carsten

No. I have the following example. Each of these sentences is a paragraph because it has a carriage return after it. I need to re-order the sentence/paragraphs into correct order. 

** Journal
This is paragraph three. 
This is paragraph two. 
This is paragraph one. 

** Other Heading

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: One-keystroke command to move blocks of text up and down
@ 2013-02-24 19:10 Susan Cragin
  2013-02-24 20:23 ` Bastien
  0 siblings, 1 reply; 10+ messages in thread
From: Susan Cragin @ 2013-02-24 19:10 UTC (permalink / raw)
  To: Bastien; +Cc: Nicolas Goaziou, emacs-orgmode, Carsten Dominik

[-- Attachment #1: Type: text/plain, Size: 870 bytes --]

>>>M-up and M-down also move paragraphs and most blocks (in Org 7.9).
>>>Unfortunately, binding is shadowed when trying to move a src block.
>>
>> When I try that I get these messages:
>> Cannot drag this element forward. 
>> Cannot drag this element backward.
>
>Can you share the file on which you tested this?

Here is the file. Most elements have been removed. The test was under today's date. 

>If there is only one paragraph under a headline, you cannot move
>it up and down, the move is constrained by the structure of the
>file.
>
>Check also C-M-t (Control Meta t) to transpose elements and
>S-M-<up/down> to move a line up and down (this last command is
>structure-agnostic and can be handy sometimes.)

Hmmm.... 
S-M-<up/down> should be the ticket but doesn't work for me. 
Assume this is SHIFT-ALT (held down together) up arrow. 
Also tried SHIFT-ESC up. 


[-- Attachment #2: temp.org --]
[-- Type: application/octet-stream, Size: 3368 bytes --]

* System
#+STARTUP: indent
#+STARTUP: xclip
** Good commands to know in Emacs
addition: CTL-C + CTL-Y
inline tasks: (require 'org-inlinetask) M-x org-inlinetask-insert-task RET
sort: C-h a org sort RET
transpose: C-x C-t
timestamps:
active C-u C-c .
inactive C-u C-c !
* 2013 AGENDA
* FEB - Calendar
| --Sunday-- | --Monday-- | -Tuesday-- | Wednesday- | -Thursday- | --Friday-- | -Saturday-- |
|------------+------------+------------+------------+------------+------------+-------------|
|            |            |            |            |            |         01 |          02 |
|            |            |            |            |            |            |             |
|------------+------------+------------+------------+------------+------------+-------------|
|         03 |         04 |         05 |         06 |         07 |         08 |          09 |
|     hockey |        BWG |            |    dentist |            |  snowstorm |             |
|------------+------------+------------+------------+------------+------------+-------------|
|         10 |         11 |         12 |         13 |         14 |         15 |          16 |
|            |        BWG |            |    dentist |            |            |             |
|            |            |            |    alt CWS |            |            |             |
|------------+------------+------------+------------+------------+------------+-------------|
|         17 |         18 |         19 |         20 |         21 |         22 |          23 |
|            |    Holiday |    CWS vol |            |            |            |             |
|------------+------------+------------+------------+------------+------------+-------------|
|         24 |         25 |         26 |         27 |         28 |            |             |
|    CWS vol |       ?CWS |            |            |            |            |             |
|------------+------------+------------+------------+------------+------------+-------------|
* Sun, 24 Feb
** Agenda
| Start | Stop | Item                 | Comment               |
|-------+------+----------------------+-----------------------|
|  6:15 |      | Cold Weather Shelter | emergency replacement |
|       |      |                      |                       |
** TODO list
| X | Pr | Task                                         | Start | Stop | Time |
|---+----+----------------------------------------------+-------+------+------|
|   | a2 | journal                                      |       |      |      |
|   | b1 | do Sched C expenses spreadsheet              | 11:00 |      |      |
|   | b2 | do Schedule C                                |       |      |      |
|   | b3 | pay bills                                    |       |      |      |
|   | c  | clean out trunk, wash 1 load shirts and pack |       |      |      |
|   | c  | pack up knitting                             |       |      |      |
| x | a1 | p&s                                          |       |      |      |
| x | c1 | shovel walk once                             |       |      |      |
|   |    |                                              |       |      |      |
|   |    |                                              |       |      |      |
** Journal
Hello this is a test.
This is a test too. 
This is three.
** Notes for tomorrow
Have to finish student papers.


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: One-keystroke command to move blocks of text up and down
@ 2013-02-24 17:13 Susan Cragin
  2013-02-24 18:09 ` Bastien
  0 siblings, 1 reply; 10+ messages in thread
From: Susan Cragin @ 2013-02-24 17:13 UTC (permalink / raw)
  To: Nicolas Goaziou, Carsten Dominik; +Cc: emacs-orgmode

>M-up and M-down also move paragraphs and most blocks (in Org 7.9).
>Unfortunately, binding is shadowed when trying to move a src block.

When I try that I get these messages:
Cannot drag this element forward. 
Cannot drag this element backward.

^ permalink raw reply	[flat|nested] 10+ messages in thread
* One-keystroke command to move blocks of text up and down
@ 2013-02-24 15:53 Susan Cragin
  2013-02-24 16:16 ` Carsten Dominik
  0 siblings, 1 reply; 10+ messages in thread
From: Susan Cragin @ 2013-02-24 15:53 UTC (permalink / raw)
  To: emacs-orgmode

I use Meta-up-arrow and Meta-down-arrow to move headings in org and entries in spreadsheets. 
Would like to be able to use the same or similar command to move blocks of text up or down. 
The current solution--highlight then kill/yank--is just too slow.
Suggestions?

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

end of thread, other threads:[~2013-02-24 20:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-24 16:48 One-keystroke command to move blocks of text up and down Susan Cragin
2013-02-24 18:16 ` Nick Dokos
2013-02-24 18:19 ` Bastien
  -- strict thread matches above, loose matches on Subject: below --
2013-02-24 19:10 Susan Cragin
2013-02-24 20:23 ` Bastien
2013-02-24 17:13 Susan Cragin
2013-02-24 18:09 ` Bastien
2013-02-24 15:53 Susan Cragin
2013-02-24 16:16 ` Carsten Dominik
2013-02-24 16:21   ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).