help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notification of new email at gmail?


From: Richard Riley
Subject: Re: Notification of new email at gmail?
Date: Sat, 25 Apr 2009 06:40:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

Anselm Helbig <anselm.helbig+news2009@googlemail.com> 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 "**<fc=gold>Mail:$newmails</fc>**"
| fi
`----


-- 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]