From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [PATCH] ox-koma-letter.el: Add support for section Date: Tue, 05 Jan 2016 19:39:24 +0100 Message-ID: <878u437twj.fsf@gmx.us> References: <87lh88zzzzz01o@me.localhost.invalid> <87y4c7wwrj.fsf@gmx.us> <87y4c5zzzzbpw5@me.localhost.invalid> <874mett9o1.fsf@gmx.us> <878u44zzzz9chq@me.localhost.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGWWP-0006YQ-9X for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 13:39:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGWWM-0004Fw-3L for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 13:39:53 -0500 Received: from plane.gmane.org ([80.91.229.3]:42830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGWWL-0004Fp-T8 for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 13:39:50 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aGWWK-0001MD-Ik for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 19:39:48 +0100 Received: from 62.80.108.11 ([62.80.108.11]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Jan 2016 19:39:48 +0100 Received: from rasmus by 62.80.108.11 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Jan 2016 19:39:48 +0100 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 Ciao Daniele, Daniele Pizzolli writes: >> Whether sections.lco is available is nontrivial. As I remember the patch, >> it also imposed level two headings to be sections. > > Not really. With the current patch, all the headings inside the main > content (that is the first not special tagged heading) are rendered with > a section level that is one level more than expected because the first > level is taken away by the main content (because the main content is not > a section). That’s fair. > So there should be some work to adjust the level by adding > +1. The behaviour of one level headings is left unchanged because of > the way ox-koma-letter works, but this can be changed, if there is a > better approach. Some notes which are probably obvious to you, but which at least I need to think about the problem follows. 1. From above, I guess you can take the relative level of the opening headline plus one. 2. As I recall, there’s no limitation on the level of the opening in org-koma-letter--keyword-or-headline. It simply takes the first headline without a special keyword. It need not be top level. It seems you’d have to implement the following: - The opening headline is at the relative top level. /This breaks backward-comparability/. So perhaps only if sections are requested, although ox-koma-letter already has WAY too many options and configurations. - Sections start at (1+ (or "the opening level" "the relative top level")). - Bonus: How to configure the mapping of levels to section, subsection etc. E.g. what if I want to use \addsect in stead of sections? (I don’t remember if this is supported by sections.lco; IMO it’s very reasonable to just take assumptions according to what is available in sections.lco) Some people organizes letters like this with subtree export (re previous posts to this list). It must work in that case. * letter one ** to one :to: ** opening one, Letter 1 * letter two ** to two :to: ** opening two, Letter 1 >> If you really think this is the right approach, perhaps the "H:" option >> could be used to set the special heading level... We’d need this since >> you can specify the opening with a heading. > > I am lost here. H: should work as expected. We have the inverse > problem (go up to the level with sections). Compare #+options: H:2 * section ** frame and #+options: H:1 * section ** frame in ox-beamer. Perhaps it’s an overkill for ox-koma-letter. > Thanks for the info, I admit that LT and kpsewhich are unknown to me, as > I said I try to stay away from latex and tex as much as possible. If > there is some agreement on the patch I will update the doc to add those > info. I think it’s best to add a switch (defcustom) either per document or at least a global variable. It defaults to nil. E.g. #+options: sections:t Thanks, Rasmus -- And I faced endless streams of vendor-approved Ikea furniture. . .