emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Column width cookies stopped working in 9.2.3?
@ 2019-05-11  9:42 Neil Jerram
  2019-05-11 14:30 ` Fraga, Eric
  2019-05-11 23:28 ` Nick Dokos
  0 siblings, 2 replies; 7+ messages in thread
From: Neil Jerram @ 2019-05-11  9:42 UTC (permalink / raw)
  To: Org Mode List

Hi,

I have tables with width cookies like this:

| <16>             | <6>   | <64>                              |

I just added new information to one of those tables, and the table
shrank down to match the size of the content, i.e. as though Org is
now ignoring the width cookies.

I believe I've also upgraded in the last few days, and now have:
Org mode version 9.2.3 (9.2.3-13-g727c3f-elpa @
/home/neil/.emacs.d/elpa/org-20190506/)

Is this a known thing?  Do I need something else now to make those
width cookies work?

Thanks,
   Neil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Column width cookies stopped working in 9.2.3?
  2019-05-11  9:42 Column width cookies stopped working in 9.2.3? Neil Jerram
@ 2019-05-11 14:30 ` Fraga, Eric
  2019-05-11 23:28 ` Nick Dokos
  1 sibling, 0 replies; 7+ messages in thread
From: Fraga, Eric @ 2019-05-11 14:30 UTC (permalink / raw)
  To: Neil Jerram; +Cc: Org Mode List

On Saturday, 11 May 2019 at 10:42, Neil Jerram wrote:
> Is this a known thing?  Do I need something else now to make those
> width cookies work?

yes, column width processing changed in org v9.  Check the manual,
section 3.2 on column width and alignment.  You will need to type C-c
TAB to shrink/expose columns.  C-u C-c TAB to shrink all columns with a
width specified.
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.3-327-g3375f0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Column width cookies stopped working in 9.2.3?
  2019-05-11  9:42 Column width cookies stopped working in 9.2.3? Neil Jerram
  2019-05-11 14:30 ` Fraga, Eric
@ 2019-05-11 23:28 ` Nick Dokos
  2019-05-12 12:15   ` Neil Jerram
  1 sibling, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2019-05-11 23:28 UTC (permalink / raw)
  To: emacs-orgmode

Neil Jerram <neiljerram@gmail.com> writes:

> Hi,
>
> I have tables with width cookies like this:
>
> | <16>             | <6>   | <64>                              |
>
> I just added new information to one of those tables, and the table
> shrank down to match the size of the content, i.e. as though Org is
> now ignoring the width cookies.
>
> I believe I've also upgraded in the last few days, and now have:
> Org mode version 9.2.3 (9.2.3-13-g727c3f-elpa @
> /home/neil/.emacs.d/elpa/org-20190506/)
>
> Is this a known thing?  Do I need something else now to make those
> width cookies work?
>

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.

-- 
Nick

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Column width cookies stopped working in 9.2.3?
  2019-05-11 23:28 ` Nick Dokos
@ 2019-05-12 12:15   ` Neil Jerram
  2019-05-12 21:37     ` Nick Dokos
  0 siblings, 1 reply; 7+ messages in thread
From: Neil Jerram @ 2019-05-12 12:15 UTC (permalink / raw)
  To: Nick Dokos; +Cc: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 3563 bytes --]

On Sun, 12 May 2019 at 00:29, Nick Dokos <ndokos@gmail.com> wrote:
>
> Neil Jerram <neiljerram@gmail.com> writes:
>
> > Hi,
> >
> > I have tables with width cookies like this:
> >
> > | <16>             | <6>   | <64>                              |
> >
> > I just added new information to one of those tables, and the table
> > shrank down to match the size of the content, i.e. as though Org is
> > now ignoring the width cookies.
> >
> > I believe I've also upgraded in the last few days, and now have:
> > Org mode version 9.2.3 (9.2.3-13-g727c3f-elpa @
> > /home/neil/.emacs.d/elpa/org-20190506/)
> >
> > Is this a known thing?  Do I need something else now to make those
> > width cookies work?
> >
>
> 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.

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?

Best wishes,
    Neil

[-- Attachment #2: Type: text/html, Size: 6146 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Column width cookies stopped working in 9.2.3?
  2019-05-12 12:15   ` Neil Jerram
@ 2019-05-12 21:37     ` Nick Dokos
  2019-05-13 10:32       ` Neil Jerram
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2019-05-12 21:37 UTC (permalink / raw)
  To: emacs-orgmode

Neil Jerram <neiljerram@gmail.com> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Column width cookies stopped working in 9.2.3?
  2019-05-12 21:37     ` Nick Dokos
@ 2019-05-13 10:32       ` Neil Jerram
  2019-05-14  6:21         ` Michael Brand
  0 siblings, 1 reply; 7+ messages in thread
From: Neil Jerram @ 2019-05-13 10:32 UTC (permalink / raw)
  To: Nick Dokos; +Cc: Org Mode List

On Sun, 12 May 2019 at 22:39, Nick Dokos <ndokos@gmail.com> wrote:
>
> 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).

Understood, and I appreciate your reply and interest in this topic.

> > 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.

Yes indeed, and that is the solution that I'm now using.  I'm not
totally sure yet if it's a durable solution or just a workaround - but
it's working for now.

Best wishes,
    Neil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Column width cookies stopped working in 9.2.3?
  2019-05-13 10:32       ` Neil Jerram
@ 2019-05-14  6:21         ` Michael Brand
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Brand @ 2019-05-14  6:21 UTC (permalink / raw)
  To: Neil Jerram; +Cc: Nick Dokos, Org Mode List

Hi all

Some opinions and very old history about exactly the same issue:

http://lists.gnu.org/archive/html/emacs-orgmode/2010-03/msg00766.html

|       | Mon       | Tue       | Wed       | Thu       | Fri       |
|-------+-----------+-----------+-----------+-----------+-----------|
|  8:15 | Math      | Compute=> | -         | Math      | Compute=> |
| 13:15 | -         | Math      | Compute=> | -         | Math      |

commit b34982368728d791c80e21f07f5046a050292f2d
Author: Carsten Dominik <carsten.dominik@gmail.com>
Date:   Sat Mar 27 16:13:45 2010 +0100

    Tables: Interpret <N> as fixed width, not maximum width

    Requested by Michael Brand

Michael

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-14  6:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-11  9:42 Column width cookies stopped working in 9.2.3? Neil Jerram
2019-05-11 14:30 ` Fraga, Eric
2019-05-11 23:28 ` Nick Dokos
2019-05-12 12:15   ` Neil Jerram
2019-05-12 21:37     ` Nick Dokos
2019-05-13 10:32       ` Neil Jerram
2019-05-14  6:21         ` Michael Brand

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