emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* table, moving cells
@ 2010-09-25 16:02 "Martin G. Skjæveland"
  2010-09-25 21:19 ` Charles C. Berry
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: "Martin G. Skjæveland" @ 2010-09-25 16:02 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

is there a quick way for moving a cell about in a table? I enjoy 
swapping the order of rows and columns in a table using Meta + [arrow], 
but I have not found a ways of doing the same for a single cell. Is it 
possible?

Example, with the cursor on '2' in the following table

| A | B | C |
| 1 | 2 | 3 |
| x | y | z |

and pressing [move cell left] would give me

| A | B | C |
| 2 | 1 | 3 |
| x | y | z |

Thanks!

Martin

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

* Re: table, moving cells
  2010-09-25 16:02 table, moving cells "Martin G. Skjæveland"
@ 2010-09-25 21:19 ` Charles C. Berry
  2010-09-25 22:24   ` Nick Dokos
  2010-09-26  5:46 ` Noorul Islam
  2010-09-29 15:58 ` Carsten Dominik
  2 siblings, 1 reply; 9+ messages in thread
From: Charles C. Berry @ 2010-09-25 21:19 UTC (permalink / raw)
  To: "Martin G. Skjæveland"; +Cc: emacs-orgmode

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1082 bytes --]

On Sat, 25 Sep 2010, "Martin G. Skjæveland" wrote:

> Hi,
>
> is there a quick way for moving a cell about in a table? I enjoy swapping the 
> order of rows and columns in a table using Meta + [arrow], but I have not 
> found a ways of doing the same for a single cell. Is it possible?
>
> Example, with the cursor on '2' in the following table
>
> |  A | B | C |
> |  1 | 2 | 3 |
> |  x | y | z |
>

Try

 	M-t

HTH,

Chuck

> and pressing [move cell left] would give me
>
> |  A | B | C |
> |  2 | 1 | 3 |
> |  x | y | z |
>
> Thanks!
>
> Martin
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry@tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901


[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: table, moving cells
  2010-09-25 21:19 ` Charles C. Berry
@ 2010-09-25 22:24   ` Nick Dokos
  2010-09-27  7:50     ` "Martin G. Skjæveland"
  0 siblings, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2010-09-25 22:24 UTC (permalink / raw)
  To: Charles C. Berry
  Cc: "Martin G. Skjæveland", nicholas.dokos,
	emacs-orgmode

Charles C. Berry <cberry@tajo.ucsd.edu> wrote:

> > is there a quick way for moving a cell about in a table? I enjoy
> > swapping the order of rows and columns in a table using Meta +
> > [arrow], but I have not found a ways of doing the same for a single
> > cell. Is it possible?
> >
> > Example, with the cursor on '2' in the following table
> >
> > |  A | B | C |
> > |  1 | 2 | 3 |
> > |  x | y | z |
> >
> 
> Try
> 
> 	M-t
> 

[This is probably obvious, but just in case...]

M-t transposes words: it doesn't know anything about table cells, so it
won't work for anything more complicated than the sample table (e.g. if
there are spaces in the cell element). You also have to be careful to
position the cursor at the right place for it to work, even in the
simple case: you can't just click in a cell and go.

Nick

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

* Re: table, moving cells
  2010-09-25 16:02 table, moving cells "Martin G. Skjæveland"
  2010-09-25 21:19 ` Charles C. Berry
@ 2010-09-26  5:46 ` Noorul Islam
  2010-09-29 15:58 ` Carsten Dominik
  2 siblings, 0 replies; 9+ messages in thread
From: Noorul Islam @ 2010-09-26  5:46 UTC (permalink / raw)
  To: Martin G. Skjæveland; +Cc: emacs-orgmode

On Sat, Sep 25, 2010 at 9:32 PM, "Martin G. Skjæveland"
<martige@ifi.uio.no> wrote:
> Hi,
>
> is there a quick way for moving a cell about in a table? I enjoy swapping
> the order of rows and columns in a table using Meta + [arrow], but I have
> not found a ways of doing the same for a single cell. Is it possible?
>
> Example, with the cursor on '2' in the following table
>
> | A | B | C |
> | 1 | 2 | 3 |
> | x | y | z |
>
> and pressing [move cell left] would give me
>
> | A | B | C |
> | 2 | 1 | 3 |
> | x | y | z |
>

I looked at the code and I could not see anything related to this. I
think this is not implemented as of now. I think this can be a feature
request.

Thanks and Regards
Noorul

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

* Re: table, moving cells
  2010-09-25 22:24   ` Nick Dokos
