Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Alice Bob <alicebob@riseup.net>
To: info-gnus-english@gnu.org
Subject: Re: make sent emails synced in imap sent folder
Date: Wed, 04 May 2016 15:21:12 +0800	[thread overview]
Message-ID: <87wpna1e6v.fsf@riseup.net> (raw)
In-Reply-To: <mailman.7214.1457596037.843.info-gnus-english@gnu.org>

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'.
-- 
Who am I? Where am I from? Where am I going?

  parent reply	other threads:[~2016-05-04  7:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07 14:35 fkqqrr
2016-03-07 15:13 ` Eric Abrahamsen
2016-03-08  7:16 ` Gijs Hillenius
2016-03-08 12:07   ` Fkqqrr
2016-03-08 12:41   ` Fkqqrr
2016-03-08 14:53     ` Gijs Hillenius
2016-03-09  2:06       ` Emcc
     [not found] ` <mailman.6969.1457363607.843.info-gnus-english@gnu.org>
2016-03-08 11:12   ` Fkqqrr
2016-03-08 11:33   ` Fkqqrr
2016-03-10  1:30     ` Eric Abrahamsen
     [not found]     ` <mailman.7195.1457573482.843.info-gnus-english@gnu.org>
2016-03-10  3:21       ` fkqqrr
2016-03-10  3:40         ` Eric Abrahamsen
     [not found]         ` <mailman.7199.1457581246.843.info-gnus-english@gnu.org>
2016-03-10  3:55           ` fkqqrr
2016-03-10  7:38       ` fkqqrr
2016-03-10  7:47         ` Eric Abrahamsen
     [not found]         ` <mailman.7214.1457596037.843.info-gnus-english@gnu.org>
2016-03-10  8:33           ` fkqqrr
2016-05-04  7:21           ` Alice Bob [this message]
2016-06-08  2:13             ` Eric Abrahamsen
     [not found]             ` <mailman.1102.1465352106.1216.info-gnus-english@gnu.org>
2016-06-08 13:58               ` Alice Bob
2016-06-09  1:11                 ` Eric Abrahamsen
2016-03-09  2:11   ` Emcc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wpna1e6v.fsf@riseup.net \
    --to=alicebob@riseup.net \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).