From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/18264 Path: news.gmane.org!not-for-mail From: Alice Bob Newsgroups: gmane.emacs.gnus.user Subject: Re: make sent emails synced in imap sent folder Date: Wed, 08 Jun 2016 21:58:31 +0800 Organization: What me? Message-ID: <87shwnn5o8.fsf@riseup.net> References: <87vb4y1hkp.fsf@zhtux.jiantu.boxes> <87d1r5nqzj.fsf@zhtux.jiantu.boxes> <87wppabx4o.fsf@zhtux.jiantu.boxes> <87wpna1e6v.fsf@riseup.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1465396613 26202 80.91.229.3 (8 Jun 2016 14:36:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2016 14:36:53 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Wed Jun 08 16:36:53 2016 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bAebE-0001cA-QE for gegu-info-gnus-english@m.gmane.org; Wed, 08 Jun 2016 16:36:52 +0200 Original-Received: from localhost ([::1]:57401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAebE-0007MP-4C for gegu-info-gnus-english@m.gmane.org; Wed, 08 Jun 2016 10:36:52 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!uio.no!news.klingenberg.no!quimby.gnus.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 78 Original-NNTP-Posting-Host: chulak.enn.lu Original-X-Trace: quimby.gnus.org 1465394321 5520 176.126.252.11 (8 Jun 2016 13:58:41 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Wed, 8 Jun 2016 13:58:41 +0000 (UTC) User-Agent: Emacs/Gnus Cancel-Lock: sha1:5/CAe8pyE2Zjw2a1nMM/TwrogFA= Original-Xref: usenet.stanford.edu gnu.emacs.gnus:89391 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: "info-gnus-english" Xref: news.gmane.org gmane.emacs.gnus.user:18264 Archived-At: Eric Abrahamsen writes: > Alice Bob writes: > >> Eric Abrahamsen writes: >> >>> fkqqrr@autistici.org writes: >>> >>>> Eric Abrahamsen writes: >>>> >>>>> Fkqqrr writes: >>>>> >>>>>> Eric Abrahamsen writes: >>>>>> >>>>>>> fkqqrr 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