Gnus development mailing list
 help / color / mirror / Atom feed
* Username for gnus-notifications
@ 2012-08-30  6:25 Tassilo Horn
  2012-08-30  6:45 ` Julien Danjou
  0 siblings, 1 reply; 18+ messages in thread
From: Tassilo Horn @ 2012-08-30  6:25 UTC (permalink / raw)
  To: ding

Hi all,

after reading

  http://julien.danjou.info/blog/2012/gnus-notifications

I wanted to try it out and added `gnus-notifications' to the relevant
hook.  Now, after getting new mail, I'm queried for username/password
for some google site.  I didn't remember the exact URL and it's not in
*Messages*.  I tried with my google user account name tsdh80 + the
corresponding password but was queried again.  Then I tried with my
complete gmail email address as username and the same password, but
still I was queried again.  So I've quit using C-g.

Strangely, now when I hit `g` again, it asks for my gnome keyring
password once, and then it shows the notifications as it should.

So it seems to work, but for what was the first query loop good for
then?

I should note that I use 2-step verification, so maybe I should have
created an application specific password for gnus-notifications?

Thanks,
Tassilo



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30  6:25 Username for gnus-notifications Tassilo Horn
@ 2012-08-30  6:45 ` Julien Danjou
  2012-08-30  6:54   ` Tassilo Horn
  2012-08-30 14:13   ` Tassilo Horn
  0 siblings, 2 replies; 18+ messages in thread
From: Julien Danjou @ 2012-08-30  6:45 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]

On Thu, Aug 30 2012, Tassilo Horn wrote:

> I wanted to try it out and added `gnus-notifications' to the relevant
> hook.  Now, after getting new mail, I'm queried for username/password
> for some google site.  I didn't remember the exact URL and it's not in
> *Messages*.  I tried with my google user account name tsdh80 + the
> corresponding password but was queried again.  Then I tried with my
> complete gmail email address as username and the same password, but
> still I was queried again.  So I've quit using C-g.
>
> Strangely, now when I hit `g` again, it asks for my gnome keyring
> password once, and then it shows the notifications as it should.

That's goole-contacts trying to get OAuth access. And it did get it
finally, so it stored the token in a GPG encrypted file (that's why
gnome-keyring's asking your password).

> So it seems to work, but for what was the first query loop good for
> then?

OAuth authentification, but the fact that it looped is strange.

Note that's nothing specific about gnus-notifications, more likely a
problem with google-contacts or oauth2.

-- 
Julien Danjou
/* Free Software hacker & freelance
   http://julien.danjou.info */

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30  6:45 ` Julien Danjou
@ 2012-08-30  6:54   ` Tassilo Horn
  2012-08-30  8:08     ` Julien Danjou
  2012-08-30 14:13   ` Tassilo Horn
  1 sibling, 1 reply; 18+ messages in thread
From: Tassilo Horn @ 2012-08-30  6:54 UTC (permalink / raw)
  To: ding

Julien Danjou <julien@danjou.info> writes:

>> Strangely, now when I hit `g` again, it asks for my gnome keyring
>> password once, and then it shows the notifications as it should.
>
> That's goole-contacts trying to get OAuth access. And it did get it
> finally, so it stored the token in a GPG encrypted file (that's why
> gnome-keyring's asking your password).
>
>> So it seems to work, but for what was the first query loop good for
>> then?
>
> OAuth authentification, but the fact that it looped is strange.
>
> Note that's nothing specific about gnus-notifications, more likely a
> problem with google-contacts or oauth2.

I use the former from your git repository and the latter from ELPA (most
recent released version).  If it occurs another time, I'll try to debug
what's the problem.

More importantly, gnus-notifications is really nice.  I had a rather
similar hack in my ~/.gnus.el for some time, but your's is much nicer.
:-)

Maybe one enhancement could be to make the notification timeout
configurable.  The default of -1 means to let the notification server
decide how long to show it, and I have no clue what the gnome shell does
in that respect and it doesn't seem to be configurable at all there.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30  6:54   ` Tassilo Horn
@ 2012-08-30  8:08     ` Julien Danjou
  2012-08-30  8:40       ` Tassilo Horn
  0 siblings, 1 reply; 18+ messages in thread
From: Julien Danjou @ 2012-08-30  8:08 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

On Thu, Aug 30 2012, Tassilo Horn wrote:

> Maybe one enhancement could be to make the notification timeout
> configurable.  The default of -1 means to let the notification server
> decide how long to show it, and I have no clue what the gnome shell does
> in that respect and it doesn't seem to be configurable at all there.

That should be easy to add, for sure. But in the end I think there's so
much possible configuration, and other notifications systems (think
about Mac OS guys here) that I added `gnus-notifications-notify'
yesterday so anyone can defalias it easily to replace the "default"
notifications system with what one wants… :)

-- 
Julien Danjou
-- Free Software hacker & freelance
-- http://julien.danjou.info

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30  8:08     ` Julien Danjou
@ 2012-08-30  8:40       ` Tassilo Horn
  2012-08-30 11:01         ` Peter Münster
  2012-08-30 15:17         ` Julien Danjou
  0 siblings, 2 replies; 18+ messages in thread
From: Tassilo Horn @ 2012-08-30  8:40 UTC (permalink / raw)
  To: ding

Julien Danjou <julien@danjou.info> writes:

>> Maybe one enhancement could be to make the notification timeout
>> configurable.  The default of -1 means to let the notification server
>> decide how long to show it, and I have no clue what the gnome shell
>> does in that respect and it doesn't seem to be configurable at all
>> there.
>
> That should be easy to add, for sure. But in the end I think there's
> so much possible configuration, and other notifications systems (think
> about Mac OS guys here) that I added `gnus-notifications-notify'
> yesterday so anyone can defalias it easily to replace the "default"
> notifications system with what one wants… :)

