* rotate tables
@ 2013-10-20 20:12 Uwe Brauer
2013-10-20 20:24 ` Michael Brand
0 siblings, 1 reply; 11+ messages in thread
From: Uwe Brauer @ 2013-10-20 20:12 UTC (permalink / raw)
To: emacs-orgmode
Hi
I googled a bit but found no solution to the problem
of rotating a table such that
| 1 | 2 | 3 |
| 4 | 3 | 4 |
becomes
| 4 | 1 |
| 3 | 2 |
| 4 | 3 |
Thanks
Uwe Brauer
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: rotate tables
2013-10-20 20:12 rotate tables Uwe Brauer
@ 2013-10-20 20:24 ` Michael Brand
2013-10-20 20:43 ` Uwe Brauer
2013-10-21 7:41 ` function? (was: rotate tables) Uwe Brauer
0 siblings, 2 replies; 11+ messages in thread
From: Michael Brand @ 2013-10-20 20:24 UTC (permalink / raw)
To: Uwe Brauer; +Cc: Org Mode
Hi Uwe
On Sun, Oct 20, 2013 at 10:12 PM, Uwe Brauer <oub@mat.ucm.es> wrote:
> | 1 | 2 | 3 |
> | 4 | 3 | 4 |
>
> becomes
>
> | 4 | 1 |
> | 3 | 2 |
> | 4 | 3 |
1) mark table
2) M-x reverse-region
3) with point in the table: M-x org-table-transpose-table-at-point
Michael
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: rotate tables
2013-10-20 20:24 ` Michael Brand
@ 2013-10-20 20:43 ` Uwe Brauer
2013-10-21 7:41 ` function? (was: rotate tables) Uwe Brauer
1 sibling, 0 replies; 11+ messages in thread
From: Uwe Brauer @ 2013-10-20 20:43 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 447 bytes --]
>> "Michael" == Michael Brand <michael.ch.brand@gmail.com> writes:
> Hi Uwe
> On Sun, Oct 20, 2013 at 10:12 PM, Uwe Brauer <oub@mat.ucm.es> wrote:
>> | 1 | 2 | 3 |
>> | 4 | 3 | 4 |
>>
>> becomes
>>
>> | 4 | 1 |
>> | 3 | 2 |
>> | 4 | 3 |
> 1) mark table
> 2) M-x reverse-region
> 3) with point in the table: M-x org-table-transpose-table-at-point
> Michael
Cool thanks!!!
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5556 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* function? (was: rotate tables)
2013-10-20 20:24 ` Michael Brand
2013-10-20 20:43 ` Uwe Brauer
@ 2013-10-21 7:41 ` Uwe Brauer
2013-11-05 16:35 ` function? Bastien
1 sibling, 1 reply; 11+ messages in thread
From: Uwe Brauer @ 2013-10-21 7:41 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]
>> "Michael" == Michael Brand <michael.ch.brand@gmail.com> writes:
> Hi Uwe
> On Sun, Oct 20, 2013 at 10:12 PM, Uwe Brauer <oub@mat.ucm.es> wrote:
>> | 1 | 2 | 3 |
>> | 4 | 3 | 4 |
>>
>> becomes
>>
>> | 4 | 1 |
>> | 3 | 2 |
>> | 4 | 3 |
> 1) mark table
> 2) M-x reverse-region
> 3) with point in the table: M-x org-table-transpose-table-at-point
what's about a small function doing this, like
(defun org-table-rotate-table ()
"Small hack to rotate a table."
(interactive)
(if (or (and (boundp 'zmacs-region-active-p) zmacs-region-active-p)
(and (boundp 'transient-mark-mode) transient-mark-mode mark-active))
(save-restriction
(save-excursion
(narrow-to-region (point) (mark))
(goto-char (point-min))
(reverse-region (point) (mark))
(org-table-transpose-table-at-point)))))
Or?
(defun org-table-rotating-table (beg end)
"Small hack to rotate a table."
(interactive "r")
(save-excursion
(goto-char beg)
(reverse-region beg end)
(org-table-transpose-table-at-point)))
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5556 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: function?
2013-10-21 7:41 ` function? (was: rotate tables) Uwe Brauer
@ 2013-11-05 16:35 ` Bastien
2013-11-06 14:46 ` function? Uwe Brauer
0 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2013-11-05 16:35 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
Hi Uwe,
Uwe Brauer <oub@mat.ucm.es> writes:
> what's about a small function doing this, like
>
>
> (defun org-table-rotate-table ()
> "Small hack to rotate a table."
> (interactive)
> (if (or (and (boundp 'zmacs-region-active-p) zmacs-region-active-p)
> (and (boundp 'transient-mark-mode) transient-mark-mode mark-active))
> (save-restriction
> (save-excursion
> (narrow-to-region (point) (mark))
> (goto-char (point-min))
> (reverse-region (point) (mark))
> (org-table-transpose-table-at-point)))))
>
> Or?
>
> (defun org-table-rotating-table (beg end)
> "Small hack to rotate a table."
> (interactive "r")
> (save-excursion
> (goto-char beg)
> (reverse-region beg end)
> (org-table-transpose-table-at-point)))
Don't forget to add such useful functions to
http://orgmode.org/worg/org-hacks.html
Thanks!
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: function?
2013-11-05 16:35 ` function? Bastien
@ 2013-11-06 14:46 ` Uwe Brauer
2013-11-06 14:54 ` function? Bastien
0 siblings, 1 reply; 11+ messages in thread
From: Uwe Brauer @ 2013-11-06 14:46 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]
>> "Bastien" == Bastien <bzg@gnu.org> writes:
Hi Bastien,
> Hi Uwe,
> Uwe Brauer <oub@mat.ucm.es> writes:
> Don't forget to add such useful functions to
> http://orgmode.org/worg/org-hacks.html
I came to the conclusion, that the function is not useful, so I don't
think I will post it. However I think that the following function might:
(defun my-org-table-reverse-cells-in-row ()
"Simple function to reverse cells in one row. This might be useful in tables with R2L and L2R text."
(interactive)
(save-excursion
(newline 1)
(end-of-line 1)
(newline 1)
(goto-char (org-table-begin))
(org-table-transpose-table-at-point)
(let* ((beg (org-table-begin))
(end (org-table-end)))
(goto-char beg)
(reverse-region beg end))
(org-table-transpose-table-at-point)
(kill-line nil)
(goto-char (org-table-begin))
(previous-line 1)
(kill-line nil)))
I never used this site you mentioned, how can I copy the code? Do I have
to sign copyright?
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5556 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: function?
2013-11-06 14:46 ` function? Uwe Brauer
@ 2013-11-06 14:54 ` Bastien
2013-11-06 15:28 ` function? Uwe Brauer
2013-11-07 10:16 ` function? Uwe Brauer
0 siblings, 2 replies; 11+ messages in thread
From: Bastien @ 2013-11-06 14:54 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
Hi Uwe,
Uwe Brauer <oub@mat.ucm.es> writes:
> I never used this site you mentioned, how can I copy the code?
Simply send me your public key and I'll give you access to the Worg
git repository.
Then you'll be able to clone like this:
~$ git clone worg@orgmode.org:worg.git
and push changes that will be published on http://orgmode.org/worg/
> Do I have to sign copyright?
No. But code on the website is licensed under GPLv3.
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: function?
2013-11-06 14:54 ` function? Bastien
@ 2013-11-06 15:28 ` Uwe Brauer
2013-11-06 15:32 ` function? Bastien
2013-11-07 10:16 ` function? Uwe Brauer
1 sibling, 1 reply; 11+ messages in thread
From: Uwe Brauer @ 2013-11-06 15:28 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
>> "Bastien" == Bastien <bzg@gnu.org> writes:
> Hi Uwe,
> Uwe Brauer <oub@mat.ucm.es> writes:
>> I never used this site you mentioned, how can I copy the code?
> Simply send me your public key and I'll give you access to the Worg
> git repository.
s/mime or (gnu)pgp? My pgp key is 14 years old (1024).
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5556 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: function?
2013-11-06 14:54 ` function? Bastien
2013-11-06 15:28 ` function? Uwe Brauer
@ 2013-11-07 10:16 ` Uwe Brauer
2013-11-07 13:49 ` function? Bastien
1 sibling, 1 reply; 11+ messages in thread
From: Uwe Brauer @ 2013-11-07 10:16 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 652 bytes --]
>> "Bastien" == Bastien <bzg@gnu.org> writes:
> Hi Uwe,
> Uwe Brauer <oub@mat.ucm.es> writes:
>> I never used this site you mentioned, how can I copy the code?
> Simply send me your public key and I'll give you access to the Worg
> git repository.
> Then you'll be able to clone like this:
> ~$ git clone worg@orgmode.org:worg.git
So that includes the webpage, which I edit and push back the beast?
> and push changes that will be published on http://orgmode.org/worg/
>> Do I have to sign copyright?
> No. But code on the website is licensed under GPLv3.
That is fine with me.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5556 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-11-07 13:49 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-20 20:12 rotate tables Uwe Brauer
2013-10-20 20:24 ` Michael Brand
2013-10-20 20:43 ` Uwe Brauer
2013-10-21 7:41 ` function? (was: rotate tables) Uwe Brauer
2013-11-05 16:35 ` function? Bastien
2013-11-06 14:46 ` function? Uwe Brauer
2013-11-06 14:54 ` function? Bastien
2013-11-06 15:28 ` function? Uwe Brauer
2013-11-06 15:32 ` function? Bastien
2013-11-07 10:16 ` function? Uwe Brauer
2013-11-07 13:49 ` function? Bastien
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).