0

I'm trying to set a column width in an org-mode table, but using the syntax isn't working. Here's my table:

| col 1 | col 2 with quite a long header | col 3 here |
|-------+--------------------------------+------------|
|       |                            <5> |            |
| abc   |                            123 | x          |
| def   |                            456 | y          |

I'd expect that after a re-align, the second column would be displayed with a width of 5 -- but it stays the way seen above. I'm not exporting this file, I just want to narrow the usually-displayed column so my table is easier to read.

Any ideas why org isn't displaying the width correctly?

1

Normal realign with C-c C-c does not consider column widths (anymore?, idk). Use C-c TAB (org-table-toggle-column-width) instead to shrink or expand the current column. To narrow all columns with a specified width call it with a prefix argument C-u C-c TAB. To automatically shrink columns with a width cookie you can either set #+STARTUP: shrink on a per-file basis or org-startup-shrink-all-tables to t to do it globally.

| improve this answer | |
  • The org documentation (orgmode.org/manual/Column-width-and-alignment.html) says " The next re-align will then set the width of this column to this value." It seems that's wrong; does the documentation need to be updated? – Dan Drake Nov 8 '19 at 21:29
  • This page in the org documentation in my emacs (Org version 9.2.6) is different from the online one. But both say they are manuals for Org version 9.2. It may be that this was just recently changed. – fpiper Nov 9 '19 at 13:10
  • See STARTUP value no longer narrow table columns and Dynamically narrow table columns N.B. The links include line numbers in the file which are going to change - if they are wrong, please search for the titles instead. – NickD Nov 9 '19 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.