Yes, looking at the gazillion options of `notifications-notify' that
would mean quite a lot of configure options...

But OTOH, when I defalias it to some home-brewn function that's just a
copy of yours with added :timeout, I'll miss all that glorious stuff
you'll add in the future.  For example, it seems feasible to use
:actions and :on-action to display the mail in Gnus when I click the
notification.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30  8:40       ` Tassilo Horn
@ 2012-08-30 11:01         ` Peter Münster
  2012-08-30 13:10           ` Tassilo Horn
  2012-08-30 15:17         ` Julien Danjou
  1 sibling, 1 reply; 18+ messages in thread
From: Peter Münster @ 2012-08-30 11:01 UTC (permalink / raw)
  To: ding

On Thu, Aug 30 2012, Tassilo Horn wrote:

> For example, it seems feasible to use :actions and :on-action to
> display the mail in Gnus when I click the notification.

Yes, that works quite well. Here the function, that I use:

--8<---------------cut here---------------start------------->8---
(defun pm/gnus (&optional id key)
  "Switch to group buffer, or start gnus if it does not exist."
  (interactive)
  (when (or (not key) (string= key "email"))
    (if (get-buffer "*Group*")
        (progn (switch-to-buffer "*Group*") (gnus-group-get-new-news))
      (gnus))
    (if (display-graphic-p)
        (x-focus-frame nil))))

[...]
        (notifications-notify :title "New Email!" :timeout (* 60 1000)
                              :actions '("email" "read email") :on-action 'pm/gnus)
[...]
--8<---------------cut here---------------end--------------->8---

-- 
           Peter




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30 11:01         ` Peter Münster
@ 2012-08-30 13:10           ` Tassilo Horn
  2012-08-30 15:18             ` Julien Danjou
  2012-08-30 19:04             ` Peter Münster
  0 siblings, 2 replies; 18+ messages in thread
From: Tassilo Horn @ 2012-08-30 13:10 UTC (permalink / raw)
  To: Peter Münster; +Cc: ding

Peter Münster <pmlists@free.fr> writes:

Hi Peter,

>> For example, it seems feasible to use :actions and :on-action to
>> display the mail in Gnus when I click the notification.
>
> Yes, that works quite well. Here the function, that I use:
>
> (defun pm/gnus (&optional id key)
>   "Switch to group buffer, or start gnus if it does not exist."
>   (interactive)
>   (when (or (not key) (string= key "email"))
>     (if (get-buffer "*Group*")
>         (progn (switch-to-buffer "*Group*") (gnus-group-get-new-news))
>       (gnus))
>     (if (display-graphic-p)
>         (x-focus-frame nil))))
>
> [...]
>         (notifications-notify :title "New Email!" :timeout (* 60 1000)
>                               :actions '("email" "read email") :on-action 'pm/gnus)
> [...]

But that just switches to Gnus, it doesn't show you the exact mail that
was advertised in the notification.  Basically, I'd like to click the
notification

    Peter Münster
    Re: Username for gnus-notifications

and Gnus opens my ding nnimap group, shows a summary of all new mail in
there, and selects your message.  I think, it should be doable by also
ripping out the Message-Id and group in addition to From/Subject from
new messages.  Then you know what group a summary should be opened for,
and you can use `gnus-summary-refer-article' to the select the right
one.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30  6:45 ` Julien Danjou
  2012-08-30  6:54   ` Tassilo Horn
