From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rolf Sander (MPI)" Subject: Re: Fwd: comment lines inside org tables Date: Mon, 3 Oct 2016 15:16:16 +0200 Message-ID: <1939cc58-d566-5563-eb48-a469ea0cc388@mpic.de> References: 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]:56194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1br36W-0005Bu-N7 for emacs-orgmode@gnu.org; Mon, 03 Oct 2016 09:16:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1br36R-0001Dw-MT for emacs-orgmode@gnu.org; Mon, 03 Oct 2016 09:16:23 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:58000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1br36R-0001DQ-Cm for emacs-orgmode@gnu.org; Mon, 03 Oct 2016 09:16:19 -0400 Received: from [192.168.178.38] ([94.219.191.25]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0Mf0OX-1bXQrI0IGn-00OUft for ; Mon, 03 Oct 2016 15:16:17 +0200 In-Reply-To: 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 -----------------------------------------------------------------------