emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: "Gustav Wikström" <gustav.erik@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: TABLES: Remove/add cell
Date: Fri, 30 Sep 2011 21:06:32 +0200	[thread overview]
Message-ID: <CALn3zoi8u93GH1iRrgvfDKJwNARi-Z5+n8P8EHTbhgWhcyiHOA@mail.gmail.com> (raw)
In-Reply-To: <CALn3zoh6o+zjbMckWhHYWnAGL+0jUsCGY+tAnCdyCw2-dyDoMQ@mail.gmail.com>

Oh, and there is a much easier solution, probably the easiest:

Transpose the table with this
http://orgmode.org/worg/org-hacks.html#sec-1-3-1
If the section numbering changed in the meantime: look for "Transpose
tables (Juan Pechiar)"

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, join the parts together and transpose
again.

Michael

2011/9/30 Michael Brand <michael.ch.brand@gmail.com>:
> Ehm - it is doable, but not by editing commands from Org table. Only
> with several rectangular edits or an Org table formula with a few
> tricks and a temporary column to be removed afterward. Probably not as
> comfortable as you have expected:
>
> - insert row in only one column
>  start with:
>  | a | 1 |   |
>  | b | 3 |   |
>  | c | 4 |   |
>  | d |   |   |
>
>  | a | 1 | 1 |
>  | b | 3 |   |
>  | c | 4 | 3 |
>  | d |   | 4 |
>  #+TBLFM: @1$3=$-1::@3$3..@>$3=subscr(@2$2..@>>$2, @# - 2)
>
> - remove again
>  start with:
>  | a | 1 |   |
>  | b |   |   |
>  | c | 3 |   |
>  | d | 4 |   |
>
>  | a | 1 | 1 |
>  | b |   | 3 |
>  | c | 3 | 4 |
>  | d | 4 |   |
>  #+TBLFM: @1$3=$-1::@2$3..@>>$3=subscr(@3$2..@>$2, @# - 1)
>
> See the Calc manual for "subscr" and the Org manual for "@#" and the rest.
>
> If it does not work (e. g. org-version 6.33) then upgrade.

  parent reply	other threads:[~2011-09-30 19:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-30 17:38 TABLES: Remove/add cell Gustav Wikström
2011-09-30 18:22 ` Michael Brand
2011-09-30 18:50   ` brian powell
2011-09-30 19:27     ` Gustav Wikström
2011-09-30 19:06   ` Michael Brand [this message]
2011-11-23 19:13     ` Michael Brand
2011-11-24 12:57       ` Daniel Martins
2011-12-11 16:41         ` Bastien
2011-12-11 17:21           ` Achim Gratz
2011-12-11 17:39             ` Bastien
2011-12-11 16:42       ` Bastien
2011-12-18 16:18         ` Michael Brand
2011-10-01  9:40   ` suvayu ali

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=CALn3zoi8u93GH1iRrgvfDKJwNARi-Z5+n8P8EHTbhgWhcyiHOA@mail.gmail.com \
    --to=michael.ch.brand@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=gustav.erik@gmail.com \
    /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).