@ 2012-08-30 14:13   ` Tassilo Horn
  2012-08-30 15:19     ` Julien Danjou
  1 sibling, 1 reply; 18+ messages in thread
From: Tassilo Horn @ 2012-08-30 14:13 UTC (permalink / raw)
  To: ding

Julien Danjou <julien@danjou.info> writes:

Hi again,

> That's goole-contacts trying to get OAuth access. And it did get it
> finally, so it stored the token in a GPG encrypted file (that's why
> gnome-keyring's asking your password).

Another thing: I get new mail and am queried for my password, and then
the notifications work fine.  If I receive another new mail within a
given period of time, the notifications still work fine.  But after
about an hour or so, I have to provide my password again.

Is there some expiry happening?  That's probably a GNOME3 issue, but
since you also seem to use it, maybe you know what to do.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30  8:40       ` Tassilo Horn
  2012-08-30 11:01         ` Peter Münster
@ 2012-08-30 15:17         ` Julien Danjou
  1 sibling, 0 replies; 18+ messages in thread
From: Julien Danjou @ 2012-08-30 15:17 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 589 bytes --]

On Thu, Aug 30 2012, Tassilo Horn wrote:

> Yes, looking at the gazillion options of `notifications-notify' that
> would mean quite a lot of configure options...
>
> But OTOH, when I defalias it to some home-brewn function that's just a
> copy of yours with added :timeout, I'll miss all that glorious stuff
> you'll add in the future.  For example, it seems feasible to use
> :actions and :on-action to display the mail in Gnus when I click the
> notification.

I've added a defcustom. :)

-- 
Julien Danjou
# Free Software hacker & freelance
# http://julien.danjou.info

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30 13:10           ` Tassilo Horn
@ 2012-08-30 15:18             ` Julien Danjou
  2012-08-30 17:45               ` Tassilo Horn
  2012-08-30 19:04             ` Peter Münster
  1 sibling, 1 reply; 18+ messages in thread
From: Julien Danjou @ 2012-08-30 15:18 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: Peter Münster, ding

[-- Attachment #1: Type: text/plain, Size: 824 bytes --]

On Thu, Aug 30 2012, Tassilo Horn wrote:

> But that just switches to Gnus, it doesn't show you the exact mail that
> was advertised in the notification.  Basically, I'd like to click the
> notification
>
>     Peter Münster
>     Re: Username for gnus-notifications
>
> and Gnus opens my ding nnimap group, shows a summary of all new mail in
> there, and selects your message.  I think, it should be doable by also
> ripping out the Message-Id and group in addition to From/Subject from
> new messages.  Then you know what group a summary should be opened for,
> and you can use `gnus-summary-refer-article' to the select the right
> one.

This is now implemented, but it only show the one message you asked for.

-- 
Julien Danjou
/* Free Software hacker & freelance
   http://julien.danjou.info */

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30 14:13   ` Tassilo Horn
@ 2012-08-30 15:19     ` Julien Danjou
  2012-08-30 17:47       ` Tassilo Horn
  2012-08-31  7:54       ` Tassilo Horn
  0 siblings, 2 replies; 18+ messages in thread
From: Julien Danjou @ 2012-08-30 15:19 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 714 bytes --]

On Thu, Aug 30 2012, Tassilo Horn wrote:

> Another thing: I get new mail and am queried for my password, and then
> the notifications work fine.  If I receive another new mail within a
> given period of time, the notifications still work fine.  But after
> about an hour or so, I have to provide my password again.
>
> Is there some expiry happening?  That's probably a GNOME3 issue, but
> since you also seem to use it, maybe you know what to do.

If you're talking about your keyring password, that's indeed a GNOME 3
issue. You can probably configure the keyring daemon to not expire your
keyring access.

-- 
Julien Danjou
/* Free Software hacker & freelance
   http://julien.danjou.info */

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30 15:18             ` Julien Danjou
@ 2012-08-30 17:45               ` Tassilo Horn
  0 siblings, 0 replies; 18+ messages in thread
From: Tassilo Horn @ 2012-08-30 17:45 UTC (permalink / raw)
  To: Peter Münster; +Cc: ding

Julien Danjou <julien@danjou.info> writes:

>> Basically, I'd like to click the notification
>>
>>     Peter Münster
>>     Re: Username for gnus-notifications
>>
>> and Gnus opens my ding nnimap group, shows a summary of all new mail in
>> there, and selects your message.  I think, it should be doable by also
>> ripping out the Message-Id and group in addition to From/Subject from
>> new messages.  Then you know what group a summary should be opened for,
>> and you can use `gnus-summary-refer-article' to the select the right
>> one.
>
> This is now implemented,

I knew I could beat you to implement that. :-)

> but it only show the one message you asked for.

It's as good as it gets.

Thanks a lot,
Tassilo



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30 15:19     ` Julien Danjou
@ 2012-08-30 17:47       ` Tassilo Horn
  2012-08-31  7:54       ` Tassilo Horn
  1 sibling, 0 replies; 18+ messages in thread
From: Tassilo Horn @ 2012-08-30 17:47 UTC (permalink / raw)
  To: ding

Julien Danjou <julien@danjou.info> writes:

>> Another thing: I get new mail and am queried for my password, and
>> then the notifications work fine.  If I receive another new mail
>> within a given period of time, the notifications still work fine.
>> But after about an hour or so, I have to provide my password again.
>>
>> Is there some expiry happening?  That's probably a GNOME3 issue, but
>> since you also seem to use it, maybe you know what to do.
>
> If you're talking about your keyring password,

Yes.

> that's indeed a GNOME 3 issue. You can probably configure the keyring
> daemon to not expire your keyring access.

Ok, I'll see if I can find some docs about that.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30 13:10           ` Tassilo Horn
  2012-08-30 15:18             ` Julien Danjou
@ 2012-08-30 19:04             ` Peter Münster
  2012-08-30 19:46               ` Tassilo Horn
  1 sibling, 1 reply; 18+ messages in thread
From: Peter Münster @ 2012-08-30 19:04 UTC (permalink / raw)
  To: ding

On Thu, Aug 30 2012, Tassilo Horn wrote:

> But that just switches to Gnus, it doesn't show you the exact mail that
> was advertised in the notification.

Sorry, I didn't follow all the details of the thread...

But do you really want to be notified and interrupted from your current
occupation for each and every message?
I prefer reading my messages only 3 or 4 times a day in bulk, so that I
can better concentrate on my work, but YMMV.

-- 
           Peter




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30 19:04             ` Peter Münster
@ 2012-08-30 19:46               ` Tassilo Horn
  2012-08-30 21:02                 ` Julien Danjou
  0 siblings, 1 reply; 18+ messages in thread
From: Tassilo Horn @ 2012-08-30 19:46 UTC (permalink / raw)
  To: Peter Münster; +Cc: ding

Peter Münster <pmlists@free.fr> writes:

> But do you really want to be notified and interrupted from your
> current occupation for each and every message?

I'm not really interrupted by decent notifications.  I have some female
genes, so I can do up to 1.1 things in parellel. ;-)

