emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Re-align All Tables in a Region.


From: Ian Barton
Subject: Re: [O] Re-align All Tables in a Region.
Date: Sun, 19 Aug 2012 11:46:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

On 18/08/12 09:40, Andrew Young wrote:
Sat, Aug 18, 2012 at 4:14 AM, Ian Barton <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]