From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: alignment of description list in Org and export old and new Date: Tue, 5 Jun 2012 21:48:11 +0200 Message-ID: References: <817gvneojj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sbzjo-0002Pq-5z for emacs-orgmode@gnu.org; Tue, 05 Jun 2012 15:48:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sbzjj-0003KI-51 for emacs-orgmode@gnu.org; Tue, 05 Jun 2012 15:48:19 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:60632) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sbzji-0003K0-Op for emacs-orgmode@gnu.org; Tue, 05 Jun 2012 15:48:15 -0400 Received: by wibhm14 with SMTP id hm14so3180082wib.12 for ; Tue, 05 Jun 2012 12:48:12 -0700 (PDT) In-Reply-To: <817gvneojj.fsf@gmail.com> 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: Jambunathan K , Org Mode Hi Jambunathan, hi all Jambunathan K wrote: > Tables allow for finer control and alignment. Unfortunately, Org > doesn't support multi-line tables. To alleviate this, (Old) ODT > exporter has a feature called as List-Tables [1]. This feature is not > available with any other backends [2]. > > I am attaching the Org file that uses list-tables and the corresponding > output. Thank you for showing my example as a list-table. The ODT export you attached looks exactly how I imagined, with "same line" and "aligned". For me the most important is how the Org buffer looks like and for many cases I prefer something that has term and description on the same line also in the Org buffer. Most associations in most of my lists of associations have term and description short. Since they have to be on their own line when put into a list-tables they then take almost double the number of lines in my Org buffers. For some years now I have been hacking associations this way: | cmd -o | short term + short descr | | cmd --log-level=err | long term + short descr | | \ -o | | | cmd --create | short term + long descr bla bla bla bla | | | \ bla bla bla bla bla bla bla bla bla | | cmd --log-level=dbg | short term + long descr bla bla bla bla | | | \ bla bla bla bla bla bla bla bla bla | So far I could put up with some other disadvantages: It takes an extra effort to edit the wrapping texts despite the help of M-RET (org-table-wrap-region) and the manually added syntactic sugar "\" to help in reading. And it is not well suited for export. Of course I could narrow the table to get also the longer terms and descriptions into a single cell but then I don't like the cells truncated in the Org buffer and in the plain text Org file these rows become long and misaligned. Since the Org description list is perfect for that as long as only two columns are needed, I prefer to follow this path, also to be better prepared for optional export to various formats. I would "just" like to have more alignment for description list in the Org buffer itself. For this alignment with M-q (fill-paragraph) and C-c C-c on description list I suggest a formatting cookie, similar to Org table where "<19>" on any row narrows the column: - when any item contains only "<>": align all descriptions to the widest term of the list - when any item contains only "<19>": align all descriptions as if the widest term would be 19 wide, if necessary start the description on the next line to not hide the rest of a longer term - when none of the items matches "^<[0-9]*>$": rearrange whitespace like now, which means without aligning Example description lists for the three variants: - <> - cmd -o :: short term + short descr - cmd --log-level=err -o :: long term + short descr - cmd --create :: short term + long descr bla bla bla bla bla bla bla bla bla bla bla bla bla - cmd --log-level=dbg :: short term + long descr bla bla bla bla bla bla bla bla bla bla bla bla bla - <19> - cmd -o :: short term + short descr - cmd --log-level=err -o :: long term + short descr - cmd --create :: short term + long descr bla bla bla bla bla bla bla bla bla bla bla bla bla - cmd --log-level=dbg :: short term + long descr bla bla bla bla bla bla bla bla bla bla bla bla bla - cmd -o :: short term + short descr - cmd --log-level=err -o :: long term + short descr - cmd --create :: short term + long descr bla bla bla bla bla bla bla bla bla bla bla bla bla - cmd --log-level=dbg :: short term + long descr bla bla bla bla bla bla bla bla bla bla bla bla bla Similar to Org table, an item with only this formatting cookie would be removed automatically when exporting. The right border of the descriptions still is always according to the buffer local variable fill-column. Michael