From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Shrinking columns after formula recalculation Date: Sun, 14 Apr 2019 22:50:04 -0400 Message-ID: <87y34c9e3n.fsf@alphaville.usersys.redhat.com> References: <87bm1dbsjz.fsf@alphaville.usersys.redhat.com> <87ftqmny6c.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:42947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFrhM-0006Iu-Rj for emacs-orgmode@gnu.org; Sun, 14 Apr 2019 22:50:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hFrhL-0000Q3-B8 for emacs-orgmode@gnu.org; Sun, 14 Apr 2019 22:50:20 -0400 Received: from [195.159.176.226] (port=55934 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hFrhK-0000OG-VC for emacs-orgmode@gnu.org; Sun, 14 Apr 2019 22:50:19 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hFrhE-000U8d-Qq for emacs-orgmode@gnu.org; Mon, 15 Apr 2019 04:50:12 +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 Nicolas Goaziou writes: > Hello, > > Nick Dokos writes: > >> I have a table with column width cookies. I shrink the columns with >> C-u C-c TAB and then I recalculate with C-c C-c on the #TBLFM >> line. The columns then get expanded and I have to do the C-u C-c TAB >> again after every recalculation. Is there a way to have the columns >> stay shrunk? >> >> Example: An unsolved problem in number theory: for what values of n >> is n! - 1 a prime? >> >> | n | n! -1 | prime? | >> |----+-------------------------------------------+--------| >> | / | <10> | | >> | 30 | 265252859812191058636308479999999 | 1 | >> | 31 | 8222838654177922817725562879999999 | 0 | >> | 32 | 263130836933693530167218012159999999 | 1 | >> | 33 | 8683317618811886495518194401279999999 | 1 | >> | 34 | 295232799039604140847618609643519999999 | 0 | >> | 35 | 10333147966386144929666651337523199999999 | 0 | >> >> #+TBLFM: @3$2..@>$2 = fact($1) -1 :: @3$3..@>$3 = prime($2, 10) > > Fixed. Thank you. > Indeed - thank you! But since no good deed shall go unpunished, here's another related problem I ran into: with shrunk columns, I add a few more rows to the table with S-RET on the first column, recalculate to populate the added rows and then do an undo. That undoes the results of the recalculation but it also unshrinks the column. Thanks again! -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler