* Transpose or open functions for table cells
@ 2013-09-27 22:52 Suvayu Ali
2013-09-28 7:27 ` Michael Brand
0 siblings, 1 reply; 6+ messages in thread
From: Suvayu Ali @ 2013-09-27 22:52 UTC (permalink / raw)
To: Emacs Org mode
Hi,
I was wondering if there are any transpose functions for table cells;
something akin to transpose-lines, or transpose-words. I am also
looking for something like org-open-line, but only for a table cell.
This is my use case:
| col 1 | col 2 | | col 1 | col 2 |
|-------+-------+ +-------+-------|
| 1 | a | | 1 | a |
| 2 | b | --> | 2 | b |
| 3 | d | | 3 | |
| 4 | e | | 4 | d |
| 5 | | | 5 | e |
If neither exists, any thoughts how might one go about writing one?
Thanks for any ideas.
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Transpose or open functions for table cells
2013-09-27 22:52 Transpose or open functions for table cells Suvayu Ali
@ 2013-09-28 7:27 ` Michael Brand
2013-09-29 21:57 ` Suvayu Ali
0 siblings, 1 reply; 6+ messages in thread
From: Michael Brand @ 2013-09-28 7:27 UTC (permalink / raw)
To: Suvayu Ali; +Cc: Emacs Org mode
Hi Suvayu
On Sat, Sep 28, 2013 at 12:52 AM, Suvayu Ali
<fatkasuvayu+linux@gmail.com> wrote:
> | 2 | b | --> | 2 | b |
> | 3 | d | | 3 | |
> | 4 | e | | 4 | d |
> | 5 | | | 5 | e |
>
> If neither exists, any thoughts how might one go about writing one?
Some time ago I wrote helper functions that do similar things for a
row:
http://orgmode.org/worg/org-hacks.html#column-sequence-in-row
Now I added a suggestion for the same in a column:
http://orgmode.org/worg/org-hacks.html#row-sequence-in-column
> I am also
> looking for something like org-open-line, but only for a table cell.
Are you looking for something different than the above?
Michael
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Transpose or open functions for table cells
2013-09-28 7:27 ` Michael Brand
@ 2013-09-29 21:57 ` Suvayu Ali
2013-09-30 18:30 ` Michael Brand
0 siblings, 1 reply; 6+ messages in thread
From: Suvayu Ali @ 2013-09-29 21:57 UTC (permalink / raw)
To: Michael Brand; +Cc: Emacs Org mode
Hi Michael,
Sorry, I forgot to respond to your response.
On Sat, Sep 28, 2013 at 09:27:45AM +0200, Michael Brand wrote:
> Hi Suvayu
>
> On Sat, Sep 28, 2013 at 12:52 AM, Suvayu Ali
> <fatkasuvayu+linux@gmail.com> wrote:
> > | 2 | b | --> | 2 | b |
> > | 3 | d | | 3 | |
> > | 4 | e | | 4 | d |
> > | 5 | | | 5 | e |
> >
> > If neither exists, any thoughts how might one go about writing one?
>
> Some time ago I wrote helper functions that do similar things for a
> row:
> http://orgmode.org/worg/org-hacks.html#column-sequence-in-row
> Now I added a suggestion for the same in a column:
> http://orgmode.org/worg/org-hacks.html#row-sequence-in-column
These look like the transpose functions I was looking for.
>
> > I am also
> > looking for something like org-open-line, but only for a table cell.
>
> Are you looking for something different than the above?
Yes, the above allows easy rearrangement of table cells. I'm looking
for something that allows me to insert cells in a row or column. In my
example from the earlier email, I insert a cell in a column.
Thanks,
:)
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Transpose or open functions for table cells
2013-09-29 21:57 ` Suvayu Ali
@ 2013-09-30 18:30 ` Michael Brand
2013-10-01 6:30 ` Achim Gratz
2013-10-04 18:52 ` Suvayu Ali
0 siblings, 2 replies; 6+ messages in thread
From: Michael Brand @ 2013-09-30 18:30 UTC (permalink / raw)
To: Suvayu Ali; +Cc: Emacs Org mode
Hi Suvayu
On Sun, Sep 29, 2013 at 11:57 PM, Suvayu Ali
<fatkasuvayu+linux@gmail.com> wrote:
> Yes, the above allows easy rearrangement of table cells. I'm looking
> for something that allows me to insert cells in a row or column. In my
> example from the earlier email, I insert a cell in a column.
As soon as I remembered that there are org-table-cut-region and
org-table-paste-rectangle I could not resist the mental exercise for
fun to implement f-org-table-open-field-in-row-grow and
f-org-table-open-field-in-column-grow. The latter gets you from
| a | b | c |
|---+----+---|
| d | 9 | e |
| f | 10 | g |
|---+----+---|
| h | 11 | i |
to
| a | b | c |
|---+----+---|
| d | | e |
| f | 9 | g |
|---+----+---|
| h | 10 | i |
| | 11 | |
Please read again the rearranged
http://orgmode.org/worg/org-hacks.html#field-same-row-or-column
Michael
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Transpose or open functions for table cells
2013-09-30 18:30 ` Michael Brand
@ 2013-10-01 6:30 ` Achim Gratz
2013-10-04 18:52 ` Suvayu Ali
1 sibling, 0 replies; 6+ messages in thread
From: Achim Gratz @ 2013-10-01 6:30 UTC (permalink / raw)
To: emacs-orgmode
Am 30.09.2013 20:30, schrieb Michael Brand:
> As soon as I remembered that there are org-table-cut-region and
> org-table-paste-rectangle I could not resist the mental exercise for
> fun to implement f-org-table-open-field-in-row-grow and
> f-org-table-open-field-in-column-grow. The latter gets you from
>
> | a | b | c |
> |---+----+---|
> | d | 9 | e |
> | f | 10 | g |
> |---+----+---|
> | h | 11 | i |
>
> to
>
> | a | b | c |
> |---+----+---|
> | d | | e |
> | f | 9 | g |
> |---+----+---|
> | h | 10 | i |
> | | 11 | |
Arguably the expected outcome might be
| a | b | c |
|---+----+---|
| d | | e |
| f | 9 | g |
| | 10 | |
|---+----+---|
| h | 11 | i |
Regards,
Achim.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Transpose or open functions for table cells
2013-09-30 18:30 ` Michael Brand
2013-10-01 6:30 ` Achim Gratz
@ 2013-10-04 18:52 ` Suvayu Ali
1 sibling, 0 replies; 6+ messages in thread
From: Suvayu Ali @ 2013-10-04 18:52 UTC (permalink / raw)
To: Michael Brand; +Cc: Emacs Org mode
Hi Michael,
On Mon, Sep 30, 2013 at 08:30:57PM +0200, Michael Brand wrote:
> Hi Suvayu
>
> On Sun, Sep 29, 2013 at 11:57 PM, Suvayu Ali
> <fatkasuvayu+linux@gmail.com> wrote:
> > Yes, the above allows easy rearrangement of table cells. I'm looking
> > for something that allows me to insert cells in a row or column. In my
> > example from the earlier email, I insert a cell in a column.
>
> As soon as I remembered that there are org-table-cut-region and
> org-table-paste-rectangle I could not resist the mental exercise for
> fun to implement f-org-table-open-field-in-row-grow and
> f-org-table-open-field-in-column-grow. The latter gets you from
>
> | a | b | c |
> |---+----+---|
> | d | 9 | e |
> | f | 10 | g |
> |---+----+---|
> | h | 11 | i |
>
> to
>
> | a | b | c |
> |---+----+---|
> | d | | e |
> | f | 9 | g |
> |---+----+---|
> | h | 10 | i |
> | | 11 | |
>
> Please read again the rearranged
> http://orgmode.org/worg/org-hacks.html#field-same-row-or-column
This works nicely. Thank you :)
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-10-04 18:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-27 22:52 Transpose or open functions for table cells Suvayu Ali
2013-09-28 7:27 ` Michael Brand
2013-09-29 21:57 ` Suvayu Ali
2013-09-30 18:30 ` Michael Brand
2013-10-01 6:30 ` Achim Gratz
2013-10-04 18:52 ` Suvayu Ali
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).