> I prefer reading my messages only 3 or 4 times a day in bulk, so that
> I can better concentrate on my work, but YMMV.

In general, yes.  But in the mass of mails there are those 2 or 3 highly
important ones.  Using Julien's gnus-notifications.el those are now
easily spotted as soon as they come in, and I can conveniently take
action immediately.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30 19:46               ` Tassilo Horn
@ 2012-08-30 21:02                 ` Julien Danjou
  2012-08-31  6:23                   ` Tassilo Horn
  0 siblings, 1 reply; 18+ messages in thread
From: Julien Danjou @ 2012-08-30 21:02 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: Peter Münster, ding

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

On Thu, Aug 30 2012, Tassilo Horn wrote:

> In general, yes.  But in the mass of mails there are those 2 or 3 highly
> important ones.  Using Julien's gnus-notifications.el those are now
> easily spotted as soon as they come in, and I can conveniently take
> action immediately.

Go ahead, ask me to add a feature to filter the notifications based on
various things like from, subject, scores… :)

-- 
Julien Danjou
-- Free Software hacker & freelance
-- http://julien.danjou.info

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30 21:02                 ` Julien Danjou
@ 2012-08-31  6:23                   ` Tassilo Horn
  0 siblings, 0 replies; 18+ messages in thread
From: Tassilo Horn @ 2012-08-31  6:23 UTC (permalink / raw)
  To: Peter Münster; +Cc: ding

Julien Danjou <julien@danjou.info> writes:

>> In general, yes.  But in the mass of mails there are those 2 or 3
>> highly important ones.  Using Julien's gnus-notifications.el those
>> are now easily spotted as soon as they come in, and I can
>> conveniently take action immediately.
>
> Go ahead, ask me to add a feature to filter the notifications based on
> various things like from, subject, scores… :)

I'm currently running out of useful ideas.  Maybe being able to tick a
message from the notification wouldn't be a bad idea.  I use tick marks
as "that's important and I have to take action, but not right now."

Oh, and of course you must absolutely be able to play a new mail
notification sound!

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Username for gnus-notifications
  2012-08-30 15:19     ` Julien Danjou
  2012-08-30 17:47       ` Tassilo Horn
@ 2012-08-31  7:54       ` Tassilo Horn
  1 sibling, 0 replies; 18+ messages in thread
