emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Fwd: comment lines inside org tables


From: Rolf Sander
Subject: Re: [O] Fwd: comment lines inside org tables
Date: Sun, 2 Oct 2016 21:23:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

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(@address@hidden);%.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
-----------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]