emacs-orgmode
[Top][All Lists]
Advanced

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

Re: How to align all tables at once?


From: Ihor Radchenko
Subject: Re: How to align all tables at once?
Date: Fri, 04 Nov 2022 08:52:24 +0000

Jean Louis <bugs@gnu.support> writes:

> Then I look in the code by searching for variable
> `org-startup-align-all-tables', and I find this within `define-derived-mode':
>
>   (unless org-inhibit-startup
>     (org-unmodified
>      (when org-startup-with-beamer-mode (org-beamer-mode))
>      (when (or org-startup-align-all-tables org-startup-shrink-all-tables)
>        (org-table-map-tables
>       (cond ((and org-startup-align-all-tables
>                   org-startup-shrink-all-tables)
>              (lambda () (org-table-align) (org-table-shrink)))
>             (org-startup-align-all-tables #'org-table-align)
>             (t #'org-table-shrink))
>       t))
>
> And I think such larger definitions shall rather be split into smaller
> useful functions.

You are, indeed, right. Patches welcome :)

>> Babel also auto-aligns tables in results.
>
> Would it be possible to put Org as Babel source, so that I have Org
> table inside of Babel and cause Babel to render automatically on the
> end of buffer rendering and invocation of org derived mode?

Yes.

#+begin_src org :results replace
| this | is | table |
|    1 |  2 |     3 |
| laskjdlsakjdsaldjk |    |       |
#+end_src

#+RESULTS[9f13490e4a64c55f86c49e2839d6c1b34f234a9e]:
| this               | is | table |
| 1                  |  2 |     3 |
| laskjdlsakjdsaldjk |    |       |


-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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