@ 2010-09-27  7:50     ` "Martin G. Skjæveland"
  0 siblings, 0 replies; 9+ messages in thread
From: "Martin G. Skjæveland" @ 2010-09-27  7:50 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Charles C. Berry

On 26/09/10 00:24, Nick Dokos wrote:
> Charles C. Berry<cberry@tajo.ucsd.edu>  wrote:
>
>>> is there a quick way for moving a cell about in a table? I enjoy
>>> swapping the order of rows and columns in a table using Meta +
>>> [arrow], but I have not found a ways of doing the same for a single
>>> cell. Is it possible?
>>>
>>> Example, with the cursor on '2' in the following table
>>>
>>> |  A | B | C |
>>> |  1 | 2 | 3 |
>>> |  x | y | z |
>>>
 >>> and pressing [move cell left] would give me
 >>>
 >>> | A | B | C |
 >>> | 2 | 1 | 3 |
 >>> | x | y | z |
>>
>> Try
>>
>> 	M-t
 >
> [This is probably obvious, but just in case...]
>
> M-t transposes words: it doesn't know anything about table cells, ...

Yes, I agree. To make it clear, I would in addition to [move cell left], 
also like to have [move cell right], [move cell up], [move cell down].

Martin

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

* Re: table, moving cells
  2010-09-25 16:02 table, moving cells "Martin G. Skjæveland"
  2010-09-25 21:19 ` Charles C. Berry
  2010-09-26  5:46 ` Noorul Islam
@ 2010-09-29 15:58 ` Carsten Dominik
  2010-09-30  7:51   ` "Martin G. Skjæveland"
  2 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2010-09-29 15:58 UTC (permalink / raw)
  To: Martin G. Skjæveland; +Cc: emacs-orgmode

Hi Martin,

On Sep 25, 2010, at 6:02 PM, Martin G. Skjæveland wrote:

> Hi,
>
> is there a quick way for moving a cell about in a table? I enjoy  
> swapping the order of rows and columns in a table using Meta +  
> [arrow], but I have not found a ways of doing the same for a single  
> cell. Is it possible?
>
> Example, with the cursor on '2' in the following table
>
> | A | B | C |
> | 1 | 2 | 3 |
> | x | y | z |
>
> and pressing [move cell left] would give me
>
> | A | B | C |
> | 2 | 1 | 3 |
> | x | y | z |
>
> Thanks!

I fail to see the use case for this.  Yes, this can
be useful sometimes, and you can use `C-c C-x C-w' and
`C-c C-x C-y' to cut and paste individual fields or
even rectangular regions.  But for pushing a cell value
to a neighboring cell, I don't see a frequent use that
would call for a special command beyond what I listed above.
Do you?

- Carsten

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

* Re: table, moving cells
  2010-09-29 15:58 ` Carsten Dominik
@ 2010-09-30  7:51   ` "Martin G. Skjæveland"
  2010-09-30  8:22     ` Indraneel Majumdar
  2010-09-30 13:31     ` brian powell
  0 siblings, 2 replies; 9+ messages in thread
From: "Martin G. Skjæveland" @ 2010-09-30  7:51 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

On 29/09/10 17:58, Carsten Dominik wrote:
> Hi Martin,
>
> On Sep 25, 2010, at 6:02 PM, Martin G. Skjæveland wrote:
>
>> Hi,
>>
>> is there a quick way for moving a cell about in a table? I enjoy
>> swapping the order of rows and columns in a table using Meta +
>> [arrow], but I have not found a ways of doing the same for a single
>> cell. Is it possible?
>>
>> Example, with the cursor on '2' in the following table
>>
>> | A | B | C |
>> | 1 | 2 | 3 |
>> | x | y | z |
>>
>> and pressing [move cell left] would give me
>>
>> | A | B | C |
>> | 2 | 1 | 3 |
>> | x | y | z |
>>
>> Thanks!

Hi Carsten

> I fail to see the use case for this.

I have come across two use cases lately where I have been missing this 
feature: 1) in a timetable, swapping a cell or two, e.g., the title of a 
talk and the speaker, with next week's values; and 2) making a seating 
plan for a social event. In the latter, moving people about quick and 
easy is nice.

> Yes, this can
> be useful sometimes, and you can use `C-c C-x C-w' and
> `C-c C-x C-y' to cut and paste individual fields or
> even rectangular regions.

Ok, thanks, I did not know about these.

> But for pushing a cell value
> to a neighboring cell, I don't see a frequent use that
> would call for a special command beyond what I listed above.
> Do you?

I agree that it is not a frequent operation.

For the seating plan, I ended up with lots of post-it notes on a wall, 
which worked just fine! :)

Thanks again!
Martin

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

* Re: table, moving cells
  2010-09-30  7:51   ` "Martin G. Skjæveland"
