emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Table: Insert Cell
@ 2015-01-29 19:15 Tory S. Anderson
  2015-01-29 19:43 ` Jorge A. Alfaro-Murillo
  0 siblings, 1 reply; 5+ messages in thread
From: Tory S. Anderson @ 2015-01-29 19:15 UTC (permalink / raw)
  To: orgmode list

Does anyone know a solution for the surely common case of needing to insert a cell (not a column or row) into an orgmode table? Spreadsheet programs allow the option of pushing the column down or pushing the cells right in this case. How can this be achieved in orgmode? 

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

* Re: Table: Insert Cell
  2015-01-29 19:15 Table: Insert Cell Tory S. Anderson
@ 2015-01-29 19:43 ` Jorge A. Alfaro-Murillo
  2015-01-29 20:20   ` Marco Wahl
  0 siblings, 1 reply; 5+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2015-01-29 19:43 UTC (permalink / raw)
  To: emacs-orgmode

Hi Tory,

Tory S. Anderson writes:

> Does anyone know a solution for the surely common case of 
> needing to insert a cell (not a column or row) into an orgmode 
> table? Spreadsheet programs allow the option of pushing the 
> column down or pushing the cells right in this case. How can 
> this be achieved in orgmode? 

I do not think that there is a command for that. For pushing the 
row, it is trivial just write the new cell

| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |

| 1 | 2 | 3 |
| 4 | here|5 | 6 |
| 7 | 8 | 9 |

becomes

| 1 |    2 | 3 |   |
| 4 | here | 5 | 6 |
| 7 |    8 | 9 |   | 

after C-c C-c

For pushing the column, you can use kill-rectangle after inserting 
another row

| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |

TAB on the 9 cell

| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
|   |   |   | 

Move below and to the right of the 8

| 1 | 2              | 3 |
| 4 | 5              | 6 |
| 7 | 8              | 9 |
|   |   <cursor here>|   |

C-<space> there, select until the left of the 5

| 1 |              2 | 3 |
| 4 | <cursor here>5 | 6 |
| 7 |              8 | 9 |
|   |                |   |

And then C-x r k, which cuts the rectangle, should get you to

| 1 | 2 | 3 |
| 4 | | 6 |
| 7 | | 9 |
|   |   |   |

move one cell down and use C-x r y

| 1 | 2 | 3 |
| 4 | | 6 |
| 7 | 5 | 9 |
|   | 8   |   |

Finally, C-c C-c, gives you what you want

| 1 | 2 | 3 |
| 4 |   | 6 |
| 7 | 5 | 9 |
|   | 8 |   |

Best,

-- 
Jorge.

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

* Re: Table: Insert Cell
  2015-01-29 19:43 ` Jorge A. Alfaro-Murillo
@ 2015-01-29 20:20   ` Marco Wahl
  2015-01-29 20:44     ` Tory S. Anderson
  2015-01-29 22:01     ` Jorge A. Alfaro-Murillo
  0 siblings, 2 replies; 5+ messages in thread
From: Marco Wahl @ 2015-01-29 20:20 UTC (permalink / raw)
  To: emacs-orgmode

jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) writes:
> Tory S. Anderson writes:
>
>> Does anyone know a solution for the surely common case of needing to
>> insert a cell (not a column or row) into an orgmode table?
>> Spreadsheet programs allow the option of pushing the column down or
>> pushing the cells right in this case. How can this be achieved in
>> orgmode? 
>
> I do not think that there is a command for that. For pushing the row,
> it is trivial just write the new cell
>
> | 1 | 2 | 3 |
> | 4 | 5 | 6 |
> | 7 | 8 | 9 |
>
> | 1 | 2 | 3 |
> | 4 | here|5 | 6 |
> | 7 | 8 | 9 |
>
> [...]
>
> For pushing the column, you can use kill-rectangle after inserting
> another row
>
> | 1 | 2 | 3 |
> | 4 | 5 | 6 |
> | 7 | 8 | 9 |
>
> TAB on the 9 cell
>[...]
> Finally, C-c C-c, gives you what you want
>
> | 1 | 2 | 3 |
> | 4 |   | 6 |
> | 7 | 5 | 9 |
> |   | 8 |   |

This could be the day of org-table-transpose-table-at-point.

 | 1 | 2 | 3 |
 | 4 | 5 | 6 |
 | 7 | 8 | 9 |

org-table-transpose-table-at-point

 | 1 | 4 | 7 |
 | 2 | 5 | 8 |
 | 3 | 6 | 9 |

 | 1 | 4 | 7 |
 | 2 || 5 | 8 |
 | 3 | 6 | 9 |

C-c C-c

 | 1 | 4 | 7 |   |
 | 2 |   | 5 | 8 |
 | 3 | 6 | 9 |   |

org-table-transpose-table-at-point

 | 1 | 2 | 3 |
 | 4 |   | 6 |
 | 7 | 5 | 9 |
 |   | 8 |   |


Regards,  Marco
-- 
http://www.wahlzone.de
GPG: 0x49010A040A3AE6F2

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

* Re: Table: Insert Cell
  2015-01-29 20:20   ` Marco Wahl
