info-gnus-english
[Top][All Lists]
Advanced

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

Re: make sent emails synced in imap sent folder


From: Alice Bob
Subject: Re: make sent emails synced in imap sent folder
Date: Wed, 08 Jun 2016 21:58:31 +0800
User-agent: Emacs/Gnus

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Alice Bob <alicebob@riseup.net> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> fkqqrr@autistici.org writes:
>>>
>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>
>>>>> Fkqqrr <fkqqrr@autistici.org> writes:
>>>>>
>>>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>>>
>>>>>>> fkqqrr <fkqqrr@autistici.org> writes:
>>>>>>>
>>>>>>>> When sending email in Gnus, 'sent' emails by default go into
>>>>>>>> 'archive' folder locally.
>>>>>>>>
>>>>>>>> How to set sent emails to IMAP sent folder?
>>>>>>>
>>>>>>> You can set the `gnus-message-archive-group' option to the desired
>>>>>>> "Sent" folder. If you have more than one account you're trying to set
>>>>>>> up, you can set that option to a function that takes one argument, a
>>>>>>> group name, and returns the appropriate archive group. In my case:
>>>>>>>
>>>>>>> (defun my-archiver-figure-outer (group)
>>>>>>>   (cond ((string-match-p "nnimap\\+This-Account\\|gmane" group)
>>>>>>>          "nnimap+This-Account:Sent")
>>>>>>>         ((string-match-p "nnimap\\+That-Account" group)
>>>>>>>          "nnimap+That-Account:Sent")))
>>>> If all `cond' does not match, where will the `archive' message go?
>>>> (for example, just write a new mail by `m' without enterning any
>>>> group. Just stay on the start `Group' buffer)
>>>>
>>>> I know the default is `archive' on local disk. But this line:
>>>>>>> (setq gnus-message-archive-group #'my-archiver-figure-outer)
>>>> prevents un-matched sent items archived locally.
>>>>
>>>> Should I add a condition:
>>>>
>>>>    ((string-match-p ".*" group)
>>>>     "nnimap+3rd-account:Sent")
>>>
>>> The `cond' form usually takes a final "t" condition, which serves as a
>>> catch-all for when nothing else matches. I didn't put one in there
>>> because I couldn't be bothered. So:
>>>
>>> (cond ((string-match-p "nnimap\\+NEA\\|gmane" group)
>>>      "nnimap+NEA:Sent")
>>>     ((string-match-p "nnimap\\+NPR" group)
>>>      "nnimap+NPR:Sent")
>>>     (t "archive"))
>>>
>>> Or "nnimap+3rd-account:Sent", if you like.
>>>
>>>
>> An issue:
>>
>> I can see the header: `Gcc: nnimap+NEA:Sent.misc-news'. But the
>> news is actually archived to `Gcc: nnimap+NPR:Sent.misc-news'.
>>
>> On my system, NPR is the default `gnus-message-archive-method'.
>
> Sorry for the late response... Unfortunately I'm not sure why the header
> wouldn't take effect: are you sure that nnimap+NEA:Sent.misc-news
> actually exists? And what's the full value for
> `gnus-message-archive-method'?
>
> Eric
Many thanks to Eric.

Issue solved by:

`(setq gnus-update-message-archive-method t)'

-- 
horizon


reply via email to

[Prev in Thread] Current Thread [Next in Thread]