[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Improve configurability of ox-koma-letter
From: |
Viktor Rosenfeld |
Subject: |
Re: [O] [PATCH] Improve configurability of ox-koma-letter |
Date: |
Sun, 5 May 2013 18:44:47 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
>