From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [patch, koma-letter] Change of subject behavior Date: Tue, 17 Mar 2015 22:00:36 +0100 Message-ID: <87wq2f1gqz.fsf@nicolasgoaziou.fr> References: <87d247h6eo.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXyaE-0005Ag-BD for emacs-orgmode@gnu.org; Tue, 17 Mar 2015 16:59:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXyaB-00043S-67 for emacs-orgmode@gnu.org; Tue, 17 Mar 2015 16:59:26 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:49999) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXyaB-00043I-0c for emacs-orgmode@gnu.org; Tue, 17 Mar 2015 16:59:23 -0400 In-Reply-To: <87d247h6eo.fsf@gmx.us> (rasmus@gmx.us's message of "Tue, 17 Mar 2015 18:37:19 +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: Rasmus Cc: emacs-orgmode@gnu.org Hello, Rasmus writes: > I want to change the subject inference in ox-koma-letter to only happen on > top-level headlines. > > Thus, in the following example the opening would be "opening" and not "h1" > as it is currently. > > * opening > ** h1 > > Typically, "h1" is just there to help me organize the letter. > > Any objections? This is a bug indeed. However, I don't think :opening setting belongs to `org-koma-letter-headline', as it means it is potentially set each time a headline is being processed. The (when ...) could be moved within `org-koma-letter-template', where "\opening{...}" is filled and the first headline without a special tag in the parse tree could be used (assuming there's no special keyword...). That headline can be found using `org-element-map'. Another (smallish) advantage is that the following case would be allowed: ***** Dear myself, * Part 1 WDYT? Regards, -- Nicolas Goaziou