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] ox-koma-letter.el: clean-up/semantic bug [4/4]
Date: Tue, 21 May 2013 21:54:13 +0200	[thread overview]
Message-ID: <20130521195413.GA58739@kenny.local> (raw)
In-Reply-To: <87ehd09p6r.fsf@pank.eu>

Hi,

Rasmus wrote:

> Viktor Rosenfeld <listuser36@gmail.com> writes:
> 
> > Actually, this patch does break LCO files. Now, if you don't set
> > AUTHOR or EMAIL in the letter the default options from the LaTeX
> > exporter always overwrite the settings defined in LCO files.
> 
> This one is tough. . .
> 
> One could #+INCLUDE an org-file but that's not really a fair comment.
> 
> I'm not really sure how to progress.
> 
> 1. One way would be do do a grep on the LCO files, but they might be
>    in the TeX PATH which would vary over TeX systems and OSes.

Way too complicated and brittle, IMHO.

> 2. Have people have empty AUTHOR and EMAIL if they've got the info in
>    an LCO file, but this is not desirable.  
>    - Supply an optional filter to remove this info ex-post, but how
>      would it know when to run?

Empty AUTHOR and EMAIL lines are not user-friendly. However, another
option is to set `user-mail-address' and `user-full-name' to nil, but
then this would also affect other areas of Emacs beside the LaTeX
expoerter (which I currently no use so I can't speak to side-effects).

> 3. Define some function to intelligently guess values based on
>    content.
>    1. Perhaps a TYPE variable.  So if TYPE is "business" or "causal"
>       and I select business a list with business-defaults would be
>       applied.  OTOH this might be too complicated to just writing a
>       LCO files. . .

Basically duplicates LCO files but will never achieve the same
functionality.

> 4. Revert the path.

Or 5, keep the change from SENDER to AUTHOR but revert the default
values to `org-koma-letter-*' variables. (Right now the AUTHOR and EMAIL
lines could be removed because they duplicate the derived latex
backend.)

> What should be the standard?  I'm compelled to go with "work as the
> LaTeX-backend", but it may not be optimal here if there's a need for
> chaining email and name regularly.

I prefer 5. :-)
 
> > Rasmus, couldn't you just set the old `org-koma-letter-sender'
> > option if you don't use LCO files?
> 
> Sure, I just thought it was inconsistent that the framework didn't use
> the same keywords as other backends.  But consistent might lack for
> good reasons.

The default LaTeX exporter does not have LCO files. Sure you can simply
\input a latex file but there is no dedicated support for this in Org
mode, is there? 

The LaTeX exporter also assumes that every LaTeX file needs a title, a
date, and an author, but this is not always true as the scrlttr2 class
shows (title, or subject, is definitely optional). Also, LaTeX blocks
which are evaluated separately don't need these values either. So I
understand striving for consistency, but I think that the use case here
is different enough to break it.

> For me the previous behavior was annoying since I usually don't set
> AUTHOR and this didn't work nicely.
> 
> > Also, I agree that SENDER should have been called AUTHOR. It was a
> > workaround because the LaTeX backend would ignore nil values for
> > AUTHOR in derived backends (but not for EMAIL, so I kept this). This
> > should now have been fixed.
> 
> OK.  So it's OK to switch to the AUTHOR keyword and just the default
> is what we need to settle on?

I think that switching from SENDER to AUTHOR, keeping the
`org-koma-letter-{author,email}' variables in the KOMA backend, but
setting them per default to `user-full-name' and `user-mail-address',
would solve both your problems and let me keep LCO files. I would then
simply set these `org-koma-letter-*' variables to `nil' and document
this setup in the docstring. I'll see tomorrow if this is feasable.

Cheers,
Viktor

> 
> –Rasmus
> 
> --
> . . . Stallman was indeed the tallest possible mountain and by
> standing on his shoulders you could see forever. . .
> 

  reply	other threads:[~2013-05-21 19:54 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20  0:28 [patch] ox-koma-letter.el: credit [1/4] Rasmus
2013-05-20  0:40 ` [patch] ox-koma-letter.el: subject changes [2/4] Rasmus
2013-05-20 15:49   ` Alan Schmitt
2013-05-20 18:23     ` Rasmus
2013-05-21  7:24       ` Alan Schmitt
2013-05-21 15:52         ` Viktor Rosenfeld
2013-05-21 17:48           ` Rasmus
2013-05-20  0:51 ` [patch] ox-koma-letter.el: credit [3/4] Rasmus
2013-05-20 15:52   ` Alan Schmitt
2013-05-21 16:56   ` Viktor Rosenfeld
2013-05-21 17:35     ` Rasmus
2013-05-21 20:06       ` Viktor Rosenfeld
     [not found]         ` <87zjvo7xkl.fsf@pank.eu>
     [not found]           ` <20130522145312.GB61443@kenny.local>
2013-05-22 17:16             ` Rasmus
2013-05-22 17:38               ` Viktor Rosenfeld
2013-05-20  0:54 ` [patch] ox-koma-letter.el: clean-up/semantic bug [4/4] Rasmus
     [not found]   ` <m2ehd1tziq.fsf@polytechnique.org>
2013-05-21  9:05     ` Rasmus
2013-05-21 11:32       ` Alan Schmitt
2013-05-21 12:22         ` Rasmus
2013-05-21 17:02           ` Viktor Rosenfeld
2013-05-21 18:13             ` Rasmus
2013-05-21 19:54               ` Viktor Rosenfeld [this message]
2013-05-21 23:23                 ` Rasmus
2013-05-22 14:39                   ` Viktor Rosenfeld
2013-05-22 22:06                     ` [PATCH] ox-koma-letter.el: Reintroduce variables removed in commit 832c6fd with proper defaults (was Re: [patch] ox-koma-letter.el: clean-up/semantic bug [4/4]) Viktor Rosenfeld
2013-05-25  5:13                       ` Robert Klein
2013-05-25  8:05                         ` Viktor Rosenfeld
2013-05-25  9:20                           ` Alan Schmitt
2013-05-25 13:57                             ` Rasmus
2013-05-25 17:03                               ` Viktor Rosenfeld
2013-05-25 17:48                                 ` [PATCH][ox-koma-letter]: sender, email and cleanup (was: [PATCH] ox-koma-letter.el: Reintroduce variables removed in commit 832c6fd with proper defaults) Rasmus
2013-05-25 21:27                                   ` [PATCH][ox-koma-letter]: sender, email and cleanup Rasmus
2013-05-26 10:58                                     ` Viktor Rosenfeld
2013-05-26 14:38                                       ` Rasmus
2013-05-26 10:54                                   ` [PATCH][ox-koma-letter]: sender, email and cleanup (was: [PATCH] ox-koma-letter.el: Reintroduce variables removed in commit 832c6fd with proper defaults) Viktor Rosenfeld
2013-05-26 14:36                                     ` [PATCH][ox-koma-letter]: sender, email and cleanup Rasmus
2013-05-27  6:25                                       ` Alan Schmitt
2013-05-27  9:22                                         ` Xavier Garrido
2013-05-27  9:51                                           ` Rasmus
2013-05-27 18:31                                           ` Viktor Rosenfeld
2013-05-27 20:42                                             ` Xavier Garrido
2013-05-26 14:51                                     ` Rasmus
2013-05-25 20:51                               ` [PATCH] ox-koma-letter.el: Reintroduce variables removed in commit 832c6fd with proper defaults (was Re: [patch] ox-koma-letter.el: clean-up/semantic bug [4/4]) Robert Klein
2013-05-25 21:41                                 ` [PATCH] ox-koma-letter.el: Reintroduce variables removed in commit 832c6fd with proper defaults Rasmus
2013-05-26 11:04                                 ` [PATCH] ox-koma-letter.el: Reintroduce variables removed in commit 832c6fd with proper defaults (was Re: [patch] ox-koma-letter.el: clean-up/semantic bug [4/4]) Viktor Rosenfeld
2013-05-20 15:44 ` [patch] ox-koma-letter.el: credit [1/4] Alan Schmitt
2013-05-20 15:49   ` Rasmus
2013-05-20 16:01     ` Alan Schmitt
2013-05-21 17:06 ` Viktor Rosenfeld

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=20130521195413.GA58739@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).