From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Barton Subject: Re: Re-align All Tables in a Region. Date: Sun, 19 Aug 2012 11:46:20 +0100 Message-ID: <5030C3FC.5050409@wilkesley.net> References: <502F4EDF.3080800@wilkesley.net> Reply-To: ian@manor-farm.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3342-0003A4-F8 for emacs-orgmode@gnu.org; Sun, 19 Aug 2012 06:49:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T3341-0003Ve-CO for emacs-orgmode@gnu.org; Sun, 19 Aug 2012 06:49:02 -0400 Received: from mail2.wilkesley.net ([109.74.196.44]:40895 helo=li40-130.members.linode.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3341-0003UO-6h for emacs-orgmode@gnu.org; Sun, 19 Aug 2012 06:49:01 -0400 Received: from [192.168.0.58] (unknown [46.33.134.31]) (Authenticated sender: lists@wilkesley.net) by li40-130.members.linode.com (Postfix) with ESMTPSA id 5D0925ECB18 for ; Sun, 19 Aug 2012 11:48:47 +0100 (BST) In-Reply-To: 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: emacs-orgmode@gnu.org On 18/08/12 09:40, Andrew Young wrote: Sat, Aug 18, 2012 at 4:14 AM, Ian Barton wrote: >> I have a file which contains lots of tables. The document is created by a >> shell script, so when it's opened none of the tables are aligned. Is there a >> command that will let me re-align all tables in a region? There are a lot of >> tables, so I don't want to do them one at a time. >> >> As a workaround I have used #+STARTUP: align in the buffer, which aligns >> them if I C-c on the in buffer setting. >> >> Ian. >> > > Not sure if there is a built-in, but this seems to work for me: > > #+begin_src emacs-lisp > (defun my-align-all-tables () > (interactive) > (org-table-map-tables 'org-table-align 'quietly)) > #+end_src > > Hope this helps. > > Sincerely, > Andrew > Thanks Andrew, that works perfectly. Ian.