From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: Notification of new email at gmail? Date: Sat, 25 Apr 2009 06:40:50 +0200 Organization: aich tea tea pea dicky riley dot net Message-ID: References: <86prf2dfi3.fsf@zeus.knighten.org> <87d4b1n7b6.wl%anselm.helbig+news2009@googlemail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1240638056 16758 80.91.229.12 (25 Apr 2009 05:40:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Apr 2009 05:40:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 25 07:42:16 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LxaeU-0008MK-9p for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Apr 2009 07:42:14 +0200 Original-Received: from localhost ([127.0.0.1]:55044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lxad4-0002IH-LN for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Apr 2009 01:40:46 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!feeder.motzarella.org!news.motzarella.org!news.motzarella.org!motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 70 Original-X-Trace: news.eternal-september.org U2FsdGVkX18MBlqj3cZtZioUS1PWX+25BSHK/zoyyKoYq19hoJ++Zw8mEUAk6IeY0EkavJaOrhMmdWFWBwSsTdn77Q2iBPoAtTwoyXj2iSW0VmsykMh9HL5ekyhiM65siUsVSP/bJ/LCT/Xzs6bQHQ== Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Sat, 25 Apr 2009 04:40:52 +0000 (UTC) X-Auth-Sender: U2FsdGVkX196uOp+nuptWSrHZbC13gRXYzl6zLgWdU0skO8KNW2udw== Cancel-Lock: sha1:yoX2vh3d2PWnjdxNSmuF1Q6qqhg= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:168740 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64014 Archived-At: Anselm Helbig writes: > Hi Bob! > >> I am now using emacs to dirctly send and receive email using gmail as >> the mail server. This works well except that new mail notification on >> the mode line no longer works as the mail doesn't appear in any file on >> the computer until VM is invoked. Is there any application available >> that can provide the notification function on the mode line? I've found >> independent applications that will popup a notification on my desktop, >> but I would much prefer to keep it in the emacs mode line. > > I don't use VM myself, but a quick look at the documentation seems to > indicate that you need to set the `vm-auto-get-new-mail' variable: > > *Non-nil value causes VM to automatically move mail from spool files > to a mail folder when the folder is first visited. Nil means > you must always use `vm-get-new-mail' to pull in newly arrived messages. > > If the value is a number, then it specifies how often (in > seconds) VM should check for new mail and try to retrieve it. > This is done asynchronously and may occur while you are editing > other files. It should not disturb your editing, except perhaps > for a pause while the check is being done." > > I used a similar setting in my setup once - I'm using wanderlust - but > it became too annoying: if your internet connection hangs or mail > provider becomes unresponsive your whole emacs session hangs. So maybe > you'd rather go back and use fetchmail/getmail or some external > utility - wmmail is one, but there sure are others that also get the > job done. > > HTH, > > Anselm I'm not sure if that answers the question of how to get the modeline to indicate if there are any new emails waiting .. in other words rather than tie up vm/gnus/whatever fetching emails, rather read something that tells you if its time to poll the gmail servers and do a fetch. FWIW (and OT), I knocked up a very crude and (local) network heavy script to check my maildir on my email server (which then gnus reads from IMAP) to tell me if there was any new mail for xmobar (xmonad task bar thingy). ,---- | #!/bin/bash | | # script for use with xmobar | if [ "$1" = "" ]; then | echo "needs a hostname. Exit." | exit | fi | | host=$1 | | newmails=$(ssh $host "find ~/Maildir/.default/new -maxdepth 1 -type f -print | wc -l") | | if [ "$newmails" -eq "0" ] | then | echo "No New Mail" | else | echo "**Mail:$newmails**" | fi `---- --