From: Tassilo Horn @ 2012-08-31  7:54 UTC (permalink / raw)
  To: ding

Julien Danjou <julien@danjou.info> writes:

>> Another thing: I get new mail and am queried for my password, and
>> then the notifications work fine.  If I receive another new mail
>> within a given period of time, the notifications still work fine.
>> But after about an hour or so, I have to provide my password again.
>>
>> Is there some expiry happening?  That's probably a GNOME3 issue, but
>> since you also seem to use it, maybe you know what to do.
>
> If you're talking about your keyring password, that's indeed a GNOME 3
> issue. You can probably configure the keyring daemon to not expire your
> keyring access.

Now this is really strange.  As said, I get that GNOME3 password dialog
about once in a hour.  But it is totally irrelevant what I type in
there!  I can leave it empty and just hit RET and Gnus goes on
successfully with

  Decrypting /home/horn/.emacs.d/oauth2.plstore...done

Huh?

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-08-31  7:54 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-30  6:25 Username for gnus-notifications Tassilo Horn
2012-08-30  6:45 ` Julien Danjou
2012-08-30  6:54   ` Tassilo Horn
2012-08-30  8:08     ` Julien Danjou
2012-08-30  8:40       ` Tassilo Horn
2012-08-30 11:01         ` Peter Münster
2012-08-30 13:10           ` Tassilo Horn
2012-08-30 15:18             ` Julien Danjou
2012-08-30 17:45               ` Tassilo Horn
2012-08-30 19:04             ` Peter Münster
2012-08-30 19:46               ` Tassilo Horn
2012-08-30 21:02                 ` Julien Danjou
2012-08-31  6:23                   ` Tassilo Horn
2012-08-30 15:17         ` Julien Danjou
2012-08-30 14:13   ` Tassilo Horn
2012-08-30 15:19     ` Julien Danjou
2012-08-30 17:47       ` Tassilo Horn
2012-08-31  7:54       ` Tassilo Horn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).