emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] koma letter exporter: changing the priority of options


From: Viktor Rosenfeld
Subject: Re: [O] koma letter exporter: changing the priority of options
Date: Sat, 20 Jul 2013 13:55:03 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

Alan Schmitt wrote:

> -      (format "\\KOMAoption{backaddress}{%s}\n" (if with-backaddress "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"))))
> +      (if with-backaddress (format "\\KOMAoption{backaddress}{true}\n") "")
> +      (if (not (equal with-foldmarks "true")) (format 
> "\\KOMAoption{foldmarks}{%s}\n" with-foldmarks) "")
> +      (if with-phone   (format "\\KOMAoption{fromphone}{true}\n") "")
> +      (if with-email   (format "\\KOMAoption{fromemail}{true}\n") "")))

If I read the patch correctly then the consequence is that you cannot
configure your LCO file to set defaults for these values and inhibit
them in specific letters by setting the corresponding option to nil. For
example, in my LCO file I enable all of these options but sometimes I
don't want to have foldmarks or a backaddress or whatever. So I can
write #+OPTIONS: backaddress:nil and it is supressed. The patch changes
that.

> I did some experiments and it seems that by default "foldmarks" is
> true. The idea behind the patch is that, if we don't change the default
> values, then things are not output. Let me know if this is fine with you
> and I'll commit this. (I'll also edit the work with the new default
> values.)
> 
> I still have an issue with the default value for email. I have set-up my
> email address in emacs, and it's picked up by the koma exporter. I want
> to use a different address in my work letters (which use a custom lco
> file), but the email address is overridden by the one picked up by the
> following function:
> 
> (defun org-koma-letter-email ()
>   "Return the current `user-mail-address'"
>   user-mail-address)
> 
> What I propose is the following:
> - we leave the default AUTHOR and EMAIL at nil
> - if they are still nil, we output the default values _before_ inputting
>   the lco file
> - if they are no longer nil, we output their values _after_ inputting
>   the lco file
> 
> This way, if they are not defined in the file, then the lco can override
> them, otherwise the local option will be the one used.
> 
> What do you think?

Seems fine by me.

Cheers,
Viktor

> 
> Alan
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]