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

Re: Problems with draft/sent folders




> > > Try below code. When writing a draft from Folder buffer by "w",
> > > wl-draft-parent-folder is not set.
> (snip)
> > 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?
>
> I expect you run wl-folder-write from the top position of the folder
> group.  In that case, wl-draft-parent-folder is set to the name of
> the group.

Yes, I was in the "Desktop" folder. I tested this some, and I'm
starting to understand some of the stuff. "#("GMAIL" 0 5..." is
returned since the cursor/point was on that folder (but not in it)
when I did "w".

So the code below:

> If you want to apply a template in such condition, try adding below
> code, or modify your wl-draft-config-alist's value directly.
>
> (add-to-list
>  'wl-draft-config-alist
>  '((string= "GMAIL" wl-draft-parent-folder)
>    (template . "gmail")))
>

...kind of does what I wanted, but only if the marker is on exactly
the GMAIL folder when doing "w". If I have it anywhere else in the top
hierarchy ("Desktop") it defaults to the faulty(/non-Fcc-working)
template.

My folder structure:

Desktop
  GMAIL         works if marker is here when doing "w"
  THEP (work)   but not here...
  draft         ...or here
  NEWS          ...or here.

This is a minor thing, and I recently started reading "Structure and
interpretation of computer programs" so it could be left as "an
exercise for the reader".

Tried switching "GMAIL" part in the code for "Desktop" and then it
only works for that line, obviously, so then I should add-to-list
wl-draft-config-alist one for GMAIL, one NEWS, etc.

Thanks again for the help.