emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo)
To: emacs-orgmode@gnu.org
Subject: Re: Table: Insert Cell
Date: Thu, 29 Jan 2015 14:43:16 -0500	[thread overview]
Message-ID: <87bnlh5q5n.fsf@yale.edu> (raw)
In-Reply-To: 874mr9tn3k.fsf@gmail.com

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.

  reply	other threads:[~2015-01-29 19:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 19:15 Table: Insert Cell Tory S. Anderson
2015-01-29 19:43 ` Jorge A. Alfaro-Murillo [this message]
2015-01-29 20:20   ` Marco Wahl
2015-01-29 20:44     ` Tory S. Anderson
2015-01-29 22:01     ` Jorge A. Alfaro-Murillo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bnlh5q5n.fsf@yale.edu \
    --to=jorge.alfaro-murillo@yale.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).