[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Template bug



Hi,

> > > When writing mail I use templates to setup the To and CC based on the
> > > parent folder and this works well. Sometimes however I have to change
> > > to a different template. C-c C-j changes the template to which ever I
> > > select and all looks well.
> > >
> > > However when I submit the mail, it reverts to the original
> > > template. What am I getting wrong?
> > 
> > I think I fixed this problem in CVS trunk:
> > 
> > ,----
> > | 2011-01-09  David Maus  <dmaus@ictsoc.de>
> > |
> > | * wl-template.el (wl-template-select): Reset draft config exec
> > | flag when selecting template.
(snip)
> I have the same problem.

I think actual commit does not make WL to avoid modification of a
draft message before sending.

Cf. https://github.com/wanderlust/wanderlust/commit/c14cbb86da450737613fb3e88f71f515167d19ee#diff-1

> @@ -97,6 +97,7 @@ Entering WL-Template mode calls the value of `wl-template-mode-hook'."
>    (interactive "P")
>    (unless wl-template-alist
>      (error "Please set `wl-template-alist'"))
> +  (setq wl-draft-config-exec-flag t)
>    (if (not (if arg
>           (not wl-template-visible-select)
>         wl-template-visible-select))

To suppress modifications, wl-draft-config-exec-flag should be set to
nil.  But I think it woud be better that wl-template-select keeps
wl-draft-config-exec-flag's value.  Because we can adjust this
behavior by settings of wl-template-alist.  Please see the below code
and comment.

(setq wl-template-alist
      '(
	("enable-wl-draft-config-exec"
	 ;; In trunk, wl-draft-config-exec-flag is set to t
	 ;; implicitly.  By explicit setting, value is kept after
	 ;; saving and re-editing.
	 (wl-draft-config-exec-flag . t)
	 )
	("disable-wl-draft-config-exec"
	 ;; We can override implicit setting.  By adding this element
	 ;; into your own template, you can suppress draft
	 ;; modification before sending.
	 (wl-draft-config-exec-flag . nil)
	 )
	))

-- 
Kazuhiro Ito