[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] ox-koma-letter.el: Reintroduce variables removed in commit 8
From: |
Viktor Rosenfeld |
Subject: |
[O] [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]) |
Date: |
Thu, 23 May 2013 00:06:50 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi Rasmus,
Viktor Rosenfeld wrote:
> Hi Rasmus,
>
> Rasmus wrote:
>
> > Viktor Rosenfeld <address@hidden> writes:
> >
> > > 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.)
> >
> > I once had a teacher who talked about the optimal degree of
> > conservatism (as well speaking positively about being in the infamoues
> > ivory tower). 5. is fine with me. So I guess the deal is
> > 1. default value is the same as in ox-latex.
> > 2. . . . but it's kept in a seperete variable ox-kl variable.
> >
> > > 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.
> >
> > Does the attached patch work for you (also with ps tags?)
>
> It works, but I noticed the following problem: According to the Emacs
> documentation `user-mail-address' is only set by Emacs after the
> initialization process has completed and if it is not explicitly set
> during initialization [1]. So, the defcustom of org-koma-letter-email
> does not work as expected if the user has not set `user-mail-address'
> before. Instead it is set to the empty string, which according to the
> code setting `user-mail-address' means "not set yet."
>
> This can be taking care of by using `after-init-hook' as in the example
> below. It has the added advantage that the value of `user-mail-address'
> will be picked up regardless of whether it is set before or after
> require'ing ox-koma-letter.
>
> Note that this creates a slight inconsistency with regard to
> `user-full-name' which is only picked up correctly if it is set before
> require'ing ox-koma-letter. I've fixed this by a slightly complicated
> defcustom definition of `org-koma-letter-author' and another
> after-init-hook.
>
> I've also changed the docstring to indicate what are the default values
> and added the :group and :type flags again.
I've put my changes into a patch against the current master (commit
06cdb2d2). Could you check it with your setup?
Cheers,
Viktor
0001-ox-koma-letter.el-Reintroduce-variables-removed-in-c.patch
Description: Text document
- Re: [O] [patch] ox-koma-letter.el: credit [3/4], (continued)
- Re: [O] [patch] ox-koma-letter.el: clean-up/semantic bug [4/4], Rasmus, 2013/05/19
- Message not available
- Re: [O] [patch] ox-koma-letter.el: clean-up/semantic bug [4/4], Rasmus, 2013/05/21
- Re: [O] [patch] ox-koma-letter.el: clean-up/semantic bug [4/4], Alan Schmitt, 2013/05/21
- Re: [O] [patch] ox-koma-letter.el: clean-up/semantic bug [4/4], Rasmus, 2013/05/21
- Re: [O] [patch] ox-koma-letter.el: clean-up/semantic bug [4/4], Viktor Rosenfeld, 2013/05/21
- Re: [O] [patch] ox-koma-letter.el: clean-up/semantic bug [4/4], Rasmus, 2013/05/21
- Re: [O] [patch] ox-koma-letter.el: clean-up/semantic bug [4/4], Viktor Rosenfeld, 2013/05/21
- Re: [O] [patch] ox-koma-letter.el: clean-up/semantic bug [4/4], Rasmus, 2013/05/21
- Re: [O] [patch] ox-koma-letter.el: clean-up/semantic bug [4/4], Viktor Rosenfeld, 2013/05/22
- [O] [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 <=
- Re: [O] [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
- Re: [O] [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
- Re: [O] [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]), Alan Schmitt, 2013/05/25
- Re: [O] [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]), Rasmus, 2013/05/25
- Re: [O] [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
- [O] [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
- Re: [O] [PATCH][ox-koma-letter]: sender, email and cleanup, Rasmus, 2013/05/25
- Re: [O] [PATCH][ox-koma-letter]: sender, email and cleanup, Viktor Rosenfeld, 2013/05/26
- Re: [O] [PATCH][ox-koma-letter]: sender, email and cleanup, Rasmus, 2013/05/26
- Re: [O] [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