@ 2015-01-29 20:44     ` Tory S. Anderson
  2015-01-29 22:01     ` Jorge A. Alfaro-Murillo
  1 sibling, 0 replies; 5+ messages in thread
From: Tory S. Anderson @ 2015-01-29 20:44 UTC (permalink / raw)
  To: Marco Wahl; +Cc: emacs-orgmode

Wow! That's great! One of my next projects is going to have to be putting that little sequence into a function!

Marco Wahl <marcowahlsoft@gmail.com> writes:

> jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) writes:
>> Tory S. Anderson writes:
>>
>>> Does anyone know a solution for the surely common case of needing to
>>> insert a cell (not a column or row) into an orgmode table?
>>> Spreadsheet programs allow the option of pushing the column down or
>>> pushing the cells right in this case. How can this be achieved in
>>> orgmode? 
>>
>> I do not think that there is a command for that. For pushing the row,
>> it is trivial just write the new cell
>>
>> | 1 | 2 | 3 |
>> | 4 | 5 | 6 |
>> | 7 | 8 | 9 |
>>
>> | 1 | 2 | 3 |
>> | 4 | here|5 | 6 |
>> | 7 | 8 | 9 |
>>
>> [...]
>>
>> For pushing the column, you can use kill-rectangle after inserting
>> another row
>>
>> | 1 | 2 | 3 |
>> | 4 | 5 | 6 |
>> | 7 | 8 | 9 |
>>
>> TAB on the 9 cell
>>[...]
>> Finally, C-c C-c, gives you what you want
>>
>> | 1 | 2 | 3 |
>> | 4 |   | 6 |
>> | 7 | 5 | 9 |
>> |   | 8 |   |
>
> This could be the day of org-table-transpose-table-at-point.
>
>  | 1 | 2 | 3 |
>  | 4 | 5 | 6 |
>  | 7 | 8 | 9 |
>
> org-table-transpose-table-at-point
>
>  | 1 | 4 | 7 |
>  | 2 | 5 | 8 |
>  | 3 | 6 | 9 |
>
>  | 1 | 4 | 7 |
>  | 2 || 5 | 8 |
>  | 3 | 6 | 9 |
>
> C-c C-c
>
>  | 1 | 4 | 7 |   |
>  | 2 |   | 5 | 8 |
>  | 3 | 6 | 9 |   |
>
> org-table-transpose-table-at-point
>
>  | 1 | 2 | 3 |
>  | 4 |   | 6 |
>  | 7 | 5 | 9 |
>  |   | 8 |   |
>
>
> Regards,  Marco

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

* Re: Table: Insert Cell
  2015-01-29 20:20   ` Marco Wahl
  2015-01-29 20:44     ` Tory S. Anderson
@ 2015-01-29 22:01     ` Jorge A. Alfaro-Murillo
  1 sibling, 0 replies; 5+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2015-01-29 22:01 UTC (permalink / raw)
  To: emacs-orgmode

Marco Wahl writes:

> This could be the day of org-table-transpose-table-at-point.

Argh! Thanks, so simple. I seems like I never took Linear Algebra: 
anything that you can do with rows you can do with columns, by 
transposing, doing, and transposing.

-- 
Jorge.

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

end of thread, other threads:[~2015-01-29 22:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-29 19:15 Table: Insert Cell Tory S. Anderson
2015-01-29 19:43 ` Jorge A. Alfaro-Murillo
2015-01-29 20:20   ` Marco Wahl
2015-01-29 20:44     ` Tory S. Anderson
2015-01-29 22:01     ` Jorge A. Alfaro-Murillo

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