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

Re: Problems with draft/sent folders



> > Now I see that I sometimes have "Fcc:" correctly filled in the header,
> > (which makes testing much easier). If I start writing a draft from the
> > Folder-buffer (pressing "w") I have to re-select the template by
> > cycling through them with C-c C-j for the "Fcc:" to show up. I was
> > expecting C-c C-e to have the same effect, but no, it doesn't set
> > "Fcc".
>
> Try below code. When writing a draft from Folder buffer by "w",
> wl-draft-parent-folder is not set.
>
> (eval-after-load "wl-folder"
>   '(progn
>      (defun wl-folder-write (folder)
>        "Write a new draft from Folder."
>        (interactive (list (wl-folder-get-entity-from-buffer)))
>        (wl-draft (list (cons 'To "")) nil nil nil nil folder)
>        (run-hooks 'wl-mail-setup-hook)
>        (mail-position-on-field "To"))
>      (define-key wl-folder-mode-map "w"    'wl-folder-write)))

I tried the code above but everything is as previously described when
doing "w" (or M-x wl-folder-write) in Folder-buffer, i.e. it starts a
new draft from my non-gmail account, but "Fcc" isn't in the header and
sending it won't produce a copy in my "Sent" folder.

When in this "wl-folder-write" started draft I did an Eval:
wl-draft-parent-folder and it returns:
#("GMAIL" 0 5 (wl-folder-entity-id 1 wl-folder-is-group is-group))

Which I suspect might not be correct?

However, I think a way around the problem would be to not have "w" in
Folder-buffer default to my work mail, but use gmail, since messages
are automatically sent to "Sent" for this account. (and then choosing
my work-mail with C-c C-j if I meant to use that) My (e)lisp is
terrible, so I'm not sure I understand the above code, and maybe that
is what it's attempting to do? Would explain the "GMAIL" in the Eval
return above.

I thought just switching place of my accounts in the
wl-draft-config-alist would do this, but nope, still defaults to my
work-mail when doing "w" in Folder-buffer.

Thanks for all the help.