emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andrew Young <youngar17@gmail.com>
To: ian@manor-farm.org
Cc: emacs-orgmode@gnu.org
Subject: Re: Re-align All Tables in a Region.
Date: Sat, 18 Aug 2012 04:40:00 -0400	[thread overview]
Message-ID: <CAMvvmF9gQ9ME5TaZEdZnadEnK7J-P+dLq+JTkNCaP=gXJ8gntg@mail.gmail.com> (raw)
In-Reply-To: <502F4EDF.3080800@wilkesley.net>

Hi Ian,

On 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

  reply	other threads:[~2012-08-18  8:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-18  8:14 Ian Barton
2012-08-18  8:40 ` Andrew Young [this message]
2012-08-18 15:09   ` Bastien
2012-08-19 10:46   ` Ian Barton

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='CAMvvmF9gQ9ME5TaZEdZnadEnK7J-P+dLq+JTkNCaP=gXJ8gntg@mail.gmail.com' \
    --to=youngar17@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ian@manor-farm.org \
    --subject='Re: Re-align All Tables in a Region.' \
    /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

Code repositories for project(s) associated with this 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).