>From 2d9b513e14f6d34fe81a5970fd4cee24fc253a31 Mon Sep 17 00:00:00 2001
From: Myles English <[email protected]>
Date: Mon, 4 Apr 2016 01:11:19 +0100
Subject: [PATCH] ox-koma-letter: Fixed bug in filling 'location' field
* contrib/lisp/ox-koma-letter.el: Fix code apparently introduced
in 3ee3663
---
contrib/lisp/ox-koma-letter.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index d36e817..2ef9025 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -797,12 +797,12 @@ a communication channel."
(location-set (funcall check-scope 'location))
(location (plist-get info :location)))
(when (or (and with-location-set (or location-set heading-val))
- (and (eq scope 'buffer) (or with-location-set location-set heading-val))
- (format "\\setkomavar{location}{%s}\n"
- (if (plist-get info :with-location)
- (if (plist-get info :special-headings) (or heading-val location "")
- (or option location ""))
- "")))))
+ (and (eq scope 'buffer) (or with-location-set location-set heading-val)))
+ (format "\\setkomavar{location}{%s}\n"
+ (if (plist-get info :with-location)
+ (if (plist-get info :special-headings) (or heading-val location "")
+ (or heading-val location ""))
+ ""))))
;; Folding marks.
(and (funcall check-scope 'with-foldmarks)
(let ((foldmarks (plist-get info :with-foldmarks)))
--
2.7.4
Rasmus,
A patch is attached that fixes some naughty brackets in the recent commit.
Myles
Rasmus writes:
> Myles English <[email protected]> writes:
>
>> Thanks for looking at this again.
>
> I'm just sorry about the delay, but I hope you can appreciate that
> sometimes time is at a premium.
>
>>> Is :with-location something you feel strongly about? I'm not sure I find
>>> that it makes sense...
>>>
>>> I would like to apply the following patch on top of yours.
>>
>> I think that's alright.
>>
>> Just to recap: I use the "location" field, intended as a general purpose
>> extension field, for bank details. Those details shouldn't be in every
>> letter I write and I don't want to have to enter those details every
>> time they are used. For those reasons I put the bank details in
>> variable in a LCO file and toggle the inclusion by setting the
>> :LOCATION: (or :EXPORT_LOCATION) property like this:
>>
>> :EXPORT_LOCATION: \usekomavar{frombank}
>
> So if something should be in ALL letters the advised method would be to
> use LCO file or set the location variable. I’m just concerned with having
> too many variables. ox-koma-letter is already fairly complex.
>
> It might make sense to NOT parse (i.e. interpret org syntax) the keyword
> version or location then. Then you’d be able to add latex commands there.
> The headline version would still be parsed.
>
> Rasmus