From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: function? Date: Tue, 05 Nov 2013 17:35:31 +0100 Message-ID: <8761s6u7qk.fsf@bzg.ath.cx> References: <87li1nbt1o.fsf@mat.ucm.es> <878uxnax5e.fsf_-_@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdjbV-0000Hj-4w for emacs-orgmode@gnu.org; Tue, 05 Nov 2013 11:35:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdjbM-0005hf-UW for emacs-orgmode@gnu.org; Tue, 05 Nov 2013 11:35:45 -0500 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:36739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdjbM-0005hR-MC for emacs-orgmode@gnu.org; Tue, 05 Nov 2013 11:35:36 -0500 Received: by mail-wi0-f177.google.com with SMTP id f4so2360737wiw.4 for ; Tue, 05 Nov 2013 08:35:35 -0800 (PST) In-Reply-To: <878uxnax5e.fsf_-_@mat.ucm.es> (Uwe Brauer's message of "Mon, 21 Oct 2013 09:41:33 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Uwe Brauer Cc: emacs-orgmode@gnu.org Hi Uwe, Uwe Brauer 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