emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Column width cookies stopped working in 9.2.3?
Date: Sun, 12 May 2019 17:37:09 -0400	[thread overview]
Message-ID: <87pnon4anu.fsf@alphaville.usersys.redhat.com> (raw)
In-Reply-To: CAKuG=vtYGjo45U2_3R-CdFeQs_gZfyQQVOuPAXUR2o5jVv0ZCg@mail.gmail.com

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

  reply	other threads:[~2019-05-12 21:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-05-13 10:32       ` Neil Jerram
2019-05-14  6:21         ` Michael Brand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pnon4anu.fsf@alphaville.usersys.redhat.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).