From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rolf Sander Subject: Re: Fwd: comment lines inside org tables Date: Sun, 2 Oct 2016 21:23:24 +0200 Message-ID: References: <74597925-06d8-c5a3-198c-cfaa1acedd57@mpic.de> <87fuol1swa.fsf@nicolasgoaziou.fr> <55425935-58dc-b2d3-5b96-ec44ccbdd939@mpic.de> <87bmz910up.fsf@nicolasgoaziou.fr> <8737khxuvt.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqmMJ-0002AG-Vg for emacs-orgmode@gnu.org; Sun, 02 Oct 2016 15:23:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqmMF-0007OP-Mh for emacs-orgmode@gnu.org; Sun, 02 Oct 2016 15:23:34 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:50255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqmMF-0007N1-Br for emacs-orgmode@gnu.org; Sun, 02 Oct 2016 15:23:31 -0400 Received: from [192.168.178.38] ([178.4.186.3]) by mrelayeu.kundenserver.de (mreue102) with ESMTPSA (Nemesis) id 0LpwTX-1bEfec24Ah-00fj7Z for ; Sun, 02 Oct 2016 21:23:25 +0200 In-Reply-To: <8737khxuvt.fsf@nicolasgoaziou.fr> 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 Hello Nicolas, > Allowing to comment anything is a can of worms I really don't want to > open. Maybe you are misinterpreting what I wrote. I don't want to comment "anything". All I want is that a table line starting with "|-/" is not expanded to "|---+---+---|" on the next re-align. Instead, it should remain unchanged. > It complicates a lot of code for little benefit. Well, regarding the benefit we seem to have different opinions. The table that I use for my work has 871 lines, 20 columns and a width of 234 characters. With such a big table, I would highly benefit from comment lines. Regarding the code, I already wrote a few lines for org-table-align adding this feature and I don't think it is too complicated. > Sorry, but you're barely scratching the surface of the problem. It is quite possible that you are right. Indeed, there is a possibility that my addition has some negative side effects. To find out if this is really the case, I have written to this email list, asking for advise. > Formulas don't handle these special lines, neither do exported tables. I don't understand why you say this. I have tested formulas and exporting, taking an example table from the manual and adding two comment lines. Everything still works fine: |---+---------+--------+--------+--------+-------+------| | | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note | |---+---------+--------+--------+--------+-------+------| | ! | | P1 | P2 | P3 | Tot | | | # | Maximum | 10 | 15 | 25 | 50 | 10.0 | | ^ | | m1 | m2 | m3 | mt | | |---+---------+--------+--------+--------+-------+------| |-/ students in Mr Miller's class: |---+---------+--------+--------+--------+-------+------| | # | Peter | 10 | 8 | 23 | 41 | 8.2 | | # | Sam | 2 | 4 | 3 | 9 | 1.8 | |---+---------+--------+--------+--------+-------+------| |-/ students in Mr Smith's class: |---+---------+--------+--------+--------+-------+------| | # | Tom | 16 | 8 | 28 | 52 | 10.4 | | # | Andy | 8 | 4 | 3 | 15 | 3.0 | |---+---------+--------+--------+--------+-------+------| | | Average | | | | 25.0 | | | ^ | | | | | at | | | $ | max=50 | | | | | | |---+---------+--------+--------+--------+-------+------| #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@-I);%.1f So I'm asking again: Does anyone see any negative side effects when my modification is introduced? It only prevents that a table line starting with "|-/" is expanded to "|---+---+---|" on a re-align. As mentioned in a previous post, if you want to test my modification, you can find it here: http://www.rolf-sander.net/tmp/org-table-align-new.el Best regards Rolf -- ----------------------------------------------------------------------- www.rolf-sander.net -----------------------------------------------------------------------