From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viktor Rosenfeld Subject: Re: [PATCH] Improve configurability of ox-koma-letter Date: Sun, 5 May 2013 18:44:47 +0200 Message-ID: <20130505164447.GA4095@kenny.fritz.box> References: <20130421175957.GA7821@cartman> <878v4adh12.fsf@pank.eu> <20130422112728.GE7821@cartman> <8738uidaxh.fsf@pank.eu> <20130422192216.GD725@kenny.fritz.box> <87a9oodd4w.fsf@pank.eu> <20130505132729.GB2898@kenny.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZ23T-0001On-9Y for emacs-orgmode@gnu.org; Sun, 05 May 2013 12:44:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZ23R-0004oo-SL for emacs-orgmode@gnu.org; Sun, 05 May 2013 12:44:55 -0400 Received: from mail-bk0-x236.google.com ([2a00:1450:4008:c01::236]:54808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZ23R-0004oc-Kh for emacs-orgmode@gnu.org; Sun, 05 May 2013 12:44:53 -0400 Received: by mail-bk0-f54.google.com with SMTP id y8so1287839bkt.41 for ; Sun, 05 May 2013 09:44:52 -0700 (PDT) Content-Disposition: inline In-Reply-To: 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: Alan Schmitt Cc: emacs-orgmode@gnu.org, Rasmus Hi Alan, Alan Schmitt wrote: > Hi Victor, > > Viktor Rosenfeld writes: > > > Hi Rasmus and Alan, > > > > I've changed the code so the value for foldmarks is passed through to > > KOMA-Script. It's a bit ugly insofar as one has to specify > > foldmarks:true to use the default values instead of other options, such > > as backaddress:t. However, subject also uses a string already. > > I have a question about this: is there some special magic that makes the > string "nil" to be parsed as `nil' and not as the string? I assume there must be. If I specify `foldmarks:nil' the if-statement in line 294 evaluates it as false: #+BEGIN_SRC emacs-lisp (format "\\KOMAoption{foldmarks}{%s}\n" (if with-foldmarks with-foldmarks "false")) #+END_SRC > About the subject, I had a quick look at the code and I find it > surprising: the default is "untitled", and I don't know how one can set > it to nil (unless there is some magic in plist-get that transforms the > "nil" string into nil). Same as above. `subject:nil' causes the code to skip the when-statement in line 301. #+BEGIN_SRC emacs-lisp (let ((with-subject (plist-get info :with-subject))) (when with-subject (concat (format "\\KOMAoption{subject}{%s}\n" with-subject) (format "\\setkomavar{subject}{%s}\n\n" (org-export-data (plist-get info :title) info))))) #+END_SRC Note, that untitled prints the subject but without a prefix. Setting it to nil hides the subject altogether. > Please don't hesitate to educate me, I'm very much an emacs-lisp newbie. Me too. Cheers, Viktor > > Best, > > Alan >