From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hugo M Newsgroups: gmane.emacs.help Subject: Is there a way to know when new email arrived using mu4e-index-updated-hook? Date: Thu, 8 Jan 2015 10:13:36 -0800 (PST) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1420741356 12963 80.91.229.3 (8 Jan 2015 18:22:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2015 18:22:36 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 08 19:22:30 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1Y9Hiu-0003b5-Mt for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Jan 2015 19:22:20 +0100 Original-Received: from localhost ([::1]:47580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9Hit-0003pX-T6 for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Jan 2015 13:22:19 -0500 X-Received: by 10.66.172.42 with SMTP id az10mr7644072pac.19.1420740816649; Thu, 08 Jan 2015 10:13:36 -0800 (PST) X-Received: by 10.140.96.52 with SMTP id j49mr46775qge.10.1420740816484; Thu, 08 Jan 2015 10:13:36 -0800 (PST) Original-Path: usenet.stanford.edu!h15no1279039igd.0!news-out.google.com!qk8ni1868igc.0!nntp.google.com!h15no1279033igd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=190.224.246.14; posting-account=Klm3vQoAAABJeJefTbjt3Kcv7GLQBzjA Original-NNTP-Posting-Host: 190.224.246.14 User-Agent: G2/1.0 Injection-Date: Thu, 08 Jan 2015 18:13:36 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:209670 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101948 Archived-At: I have this: (defun ham-email-arrived-notif () (notifications-notify :title "Emails actualizados, m'hijo" :body "Quiz=E1s tengas un email" ;; :app-icon "~/.emacs.d/icons/mail.png" :urgency 'low) =20 ) (add-hook 'mu4e-index-updated-hook #'ham-email-arrived-notif) But it always alerts me when index is updated, even if I have no new email = (yes, I noticed the hook's name). Is there a way to check if there's any unread email in the mu4e index? (or = to ask mu4e to retrieve all emails with "unread" flag)=20 Thanks!