1

I would like to know, how to add a new line in a column without changing the other columns. Alternatively, how to move up a cell in a column without changing the other columns.

Here is an example (before):

| Example | Example |
|---------+---------|
|       1 | A       |
|       2 | B       |
|       3 |         |

After unknown insert of a new line above A:

| Example | Example |
|---------+---------|
|       1 |         |
|       2 | A       |
|       3 | B       |

Lets now move up cell A in second column without changing the other columns:

| Example | Example |
|---------+---------|
|       1 | A       |
|       2 |         |
|       3 | B       |

I read the documentation, but did not find a direct answer.

1

You can cut / copy / paste rectangular sections of tables, with C-c C-x followed by the usual C-w, M-w and C-y.

This is documented in the same manual page you referenced.

So, to move part of a column, mark the starting cell with C-spc, move to the end cell, then cut the table region, and paste were desired.

  • I see. I expected something along the lines of "Move cursor behind A, then press ... to move down all the cells in that column". But this is possibly fast enough. – Lukas Feb 19 at 17:18
1

Alternatively to a table command there are rectangle operations in emacs link. You could add a line at the bottom of the table and then kill and yank a column rectangle C-x r k and C-x r y?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.