From: Carsten Dominik <carsten.dominik@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Achim Gratz <Stromeko@nexgo.de>, emacs-orgmode@gnu.org
Subject: Re: [Feature Request] Cross headings in tables
Date: Fri, 22 Feb 2013 13:31:28 +0100 [thread overview]
Message-ID: <848BA974-1893-46B2-AA1E-E9837F1E6A0F@gmail.com> (raw)
In-Reply-To: <87y5enpcc9.fsf@gmail.com>
On 17 feb. 2013, at 09:35, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> Achim Gratz <Stromeko@nexgo.de> writes:
>
>> I've just looked at how to implement this using org-element and the
>> new exporter. Much to my dismay I found that table headers are not
>> a separate row or row group type and the new exporter is still using
>> this "everything before the first separator is a heading" kludge.
>
> I wouldn't call that a kludge. That's where most of the mere mortals
> expect the heading to be anyway. Also, it's somewhat back-end specific.
>
>> It's easy enough to introduce a second type of separator in
>> org-element (BTW, I don't think that 'rule is a particularly good
>> symbol name for this) by adding another type of table rows, but then
>> these lines get ignored by the new exporter. While the logic used
>> there is amendable (not as easily), it would be more hackish than
>> I hoped.
>
> You only need to modify org-element if Org syntax has been changed.
>
>> Also, it appears that each element can have only one property or did
>> I miss something? It seems that having a way to get the (main)
>> property and then asking if there are sub-properties on that element
>> would allow simpler code in this particular instance and likely
>> elsewhere. Maybe I missed how to do it, though.
>
> I don't understand that part. For example:
>
> --8<---------------cut here---------------start------------->8---
> * TODO Headline :tag:
> --8<---------------cut here---------------end--------------->8---
>
> In the following buffer, you can have:
>
> (org-element-property :priority (org-element-at-point))
> (org-element-property :tag (org-element-at-point))
> (org-element-property :todo-keyword (org-element-at-point))
> (org-element-property :todo-type (org-element-at-point))
> (org-element-property :level: (org-element-at-point))
> ...
>
> So there is more than one property. See:
>
> http://orgmode.org/worg/dev/org-export-reference.html
>
> for a list of all properties associated to a given element or object
> type.
>
>> The cleanest way to implement this would be if being a header would be a
>> property of the row group (maybe returnable as the sign of the row group
>> number). There'd be two types of separators, "|-" and "|~". If the
>> line past the end of a row group is "|~", then it is a header group,
>> otherwise it is a normal group. This is incompatible with tradition,
>> but it would allow to use row groups in formulas without introducing
>> unwanted headers.
>>
>> Thoughts?
>
> I think the cleanest way to implement this would be to _not_ modify Org
> syntax, because it is export back-end very specific. Something like:
>
> #+attr_html: :header-groups (1 3)
> | This | will |
> | be | a header |
> |-----------+-----------|
> | This | won't |
> |-----------+-----------|
> | This will | be too |
> |-----------+-----------|
> | This | won't too |
I really like this approach, to mark the header groups in an attribute - maybe an backend-independent attribute? The reason why I prefer this approach is that I am weary of new syntax in Org-mode that will take up new characters of character chains. For the case of tables, if I could go back, I would even remove some of the syntax I introduced, for example for defining the values of constants - that should have been an attribute-link thing as well. Probably even row and column naming, could have been done in this way.
- Carsten
next prev parent reply other threads:[~2013-02-22 12:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 17:46 Quoting formula "cookies" in table? Achim Gratz
2010-10-05 1:25 ` Carsten Dominik
2010-10-05 17:10 ` Achim Gratz
2010-10-05 17:24 ` Carsten Dominik
2010-10-06 17:37 ` Achim Gratz
2010-10-05 17:54 ` [Feature Request] Cross headings in tables Achim Gratz
2011-01-16 18:44 ` Achim Gratz
2011-02-02 12:30 ` Lawrence Mitchell
2011-02-02 20:49 ` Achim Gratz
2011-02-08 21:52 ` Achim Gratz
2011-03-20 9:16 ` Achim Gratz
2011-05-29 18:18 ` [Orgmode] " Carsten Dominik
2011-05-30 21:02 ` Achim Gratz
2011-05-31 7:21 ` Carsten Dominik
2011-05-31 8:07 ` Lawrence Mitchell
2011-05-31 18:01 ` Achim Gratz
2011-05-31 18:44 ` Jambunathan K
2011-06-02 16:12 ` Carsten Dominik
2011-06-07 19:42 ` Achim Gratz
2013-02-16 19:21 ` Achim Gratz
2013-02-17 8:35 ` Nicolas Goaziou
2013-02-17 19:41 ` Achim Gratz
2013-02-17 21:06 ` Achim Gratz
2013-02-22 12:31 ` Carsten Dominik [this message]
2013-02-22 20:33 ` Achim Gratz
2013-02-22 20:59 ` Carsten Dominik
2013-02-23 8:10 ` Bastien
2013-02-23 12:26 ` Achim Gratz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=848BA974-1893-46B2-AA1E-E9837F1E6A0F@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=Stromeko@nexgo.de \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).