emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Myles English <mylesenglish@gmail.com>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ox-koma-letter.el: Add support for 'location' koma variable
Date: Mon, 04 Apr 2016 01:54:19 +0100	[thread overview]
Message-ID: <87oa9qfb2c.fsf@gmail.com> (raw)
In-Reply-To: <871t6nork4.fsf@gmx.us>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: patch --]
[-- Type: text/x-diff, Size: 1529 bytes --]

From 2d9b513e14f6d34fe81a5970fd4cee24fc253a31 Mon Sep 17 00:00:00 2001
From: Myles English <mylesenglish@gmail.com>
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


[-- Attachment #2: Type: text/plain, Size: 1402 bytes --]


Rasmus,

A patch is attached that fixes some naughty brackets in the recent commit.

Myles

Rasmus writes:

> Myles English <mylesenglish@gmail.com> 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


  reply	other threads:[~2016-04-04  0:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 18:32 [PATCH] ox-koma-letter.el: Add support for 'location' koma variable Myles English
2016-01-27 22:05 ` Rasmus
2016-01-28 11:19   ` Myles English
2016-01-28 12:20     ` Rasmus
2016-01-28 22:00       ` Myles English
2016-01-29 12:16         ` Rasmus
2016-01-29 22:08           ` Myles English
2016-01-29 22:39             ` Rasmus
2016-02-15 13:51               ` Myles English
2016-02-17 22:53                 ` Rasmus
2016-03-31 19:56                 ` Rasmus Pank Roulund
2016-03-31 23:32                   ` Myles English
2016-04-03 11:33                     ` Rasmus
2016-04-04  0:54                       ` Myles English [this message]
2016-04-07  8:09                         ` Rasmus
2016-01-28 20:17   ` Eric S Fraga

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=87oa9qfb2c.fsf@gmail.com \
    --to=mylesenglish@gmail.com \
    --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).