emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ian Barton <lists@wilkesley.net>
To: emacs-orgmode@gnu.org
Subject: Re: Re-align All Tables in a Region.
Date: Sun, 19 Aug 2012 11:46:20 +0100	[thread overview]
Message-ID: <5030C3FC.5050409@wilkesley.net> (raw)
In-Reply-To: <CAMvvmF9gQ9ME5TaZEdZnadEnK7J-P+dLq+JTkNCaP=gXJ8gntg@mail.gmail.com>

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

      parent reply	other threads:[~2012-08-19 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-18  8:14 Re-align All Tables in a Region Ian Barton
2012-08-18  8:40 ` Andrew Young
2012-08-18 15:09   ` Bastien
2012-08-19 10:46   ` Ian Barton [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=5030C3FC.5050409@wilkesley.net \
    --to=lists@wilkesley.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=ian@manor-farm.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).