From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: TABLES: Remove/add cell Date: Wed, 23 Nov 2011 20:13:50 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTIGY-0004aX-2n for emacs-orgmode@gnu.org; Wed, 23 Nov 2011 14:13:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTIGW-00066J-5j for emacs-orgmode@gnu.org; Wed, 23 Nov 2011 14:13:54 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:57592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTIGV-000668-T7 for emacs-orgmode@gnu.org; Wed, 23 Nov 2011 14:13:52 -0500 Received: by faas10 with SMTP id s10so2526760faa.0 for ; Wed, 23 Nov 2011 11:13:50 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?ISO-8859-1?Q?Gustav_Wikstr=F6m?= , Daniel Martins Cc: emacs-orgmode@gnu.org Hi Gustav and Daniel 2011/9/30 Gustav Wikstr=F6m : > How do I add or remove a single cell in a table? > Example: > I have the following table: > | 1 | 1 | > | 2 | 3 | > | 3 | 4 | > | 4 | | > Now I want to add an empty cell in @2$2 (below the heading) and thus move > the following cells in column 2 down one step. > After: > | 1 | 1 | > | 2 | | > | 3 | 3 | > | 4 | 4 | 2011/9/30 Michael Brand : > [...] transpose [...] > and split it into two (or three) tables: > > | a | b | c | d | > > | 1 | 3 | 4 | | > > (| e | f | g | h |) > > Then you can use the very convenient editing functions of Org table on > the second part of the table, to move the empty field in front of "3" | a | b | c | d | | 1 | | 3 | 4 | | e | f | g | h | > join the parts together | a | b | c | d | | 1 | | 3 | 4 | | e | f | g | h | > and transpose again. By coincidence just today I had the same need to move or rotate columns left/right, without affecting the other rows above and below. Because I need this repeatedly I wrote two in-row functions derived from org-table-move-column, without the need anymore of splitting and joining the table like above. It supports only the direction left/right. The direction up/down Gustav asked for would be harder to implement but as a workaround you can still transpose http://orgmode.org/worg/org-hacks.html#transpose-table and use the in-row left/right. from another thread: On Mon, Nov 21, 2011 at 14:31, Daniel Martins wrote: > The feature of remove/add cell is quite important. Should be a feature > request. If I understand right and only for left/right, the in-row functions cover that too: - remove: first blank the field with "C-c Space" (org-table-blank-field) and then rotate in-row left - add: rotate in-row right and replace the field content, before this step append new columns if required For more see "Change the column sequence in one row only" on Worg hacks: http://orgmode.org/worg/org-hacks.html#column-sequence-in-row Michael