emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Viktor Rosenfeld <listuser36@gmail.com>
To: Rasmus <rasmus@gmx.us>
Cc: alan.schmitt@polytechnique.org, emacs-orgmode@gnu.org
Subject: Re: [PATCH] Improve configurability of ox-koma-letter
Date: Sun, 5 May 2013 15:27:29 +0200	[thread overview]
Message-ID: <20130505132729.GB2898@kenny.local> (raw)
In-Reply-To: <87a9oodd4w.fsf@pank.eu>

[-- Attachment #1: Type: text/plain, Size: 1486 bytes --]

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 <listuser36@gmail.com> 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
> 

[-- Attachment #2: 0002-ox-koma-letter.el-Give-the-user-complete-control-ove.patch --]
[-- Type: text/plain, Size: 1804 bytes --]

From b506dd781404a999056a0348fb7f3eb8c8ef4524 Mon Sep 17 00:00:00 2001
From: Viktor Rosenfeld <listuser36@gmail.com>
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


  reply	other threads:[~2013-05-05 13:27 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-21 17:59 [PATCH] Improve configurability of ox-koma-letter Viktor Rosenfeld
2013-04-22  8:24 ` Alan Schmitt
2013-04-22  8:47   ` Nicolas Goaziou
2013-04-22  9:31     ` Alan Schmitt
2013-04-22 10:57       ` Viktor Rosenfeld
2013-04-22 12:06         ` Alan Schmitt
2013-04-22 19:14           ` Viktor Rosenfeld
2013-04-23  6:40             ` Alan Schmitt
2013-04-23  9:50               ` Viktor Rosenfeld
2013-04-23  9:54                 ` Alan Schmitt
2013-05-05 13:25                   ` Viktor Rosenfeld
2013-05-05 16:24                     ` Alan Schmitt
2013-04-23  7:28             ` Alan Schmitt
2013-04-23 10:09               ` Viktor Rosenfeld
2013-04-23 11:11                 ` Alan Schmitt
2013-04-22 10:49   ` Viktor Rosenfeld
2013-05-05 13:35   ` Viktor Rosenfeld
2013-05-05 17:07     ` Alan Schmitt
2013-05-14 16:09       ` Viktor Rosenfeld
2013-05-14 21:20         ` Rasmus
2013-05-16 18:35           ` Viktor Rosenfeld
2013-05-14 23:56         ` Thomas S. Dye
2013-05-16 18:35           ` Viktor Rosenfeld
2013-05-15  6:38         ` Alan Schmitt
2013-05-14 22:29     ` Suvayu Ali
2013-05-16 18:35       ` Viktor Rosenfeld
2013-04-22  9:57 ` Rasmus
2013-04-22 11:27   ` Viktor Rosenfeld
2013-04-22 12:09     ` Rasmus
2013-04-22 19:22       ` Viktor Rosenfeld
2013-04-23 23:46         ` Rasmus
2013-05-05 13:27           ` Viktor Rosenfeld [this message]
2013-05-05 16:33             ` Alan Schmitt
2013-05-05 16:44               ` Viktor Rosenfeld
2013-05-05 17:06                 ` Alan Schmitt
2013-04-24  0:05         ` Rasmus
2013-05-05 13:30           ` Viktor Rosenfeld
2013-04-22 17:13   ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130505132729.GB2898@kenny.local \
    --to=listuser36@gmail.com \
    --cc=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=rasmus@gmx.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).