@ 2010-09-30  8:22     ` Indraneel Majumdar
  2010-09-30 13:31     ` brian powell
  1 sibling, 0 replies; 9+ messages in thread
From: Indraneel Majumdar @ 2010-09-30  8:22 UTC (permalink / raw)
  To: "Martin G. Skjæveland"; +Cc: emacs-orgmode

  On 2010-09-30 13:21, "Martin G. Skjæveland" wrote:
>
> For the seating plan, I ended up with lots of post-it notes on a wall, 
> which worked just fine! :)
>
You might consider using a concept/graph editor like yED (closed source) 
or Dia or xfig and save the trees and the paint on your wall!

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

* Re: table, moving cells
  2010-09-30  7:51   ` "Martin G. Skjæveland"
  2010-09-30  8:22     ` Indraneel Majumdar
@ 2010-09-30 13:31     ` brian powell
  1 sibling, 0 replies; 9+ messages in thread
From: brian powell @ 2010-09-30 13:31 UTC (permalink / raw)
  To: Martin G. Skjæveland; +Cc: emacs-orgmode, Carsten Dominik


[-- Attachment #1.1: Type: text/plain, Size: 2568 bytes --]

Theres a very simple way to do this; its been available in EMACS as long as
I can remember--which is back to the late 80's--and OrgMode makes it even
easier since it  evens-up/covers-down/aligns columns in real-time: All you
have to do is:

Go to the bottom right corner of the cell or column you would like to move
and set a mark "CS@", then go the the top right corner of the square cell or
rectangular region of cells you intend to move and do "Cxk" ==
cut-rectangle--then go to where you want to move the cell or rectangle and
do "Cxry" to do the yank-rectangle where you'd like to put it.

I just tested it--works fine!

;-)

On Thu, Sep 30, 2010 at 3:51 AM, "Martin G. Skjæveland"
<martige@ifi.uio.no>wrote:

> On 29/09/10 17:58, Carsten Dominik wrote:
>
>> Hi Martin,
>>
>> On Sep 25, 2010, at 6:02 PM, Martin G. Skjæveland wrote:
>>
>>  Hi,
>>>
>>> is there a quick way for moving a cell about in a table? I enjoy
>>> swapping the order of rows and columns in a table using Meta +
>>> [arrow], but I have not found a ways of doing the same for a single
>>> cell. Is it possible?
>>>
>>> Example, with the cursor on '2' in the following table
>>>
>>> | A | B | C |
>>> | 1 | 2 | 3 |
>>> | x | y | z |
>>>
>>> and pressing [move cell left] would give me
>>>
>>> | A | B | C |
>>> | 2 | 1 | 3 |
>>> | x | y | z |
>>>
>>> Thanks!
>>>
>>
> Hi Carsten
>
>  I fail to see the use case for this.
>>
>
> I have come across two use cases lately where I have been missing this
> feature: 1) in a timetable, swapping a cell or two, e.g., the title of a
> talk and the speaker, with next week's values; and 2) making a seating plan
> for a social event. In the latter, moving people about quick and easy is
> nice.
>
>  Yes, this can
>> be useful sometimes, and you can use `C-c C-x C-w' and
>> `C-c C-x C-y' to cut and paste individual fields or
>> even rectangular regions.
>>
>
> Ok, thanks, I did not know about these.
>
>  But for pushing a cell value
>> to a neighboring cell, I don't see a frequent use that
>> would call for a special command beyond what I listed above.
>> Do you?
>>
>
> I agree that it is not a frequent operation.
>
> For the seating plan, I ended up with lots of post-it notes on a wall,
> which worked just fine! :)
>
> Thanks again!
> Martin
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

[-- Attachment #1.2: Type: text/html, Size: 3709 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2010-09-30 13:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-25 16:02 table, moving cells "Martin G. Skjæveland"
2010-09-25 21:19 ` Charles C. Berry
2010-09-25 22:24   ` Nick Dokos
2010-09-27  7:50     ` "Martin G. Skjæveland"
2010-09-26  5:46 ` Noorul Islam
2010-09-29 15:58 ` Carsten Dominik
2010-09-30  7:51   ` "Martin G. Skjæveland"
2010-09-30  8:22     ` Indraneel Majumdar
2010-09-30 13:31     ` brian powell

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