Re: [O] TABLES: Remove/add cell

2011-12-18 Thread Michael Brand
Hi Bastien

On Sun, Dec 11, 2011 at 17:42, Bastien  wrote:
> This is great -- would you like to prepare a patch to org-table.el
> adding these feature?  If you can come up with compatible keybindings,
> that would be even better.

Lack of repetitive key binding possibilities was only one of several
reasons (now all listed at the end of the article on Worg) why I
decided to put this only to Worg hacks and not into the Org core.

Michael



Re: [O] TABLES: Remove/add cell

2011-12-11 Thread Bastien
Achim Gratz  writes:

> There's one thing to take care of, though:
>
> In org-table-transpose-table-at-point:
> org-table.el:1774:33:Warning: function `remove-if-not' from cl package called
> at runtime

Done.  Thanks for spotting this!

-- 
 Bastien



Re: [O] TABLES: Remove/add cell

2011-12-11 Thread Achim Gratz
Bastien  writes:
> Yes.  `org-table-transpose-table-at-point' is now part of Org's core.

There's one thing to take care of, though:

In org-table-transpose-table-at-point:
org-table.el:1774:33:Warning: function `remove-if-not' from cl package called
at runtime


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] TABLES: Remove/add cell

2011-12-11 Thread Bastien
Hi Michael,

Michael Brand  writes:

> 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

This is great -- would you like to prepare a patch to org-table.el 
adding these feature?  If you can come up with compatible keybindings,
that would be even better.

Thanks a lot in advance!

-- 
 Bastien



Re: [O] TABLES: Remove/add cell

2011-12-11 Thread Bastien
Hi Michael and Daniel,

Daniel Martins  writes:

> One vote for being part of the core of org-mode!!! (with org-table
> rtanspose as well)

Yes.  `org-table-transpose-table-at-point' is now part of Org's core.

-- 
 Bastien



Re: [O] TABLES: Remove/add cell

2011-11-24 Thread Daniel Martins
Great Michael!!!

One vote for being part of the core of org-mode!!! (with org-table
rtanspose as well)

Daniel

2011/11/23 Michael Brand :
> Hi Gustav and Daniel
>
> 2011/9/30 Gustav Wikström :
>> 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
>



Re: [O] TABLES: Remove/add cell

2011-11-23 Thread Michael Brand
Hi Gustav and Daniel

2011/9/30 Gustav Wikström :
> 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



Re: [O] TABLES: Remove/add cell

2011-10-01 Thread suvayu ali
2011/9/30 Michael Brand :
> 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.

There are some org-table specific rectangle edit commands that should
make it easier. Cut the cells with org-table-cut-region, and paste by
org-table-paste-rectangle.

Hope this helps.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] TABLES: Remove/add cell

2011-09-30 Thread Gustav Wikström
This is similar to the way I've done it before. It makes it cumbersome if
there are many lines below the cell that is to be inserted though..

It would be nice to have as a function that inserts or deletes a cell in the
same way as one can insert and delete rows and columns. Maybe as a prefix
to M-S- and M-S- ?

/Gustav

On Fri, Sep 30, 2011 at 8:50 PM, brian powell wrote:

> * May want to turn org-mode/table off temporarily (or maybe it will
> just make it easier) then you can do the "rectangle edits" michael was
> referring to:
> ** Go to the point just to the right of the 4.
> ** C@ ---marks the point.
> ** Go to the 3.
> ** Cxrk
> ** Go to "@2$2"--i.e. where the "4" used to be.
> ** Cxry
> * Emacs OrgMode makes all of this easier since it lines everything up
> for you by "covering down" the columns (org-table-align)---making all
> the cells easily edited by the usual "rectangle-killing" and
> "rectangle-yanking" methods.
> ** The method above can be generalized for editing OrgMode tables
> regardless of the number of symbols in the cells--since OrgMode aligns
> them for you; and, EMACS is restricted only by the amount of RAM in
> your computer.
> *** Also, if you want to edit gygabyte size files, using similar
> methods, I highly recommend QEMACS.
>


Re: [O] TABLES: Remove/add cell

2011-09-30 Thread Michael Brand
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 :
> 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.



Re: [O] TABLES: Remove/add cell

2011-09-30 Thread brian powell
* May want to turn org-mode/table off temporarily (or maybe it will
just make it easier) then you can do the "rectangle edits" michael was
referring to:
** Go to the point just to the right of the 4.
** C@ ---marks the point.
** Go to the 3.
** Cxrk
** Go to "@2$2"--i.e. where the "4" used to be.
** Cxry
* Emacs OrgMode makes all of this easier since it lines everything up
for you by "covering down" the columns (org-table-align)---making all
the cells easily edited by the usual "rectangle-killing" and
"rectangle-yanking" methods.
** The method above can be generalized for editing OrgMode tables
regardless of the number of symbols in the cells--since OrgMode aligns
them for you; and, EMACS is restricted only by the amount of RAM in
your computer.
*** Also, if you want to edit gygabyte size files, using similar
methods, I highly recommend QEMACS.



Re: [O] TABLES: Remove/add cell

2011-09-30 Thread Michael Brand
Hi Gustav

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.

Michael

2011/9/30 Gustav Wikström :
> 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 |
> Is this doable?



[O] TABLES: Remove/add cell

2011-09-30 Thread Gustav Wikström
Hello!

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 |

Is this doable?

Regards
Gustav