From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Danny YUE Newsgroups: gmane.emacs.help Subject: How do you automatically refile mails with mu4e? Date: Mon, 20 Mar 2017 15:36:12 +0800 Message-ID: <87r31siemr.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489995469 4710 195.159.176.226 (20 Mar 2017 07:37:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 20 Mar 2017 07:37:49 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.2.1 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 20 08:37:44 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cprst-0000QU-GE for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Mar 2017 08:37:43 +0100 Original-Received: from localhost ([::1]:59602 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cprsy-0002bB-2E for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Mar 2017 03:37:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cprsV-0002b4-IQ for help-gnu-emacs@gnu.org; Mon, 20 Mar 2017 03:37:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cprsS-00020D-FI for help-gnu-emacs@gnu.org; Mon, 20 Mar 2017 03:37:19 -0400 Original-Received: from mail-pf0-x22d.google.com ([2607:f8b0:400e:c00::22d]:32769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cprsS-000202-9N for help-gnu-emacs@gnu.org; Mon, 20 Mar 2017 03:37:16 -0400 Original-Received: by mail-pf0-x22d.google.com with SMTP id e129so23395083pfh.0 for ; Mon, 20 Mar 2017 00:37:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=mc3IPe4sGnA1BrjFqHh0U4qapTgQdn94BLRAMhcKyS0=; b=WcZBYMpoPoJzvBOMewWVAdJoO0OxKlPzvd+65oNCIfIwIXPVj+iDnCi3IZQ9qn186e XLnIaLIt73wOXTSklKNWrbNssU9EWM/8cUnDbS3iL88XBmuuUiyrmiRhnj1oEDX14MS5 VqW3Q1OINKGo730+1mhkWm/mb5nSRxZ/HQVDBjpQ5wCmHc/pDdK735aiwRIBrUde5rSo hln14VWyx/RTAd01eX5n1ELXqLYY9yo41rH85UygMD3m31ST/cNslce55D3FIJdrUa+T nwbpT1a91eehPpjVut5Hpl2GeRv7XKPyb7woRCwBLJQALnQghr6oyjmHuADf7YPStsHy sGjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=mc3IPe4sGnA1BrjFqHh0U4qapTgQdn94BLRAMhcKyS0=; b=CtnIXWVArUrXGy8RUFnf1/aKXVtBClxO8Pah57k2FA086qfksEDQeqhpYToh9eCIoh aB/txzzwPsFnJbZI4YTXCM7R5Bk6zdGUs1XB7lE4yaYMJLHn0j0FsWEtM0ZymCGeqvK4 8QkbKjEn36/jO3oms6A+rDCMF+4JiruSllDa+mDuXsNHIfEZ6IEn9akB+geqICaJmHxk 4/IF8rmfTphAk79/zroCTkvjO1cXR5uwszc9YgunqLyUcxU3MARMs94E+WoFddkEgvji iaWx8Y8iKFSHttlRX7vhEi6w3sLwlFsSVBP1DaioeB7bnLzdp8vYk5h1vHX1P0BpE3eg 0K8g== X-Gm-Message-State: AFeK/H0pdtf3gtJL6PVXq8m+Jh8zca2ztb2NNBLokud7N5EP+G8QyIJg2Rq4suI1+POJhQ== X-Received: by 10.99.125.68 with SMTP id m4mr30164673pgn.13.1489995435176; Mon, 20 Mar 2017 00:37:15 -0700 (PDT) Original-Received: from localhost (23.83.238.120.16clouds.com. [23.83.238.120]) by smtp.gmail.com with ESMTPSA id y5sm30996048pfd.33.2017.03.20.00.37.13 (version=TLS1_2 cipher=AES128-GCM-SHA256 bits=128/128); Mon, 20 Mar 2017 00:37:13 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::22d X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112608 Archived-At: Hi guys, How can you refile the mails without opening any mu4e buffers? I read the manual and I know that it is possible to define a function to refile based on something. But every time I have to mark-and-execute manually, and it sometimes annoys me. I would like it to be automatically done: every time the index is updated, the incoming unread mails are refiled automatically. My idea is to add something to the mu4e-update-pre-hook. But I did not found any clue how I can refile mails in the background, without opening any buffer. Looking into the code did not really help. Can anyone help? Thanks in advance. Danny