emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Column width cookies stopped working in 9.2.3?


From: Nick Dokos
Subject: Re: [O] Column width cookies stopped working in 9.2.3?
Date: Sun, 12 May 2019 17:37:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Neil Jerram <address@hidden> writes:

>> As Eric says, things have changed in this area. It's always a good
>> idea to check the /etc/ORG-NEWS file for such things.  In this
>> particular case, read the section entitled "Dynamically narrow table
>> columns" in the Version 9.2 "New features" section of etc/ORG-NEWS.
>
> Thanks Nick.  I did check the manual before writing, and noticed that it 
> still says:
>
>      To set the width of a column, one field anywhere in the column may
>   contain just the string ‘<N>’ where N specifies the width as a number of
>   characters.

Just to clarify: my intention was to advertise etc/ORG-NEWS more
widely and point out that it's probably the best place to learn about
things that are likely to break one's workflows (and if you read it
before you update, you just might avoid unpleasant surprises - and
this is not a specific "you", but a general "you" that includes
everybody, including me: I often forget to do this and suffer the
consequences).

>
> I think the crux of the matter is that my use case is apparently
> different from everyone else's.  Now that I've reread the whole
> section, it seems that the main target use case is _shrinking_ a
> column to be narrower than what is needed for its content.  My use
> case is the opposite: I want a column to be a fixed width that is
> always _larger_ than its content.    (FWIW, this is in order to
> avoid spurious Git diffs for column width changes, as I change the
> content in those tables.)
>
> For example, after deploying 'C-u C-c TAB', one of my tables now looks like 
> this:
>
> | Programme        ...| Sang? ...| Notes                             ...|
> |------------------...+-------...+-----------------------------------...|
> | Audition         ...|       ...| January 2019                      ...|
> |------------------...+-------...+-----------------------------------...|
> | <16>             ...| <6>   ...| <64>                              ...|
> | 2019             ...|       ...|                                   ...|
> | B minor mass     ...| Yes   ...| 1 planned absence (6 Mar)         ...|
> |                  ...|       ...| 6 Mar Present when not expected   ...|
> | Songs Summer Eve ...| No    ...|                                   ...|
> | French Choral    ...| Yes   ...| "I'm intending to sing in [this]" ...|
>
> which is IMO uglier than what it used to be, and what I'd like, like this:
>
> | Programme        | Sang?  | Notes                                           
>                  |
> |------------------+--------+------------------------------------------------------------------|
> | Audition         |        | January 2019                                    
>                  |
> |------------------+--------+------------------------------------------------------------------|
> | <16>             | <6>    | <64>                                            
>                  |
> | 2019             |        |                                                 
>                  |
> | B minor mass     | Yes    | 1 planned absence (6 Mar)                       
>                  |
> |                  |        | 6 Mar Present when not expected                 
>                  |
> | Songs Summer Eve | No     |                                                 
>                  |
> | French Choral    | Yes    | "I'm intending to sing in [this]"               
>                  |
>
> Am I right about my use case being different, and therefore perhaps
> having been caught up unintentionally in this change?
>

That may well be true: personally, I always thought of these cookies as minimum 
width specifiers, not
maximum width.

But I think you could do what you want by having a row that contains fixed 
width strings, instead of
width cookies. To make it as unobtrusive as possible, I'd use non-breaking 
spaces as the character:

|                  |        |                                                   
               |
|                  |        |                                                   
               |

There may be better solutions, but this is what sprang to my mind after reading 
your use case.

HTH
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




reply via email to

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