From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Column width cookies stopped working in 9.2.3? Date: Sun, 12 May 2019 17:37:09 -0400 Message-ID: <87pnon4anu.fsf@alphaville.usersys.redhat.com> References: <87tve04llx.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:55729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPw9u-0006KP-49 for emacs-orgmode@gnu.org; Sun, 12 May 2019 17:37:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hPw9o-0006sl-Rr for emacs-orgmode@gnu.org; Sun, 12 May 2019 17:37:24 -0400 Received: from [195.159.176.226] (port=60192 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hPw9o-0006if-Hp for emacs-orgmode@gnu.org; Sun, 12 May 2019 17:37:20 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hPw9l-000rgw-Cs for emacs-orgmode@gnu.org; Sun, 12 May 2019 23:37:17 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Neil Jerram 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 ‘’ 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