emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: alan.schmitt@polytechnique.org
Cc: emacs-orgmode@gnu.org
Subject: Re: koma letter exporter: changing the priority of options
Date: Wed, 28 Aug 2013 13:26:52 +0200	[thread overview]
Message-ID: <87zjs2qcn7.fsf@gmx.us> (raw)
In-Reply-To: <m2r4dfy31t.fsf@polytechnique.org> (Alan Schmitt's message of "Tue, 27 Aug 2013 10:02:22 +0200")

Alan,

> Sorry for the delay, I was in vacations with tethering-only internet
> access.

No worries.  A tethering-only vacation sounds great!

>> I spoke too early.  For example this letter no longer works as usual:
>>
>> #+TITLE: test
>> #+OPTIONS: foldmarks:nil
>> * Letter
>>   my letter
>> ** TO	 :TO:
>>    someone
>>    somewhere
>>
>> But this is because nil has a "new" meaning of "not set" as opposed to
>> "false".  Is this OK?  On one hand nil usually means False in ox, I
>> think (e.g. inline:nil → inline comments not posted), but on the other
>> hand nil often means not set in Emacs. . .  It is nice to having to
>> look at the extra setkomavariable, but I'm not sure whether it's
>> right.
>
> I tried to fix it in the updated attached patch. I set a default value
> of "foldmarks-not-set" to the predicate that detects if it is set in the
> file, then I compare its contents. This assumes that the user will not
> give this literal value to the option.

I'll check it out later.

>> I also find something like this ghastly:
>>
>> But perhaps it is the only way to get what you want.
>
> I could not find a way to do it another way, but I'll gladly take any
> suggestion. What we want is:
> - if email is set in the file, use it;
> - otherwise, use the one from the lco;
> - otherwise, use the default one.

Hmm, I guess we'd have to have to assign the variables to certain
lists on the fly.  If the header string is a concat of

    (PREAMBLE-STRING    DEFAULT-VALUES    LCO    BUFFER-LOCAL)

where a member of DEFAULT-VALUES is a cons, e.g.

    ("fromname" . "Rasmus").

Then we can remove all pairs from DEFAULT-VALUES where the first first
element (the "key") also exists in BUFFER-LOCAL.  

It might be too much work?  I'm not sure. . .

I've been thinking about something like that earlier, as I'd like to
sometimes introduce new KOMA-Variables on the fly (e.g. my footer
table prints some the KOMA variable ID if that KOMA variable is
defined).

>> Also, with the current setup, I can only set email before or after.
>> Why?  What if I want to let PLACE be dependent on my LCO file versus
>> my org file?
>
> I think you can do it: if you don't give the option in the file, the one
> from the LCO will be used, otherwise the one in the file will override
> it. The main thing with author and email is that they almost always have
> non-nil default values, whereas place's default value is nil. If this is
> not correct, we can extend the approach for author and email to places
> or other options.

I agree that author and email perhaps deserve special attention, but

–Rasmus

-- 
This is the kind of tedious nonsense up with which I will not put

  parent reply	other threads:[~2013-08-28 11:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-09 10:12 koma letter exporter: changing the priority of options Alan Schmitt
2013-06-09 18:00 ` Viktor Rosenfeld
2013-06-10  7:14   ` Alan Schmitt
2013-06-10  8:40   ` Rasmus
2013-07-19 13:01     ` Alan Schmitt
2013-07-19 18:57       ` Rasmus
2013-07-20 11:58         ` Viktor Rosenfeld
2013-07-20 12:59           ` Rasmus
2013-07-20 11:55       ` Viktor Rosenfeld
2013-07-22  7:14         ` Alan Schmitt
2013-07-22  7:50           ` Nicolas Goaziou
2013-07-22 12:42             ` Alan Schmitt
2013-07-22 13:17               ` Nicolas Goaziou
2013-07-22 13:45                 ` Alan Schmitt
2013-07-22 14:53           ` Alan Schmitt
2013-08-17 16:37             ` Rasmus
2013-08-17 18:16               ` Rasmus
2013-08-27  8:02                 ` Alan Schmitt
2013-08-27  8:29                   ` Alan Schmitt
2013-08-31 14:35                     ` Alan Schmitt
2013-08-31 16:05                       ` Rasmus
2013-08-28 11:26                   ` Rasmus [this message]
2013-08-28 11:43                     ` Alan Schmitt
2013-08-28 12:06                       ` Rasmus
2013-08-28 13:23                         ` Alan Schmitt

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=87zjs2qcn7.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    /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).