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

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

Re: gmail-notifier.el v0.1 --- Notify unread gmail on mode line


From: Thierry Volpiatto
Subject: Re: gmail-notifier.el v0.1 --- Notify unread gmail on mode line
Date: Fri, 25 Jun 2010 07:11:40 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Hi William,

William Xu <address@hidden> writes:

> Show unread gmail count on mode line, it looks like this: G(2).
> `G' could be the gmail logo if your emacs supports image.
> To setup:
>   (require 'gmail-notifier)
>   (setq gmail-notifier-username "william.xwl"
>         gmail-notifier-password "******")
>   (gmail-notifier-start)

You should use auth-source to set login and passwd:
Write in ~/.authinfo or ~/.authinfo.gpg

,----[ .authinfo ]
| machine smtp.gmail.com port 587 login xxx password xxx
`----

(defun* tv-get-gmail (&key mail password)
  (let* ((gmail
          (auth-source-user-or-password
           '("login" "password") "smtp.gmail.com" "587"))
         (name (car gmail))
         (pass (cadr gmail)))
    (cond (mail name)
          (password pass)
          (t gmail))))

and 

(let ((gmail-notifier-username (tv-get-gmail :mail t))
      (gmail-notifier-password (tv-get-gmail :password t)))
   (do-something-here))

There is also now secret.el that allow storing password, but i have no
idea how it work. May be Ted can provide examples ;-).

-- 
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/




reply via email to

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