[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [RFC] Shrink columns dynamically
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [RFC] Shrink columns dynamically |
Date: |
Thu, 27 Jul 2017 12:11:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hello,
Eric S Fraga <address@hidden> writes:
> I have two use cases which currently are managed with the width cookies
> and I can see that they probably should be managed differently. The
> cases are:
>
> 1. a table with wide columns that is used to collect information
> (publications with authors, title, journal, etc. is an example) and
> which I use mostly by looking at it. That is, I open the document
> and scan down the table or page down or whatever. I want this table
> displayed initially with columns (e.g. title) narrowed to a specified
> width.
>
> 2. a table with many columns, too many of the screen width even if each
> column may only be a few characters wide, but one which I intend to
> be manipulating extensively. In this case, I may want to
> shrink/narrow/hide columns to make it easier to edit and do
> calculations.
>
> At present, I use width cookies for both. They work well for use case
> 1; much less well for use case 2. For me, these use cases are
> orthogonal. I would be happy with two different approaches or the same
> approach so long as the latter would retain the ability to save the view
> (for use case 1).
I pushed another take on the problem in "hide-table-column" branch.
Rebasing is required.
There, two commands are defined
- `org-table-toggle-column-width'
Shrink or expand column at point. More specifically, if the column
contains a width cookie, the column is shrunk according to it.
Otherwise, it is shrunk to 1 character. Here is its docstring:
Shrink or expand current column in an Org table.
If a width cookie specifies a width W for the column, the first
W visible characters are displayed. Otherwise, the column is
shrunk to a single character.
When optional argument ARG is a string, use it as white space
separated list of column ranges. A column range can be one of
the following patterns:
N column N only
N-M every column between N and M (both inclusive)
N- every column between N (inclusive) and the last column
-M every column between the first one and M (inclusive)
- every column
When called with `C-u]' prefix, ask for the range specification.
When called with `C-u C-u' prefix, expand all columns.
- `org-table-shrink'
Shrink all columns with a width cookie. Other columns are expanded.
This is morally equivalent to the current behaviour, although it is
now decoupled from aligning.
Moreover, I added two new STARTUP keywords: "shrink" and "noshrink",
which allow to apply aforementioned `org-table-shrink' command on all
tables upon opening a document. Not that "align" no longer toggle column
width.
Feedback welcome.
Regards,
--
Nicolas Goaziou
- Re: [O] [RFC] Shrink columns dynamically, (continued)
- Re: [O] [RFC] Shrink columns dynamically, Nicolas Goaziou, 2017/07/11
- Re: [O] [RFC] Shrink columns dynamically, Kaushal Modi, 2017/07/11
- Re: [O] [RFC] Shrink columns dynamically, Colin Baxter, 2017/07/12
- Re: [O] [RFC] Shrink columns dynamically, Nicolas Goaziou, 2017/07/12
- Re: [O] [RFC] Shrink columns dynamically, Colin Baxter, 2017/07/12
- Re: [O] [RFC] Shrink columns dynamically, Rick Frankel, 2017/07/12
- Re: [O] [RFC] Shrink columns dynamically, Nicolas Goaziou, 2017/07/27
- Message not available
- Re: [O] [RFC] Shrink columns dynamically, Eric S Fraga, 2017/07/12
- Re: [O] [RFC] Shrink columns dynamically, B.V. Raghav, 2017/07/16
- Re: [O] [RFC] Shrink columns dynamically, Nicolas Goaziou, 2017/07/27
- Re: [O] [RFC] Shrink columns dynamically,
Nicolas Goaziou <=
- Re: [O] [RFC] Shrink columns dynamically, Adam Porter, 2017/07/31
- Message not available
- Re: [O] [RFC] Shrink columns dynamically, Eric S Fraga, 2017/07/27
- Re: [O] [RFC] Shrink columns dynamically, Uwe Brauer, 2017/07/11
- Re: [O] [RFC] Shrink columns dynamically, Uwe Brauer, 2017/07/11
- Re: [O] [RFC] Shrink columns dynamically, Kaushal Modi, 2017/07/10
- Re: [O] [RFC] Shrink columns dynamically, Michael Brand, 2017/07/11
- [O] Deleting org table columns during export (Was: [RFC] Shrink columns dynamically), Kaushal Modi, 2017/07/11
- Re: [O] Deleting org table columns during export (Was: [RFC] Shrink columns dynamically), Michael Brand, 2017/07/11
- Re: [O] [RFC] Shrink columns dynamically, Nicolas Goaziou, 2017/07/11
- Re: [O] [RFC] Shrink columns dynamically, Michael Brand, 2017/07/11