From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [odt/xhtml] Export lists as tables (list-tables) Date: Fri, 02 Sep 2011 19:23:36 +0200 Message-ID: <87liu66ep3.fsf@gmail.com> References: <814o0wt5xy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzXTe-0005pL-5B for emacs-orgmode@gnu.org; Fri, 02 Sep 2011 13:24:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QzXTc-0008PD-8k for emacs-orgmode@gnu.org; Fri, 02 Sep 2011 13:24:26 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:33170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzXTc-0008P7-1j for emacs-orgmode@gnu.org; Fri, 02 Sep 2011 13:24:24 -0400 Received: by wwf10 with SMTP id 10so2624977wwf.30 for ; Fri, 02 Sep 2011 10:24:23 -0700 (PDT) In-Reply-To: <814o0wt5xy.fsf@gmail.com> (Jambunathan K.'s message of "Fri, 02 Sep 2011 01:01:53 +0530") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello, Jambunathan K writes: > List-tables is a humble first step in this direction. (Proportional > sizing of columns and support for grid lines is coming soon) > > From the blurb: > ,---- > | ;; Notes on LIST-TABLES > | ;; ==================== > | ;; When `org-lparse-list-table-enable' is non-nil, the following list > | ;; > | ;; #+begin_list-table > | ;; - Row 1 > | ;; - 1.1 > | ;; - 1.2 > | ;; - 1.3 > | ;; - Row 2 > | ;; - 2.1 > | ;; - 2.2 > | ;; - 2.3 > | ;; #+end_list-table > | ;; > | ;; will be exported as though it were a table as shown below. > | ;; > | ;; | Row 1 | 1.1 | 1.2 | 1.3 | > | ;; | Row 2 | 2.1 | 2.2 | 2.3 | > | ;; > | ;; Note that org-tables are NOT multi-line and each line is mapped to > | ;; a unique row in the exported document. So if an exported table > | ;; needs to contain a single paragraph (with copious text) it needs to > | ;; be typed up in a single line. Editing such long lines using the > | ;; table editor will be a cumbersome task. Furthermore inclusion of > | ;; multi-paragraph text in a table cell is well-nigh impossible. > | ;; > | ;; LIST-TABLEs are meant to circumvent the above problems with > | ;; org-tables. > | ;; > | ;; Note that in the example above the list items could be paragraphs > | ;; themselves and the list can be arbitrarily deep. > | ;; > | ;; Inspired by following thread: > | ;; https://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01101.html > `---- This will certainly be useful to many Orgers. Though, I will make a remark on the technical side. You shouldn't use blocks for this. Blocks are on the heavy side of syntax and are to be avoided when possible. Here, Org is perfectly able to determine list end by itself[1] without an explicit boundary. Furthermore, blocks, with the obvious exception of backend specific ones, are expected to do "something" in any major exporter. Thus, to put things differently, the structure you use should mention, by one way or another, that this is ODT specific. Hence, I would suggest to use a line like: #+attr_odt: list-table just above the list instead of the current choice of syntax. Now, as this file is meant to reach Org core, I really wish we can come up with a more general solution that will benefit to every other official export backend. Indeed, while developing one specific exporter is very useful, I personally think that, on the other hand, we must aim at providing users a consistent experience with any of them[2]. That being said, nice work. Regards, [1] with the following code, when point is at an item: #+begin_src emacs-lisp (org-list-get-bottom-point (org-list-struct)) #+end_src [2] I will probably submit code soon that should help greatly in that mission. -- Nicolas Goaziou