emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: function (was: reverse column or row.)
Date: Fri, 25 Oct 2013 15:00:40 +0200	[thread overview]
Message-ID: <87ob6dy07b.fsf_-_@gilgamesch.quim.ucm.es> (raw)
In-Reply-To: CALn3zohoEhacKqQjzO6McxoVWC1Nm3Uo2+KO553r1_mtK_seGw@mail.gmail.com

[-- Attachment #1: Type: text/plain, Size: 599 bytes --]

>> "Michael" == Michael Brand <michael.ch.brand@gmail.com> writes:

Here is a function but it just works for one row, if anybody wants to
generalise it for more rows.......


(defun my-org-table-reverse-cells-in-row ()
  "Simple function to reverse cells in one row."
  (interactive)
  (save-excursion
	(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)))


Uwe 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5556 bytes --]

      reply	other threads:[~2013-10-25 13:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-24 12:40 reverse column or row Uwe Brauer
2013-10-24 20:52 ` Michael Brand
2013-10-25  9:29   ` Uwe Brauer
2013-10-25 10:59     ` Michael Brand
2013-10-25 13:00       ` Uwe Brauer [this message]

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=87ob6dy07b.fsf_-_@gilgamesch.quim.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \
    /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).