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 15:27:29 +0200 Message-ID: <20130505132729.GB2898@kenny.local> References: <20130421175957.GA7821@cartman> <878v4adh12.fsf@pank.eu> <20130422112728.GE7821@cartman> <8738uidaxh.fsf@pank.eu> <20130422192216.GD725@kenny.fritz.box> <87a9oodd4w.fsf@pank.eu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="O5XBE6gyVG5Rl6Rj" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYyyV-0002vM-IN for emacs-orgmode@gnu.org; Sun, 05 May 2013 09:27:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYyyU-00067j-Ff for emacs-orgmode@gnu.org; Sun, 05 May 2013 09:27:35 -0400 Received: from mail-bk0-x233.google.com ([2a00:1450:4008:c01::233]:58766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYyyU-00067b-5S for emacs-orgmode@gnu.org; Sun, 05 May 2013 09:27:34 -0400 Received: by mail-bk0-f51.google.com with SMTP id ji2so1241924bkc.24 for ; Sun, 05 May 2013 06:27:33 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87a9oodd4w.fsf@pank.eu> 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: alan.schmitt@polytechnique.org, emacs-orgmode@gnu.org --O5XBE6gyVG5Rl6Rj Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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. See the attached patch. Cheers, Viktor Rasmus wrote: > Viktor Rosenfeld writes: > > >> Yeah, I guess it's true. Still, since foldmarks depends on which > >> envelopes you have at hand it might make sense to have it accept a > >> string. In lisp-terms a string is still t. On the other hand the > >> current approach is consistent with your approach above so that's a > >> merit. > > > > The more I think about it the more I agree that you should be able to > > set any value of foldmarks. The only problem I see is that for other > > boolean options one can use `t' whereas for foldmarks one would need to > > use `true' (because `t' is a valid configuration value for foldmarks). > > But as long as that's documented I see no problem. I will post a patch, > > once Alan applies my previous patches. > > I don't know the details of the exporter well enough on this detail, > but perhaps it can be utilized that t ≠ "t"; if that's true in the > exporter as well. In normal lisp (characterp "t") => t and > (characterp t) nil. But I'm not sure if t would be transformed before > being able to check. . . > > Thanks, > Rasmus > > -- > May the Force be with you > --O5XBE6gyVG5Rl6Rj Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0002-ox-koma-letter.el-Give-the-user-complete-control-ove.patch" >From b506dd781404a999056a0348fb7f3eb8c8ef4524 Mon Sep 17 00:00:00 2001 From: Viktor Rosenfeld Date: Sun, 5 May 2013 15:22:51 +0200 Subject: [PATCH 2/2] ox-koma-letter.el: Give the user complete control over foldmarks appearance. * ox-koma-letter.el (org-koma-letter-use-foldmarks) Update documentation (org-koma-letter-template): Pass foldmarks setting to KOMA-Script TINYCHANGE --- contrib/lisp/ox-koma-letter.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el index 37ff903..96c0569 100644 --- a/contrib/lisp/ox-koma-letter.el +++ b/contrib/lisp/ox-koma-letter.el @@ -130,10 +130,15 @@ :group 'org-export-koma-letter :type 'boolean) -(defcustom org-koma-letter-use-foldmarks t - "Print foldmarks." +(defcustom org-koma-letter-use-foldmarks "true" + "Configure appearence of fold marks. + +Accepts any valid value for the KOMA-Script `foldmarks' option. + +Use `foldmarks:true' to activate default fold marks or +`foldmarks:nil' to deactivate fold marks." :group 'org-export-koma-letter - :type 'boolean) + :type 'string) (defcustom org-koma-letter-use-phone t "Print sender's phone number." @@ -286,7 +291,7 @@ holding export options." (with-email (plist-get info :with-email))) (concat (format "\\KOMAoption{backaddress}{%s}\n" (if with-backaddress "true" "false")) - (format "\\KOMAoption{foldmarks}{%s}\n" (if with-foldmarks "true" "false")) + (format "\\KOMAoption{foldmarks}{%s}\n" (if with-foldmarks with-foldmarks "false")) (format "\\KOMAoption{fromphone}{%s}\n" (if with-phone "true" "false")) (format "\\KOMAoption{fromemail}{%s}\n" (if with-email "true" "false")))) ;; Document start -- 1.8.2.2 --O5XBE6gyVG5Rl6Rj--