* gnus notifications setup
@ 2012-09-11 5:04 Noorul Islam K M
2012-09-11 5:32 ` Charles Philip Chan
0 siblings, 1 reply; 18+ messages in thread
From: Noorul Islam K M @ 2012-09-11 5:04 UTC (permalink / raw)
To: ding
I was desperately looking for something like this
http://julien.danjou.info/blog/2012/gnus-notifications.
I thought of setting this up but I could not make it work.
I tested this using the following expression and it works.
(gnus-notifications-notify "Noorul" "Testing notification" nil)
And I added the following line in .gnus.el
;;; Notification
(add-hook 'gnus-after-getting-new-news-hook 'gnus-notifications)
But when I press 'g' from groups buffer, I am not getting any
notifications even if I have new mails. Am I missing something?
From describe variable:
gnus-after-getting-new-news-hook is a variable defined in `gnus-start.el'.
Its value is (gnus-notifications gnus-display-time-event-handler)
Original value was
(gnus-display-time-event-handler)
Thanks and Regards
Noorul
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-11 5:04 gnus notifications setup Noorul Islam K M
@ 2012-09-11 5:32 ` Charles Philip Chan
2012-09-11 5:36 ` Noorul Islam K M
0 siblings, 1 reply; 18+ messages in thread
From: Charles Philip Chan @ 2012-09-11 5:32 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 516 bytes --]
Noorul Islam K M <noorul@noorul.com> writes:
Hi Noorul:
> I was desperately looking for something like this
> http://julien.danjou.info/blog/2012/gnus-notifications.
>
> I thought of setting this up but I could not make it work.
It sound like you haven't started up dbus. Put this in your ~/.profile:
# DBus
eval `dbus-launch`
export DBUS_SESSION_BUS_ADDRESS
Cheers,
Charles
--
"Nature abhors a Vacuum"
-- Brian Behlendorf on OSS (Open Sources, 1999 O'Reilly and Associates)
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-11 5:32 ` Charles Philip Chan
@ 2012-09-11 5:36 ` Noorul Islam K M
2012-09-11 5:55 ` Charles Philip Chan
2012-09-11 6:37 ` Michael Albinus
0 siblings, 2 replies; 18+ messages in thread
From: Noorul Islam K M @ 2012-09-11 5:36 UTC (permalink / raw)
To: Charles Philip Chan; +Cc: ding
Charles Philip Chan <cpchan@bell.net> writes:
> Noorul Islam K M <noorul@noorul.com> writes:
>
> Hi Noorul:
>
>> I was desperately looking for something like this
>> http://julien.danjou.info/blog/2012/gnus-notifications.
>>
>> I thought of setting this up but I could not make it work.
>
> It sound like you haven't started up dbus. Put this in your ~/.profile:
>
> # DBus
> eval `dbus-launch`
> export DBUS_SESSION_BUS_ADDRESS
I think I have
noman in ~
$ --> echo $DBUS_SESSION_BUS_ADDRESS
unix:abstract=/tmp/dbus-uxvaB7e5OP,guid=044075e05c08bb0ac331d85900000027
Thanks and Regards
Noorul
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-11 5:36 ` Noorul Islam K M
@ 2012-09-11 5:55 ` Charles Philip Chan
2012-09-11 6:18 ` Charles Philip Chan
` (2 more replies)
2012-09-11 6:37 ` Michael Albinus
1 sibling, 3 replies; 18+ messages in thread
From: Charles Philip Chan @ 2012-09-11 5:55 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 630 bytes --]
Noorul Islam K M <noorul@noorul.com> writes:
Hi Noorul:
> I think I have
>
> noman in ~
> $ --> echo $DBUS_SESSION_BUS_ADDRESS
> unix:abstract=/tmp/dbus-uxvaB7e5OP,guid=044075e05c08bb0ac331d85900000027
OK, it is something else. Have you tried customizing
"gnus-notifications-minimum-level"? It defaults to Level 1 groups.
Also, I don't need to do:
,----
| ;;; Notification
| (add-hook 'gnus-after-getting-new-news-hook 'gnus-notifications)
`----
it works out of the box.
Cheers,
Charles
--
We are Pentium of Borg. Division is futile. You will be approximated.
(seen in someone's .signature)
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-11 5:55 ` Charles Philip Chan
@ 2012-09-11 6:18 ` Charles Philip Chan
2012-09-11 7:15 ` Noorul Islam K M
2012-09-11 16:49 ` Adam Sjøgren
2 siblings, 0 replies; 18+ messages in thread
From: Charles Philip Chan @ 2012-09-11 6:18 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 440 bytes --]
Charles Philip Chan <cpchan@bell.net> writes:
> Also, I don't need to do:
>
> ,----
> | ;;; Notification
> | (add-hook 'gnus-after-getting-new-news-hook 'gnus-notifications)
> `----
Oops, sorry about this part, I do have this in my gnus config
file. Sorry for the misinformation.
Charles
--
"...Deep Hack Mode--that mysterious and frightening state of
consciousness where Mortal Users fear to tread."
(By Matt Welsh)
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-11 5:55 ` Charles Philip Chan
2012-09-11 6:18 ` Charles Philip Chan
@ 2012-09-11 7:15 ` Noorul Islam K M
2012-09-11 8:01 ` Julien Danjou
2012-09-11 16:49 ` Adam Sjøgren
2 siblings, 1 reply; 18+ messages in thread
From: Noorul Islam K M @ 2012-09-11 7:15 UTC (permalink / raw)
To: Charles Philip Chan; +Cc: ding
Charles Philip Chan <cpchan@bell.net> writes:
> Noorul Islam K M <noorul@noorul.com> writes:
>
> Hi Noorul:
>
>> I think I have
>>
>> noman in ~
>> $ --> echo $DBUS_SESSION_BUS_ADDRESS
>> unix:abstract=/tmp/dbus-uxvaB7e5OP,guid=044075e05c08bb0ac331d85900000027
>
> OK, it is something else. Have you tried customizing
> "gnus-notifications-minimum-level"? It defaults to Level 1 groups.
Ok, now I set this to 10 and it displays the notification. But my group
buffer is not displaying the unread count after pressing 'g'.
Also I get an error message
gnus-string-match-p: Wrong type argument: stringp, nil
But when I try to debug this by setting debug-on-error to t, I get
Entering debugger...
button-at: Args out of range: 0
Thanks and Regards
Noorul
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-11 7:15 ` Noorul Islam K M
@ 2012-09-11 8:01 ` Julien Danjou
2012-09-11 9:12 ` Noorul Islam K M
0 siblings, 1 reply; 18+ messages in thread
From: Julien Danjou @ 2012-09-11 8:01 UTC (permalink / raw)
To: Noorul Islam K M; +Cc: Charles Philip Chan, ding
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
On Tue, Sep 11 2012, Noorul Islam K M wrote:
>
> But when I try to debug this by setting debug-on-error to t, I get
>
> Entering debugger...
> button-at: Args out of range: 0
This is strange, I don't know `button-at' and it's not used in
gnus-notifications. Could you maybe try with a shorter/lighter Gnus
config, in case something else would trigger this?
--
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: gnus notifications setup
2012-09-11 8:01 ` Julien Danjou
@ 2012-09-11 9:12 ` Noorul Islam K M
2012-09-11 9:21 ` Julien Danjou
2012-09-11 9:24 ` Noorul Islam K M
0 siblings, 2 replies; 18+ messages in thread
From: Noorul Islam K M @ 2012-09-11 9:12 UTC (permalink / raw)
To: Charles Philip Chan; +Cc: ding
Julien Danjou <julien@danjou.info> writes:
> On Tue, Sep 11 2012, Noorul Islam K M wrote:
>
>>
>> But when I try to debug this by setting debug-on-error to t, I get
>>
>> Entering debugger...
>> button-at: Args out of range: 0
>
> This is strange, I don't know `button-at' and it's not used in
> gnus-notifications. Could you maybe try with a shorter/lighter Gnus
> config, in case something else would trigger this?
It is trying to match a string with nil. I am not sure why the address
is nil in this case.
Debugger entered--entering a function:
gnus-string-match-p("noorul@noorul\\.com" nil)
* gnus-notifications()
run-hooks(gnus-after-getting-new-news-hook)
apply(run-hooks gnus-after-getting-new-news-hook)
gnus-run-hooks(gnus-after-getting-new-news-hook)
gnus-group-get-new-news(nil)
call-interactively(gnus-group-get-new-news nil nil)
Thanks and Regards
Noorul
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-11 9:12 ` Noorul Islam K M
@ 2012-09-11 9:21 ` Julien Danjou
2012-09-11 9:24 ` Noorul Islam K M
1 sibling, 0 replies; 18+ messages in thread
From: Julien Danjou @ 2012-09-11 9:21 UTC (permalink / raw)
To: Noorul Islam K M; +Cc: Charles Philip Chan, ding
[-- Attachment #1: Type: text/plain, Size: 763 bytes --]
On Tue, Sep 11 2012, Noorul Islam K M wrote:
> It is trying to match a string with nil. I am not sure why the address
> is nil in this case.
>
> Debugger entered--entering a function:
> gnus-string-match-p("noorul@noorul\\.com" nil)
> * gnus-notifications()
> run-hooks(gnus-after-getting-new-news-hook)
> apply(run-hooks gnus-after-getting-new-news-hook)
> gnus-run-hooks(gnus-after-getting-new-news-hook)
> gnus-group-get-new-news(nil)
> call-interactively(gnus-group-get-new-news nil nil)
Could you type `e' and then `address-components' so I see what the
address is?
(You can send this to me privately if you don't want to expose this here)
--
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: gnus notifications setup
2012-09-11 9:12 ` Noorul Islam K M
2012-09-11 9:21 ` Julien Danjou
@ 2012-09-11 9:24 ` Noorul Islam K M
2012-09-11 9:41 ` Julien Danjou
1 sibling, 1 reply; 18+ messages in thread
From: Noorul Islam K M @ 2012-09-11 9:24 UTC (permalink / raw)
To: Charles Philip Chan; +Cc: ding
Noorul Islam K M <noorul@noorul.com> writes:
> Julien Danjou <julien@danjou.info> writes:
>
>> On Tue, Sep 11 2012, Noorul Islam K M wrote:
>>
>>>
>>> But when I try to debug this by setting debug-on-error to t, I get
>>>
>>> Entering debugger...
>>> button-at: Args out of range: 0
>>
>> This is strange, I don't know `button-at' and it's not used in
>> gnus-notifications. Could you maybe try with a shorter/lighter Gnus
>> config, in case something else would trigger this?
>
> It is trying to match a string with nil. I am not sure why the address
> is nil in this case.
>
> Debugger entered--entering a function:
> gnus-string-match-p("noorul@noorul\\.com" nil)
> * gnus-notifications()
> run-hooks(gnus-after-getting-new-news-hook)
> apply(run-hooks gnus-after-getting-new-news-hook)
> gnus-run-hooks(gnus-after-getting-new-news-hook)
> gnus-group-get-new-news(nil)
> call-interactively(gnus-group-get-new-news nil nil)
>
And from code
(unless (gnus-string-match-p gnus-ignored-from-addresses
address)
What if my gnus-ignored-from-addresses is nil?
Thanks and Regards
Noorul
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-11 9:24 ` Noorul Islam K M
@ 2012-09-11 9:41 ` Julien Danjou
2012-09-12 3:32 ` Noorul Islam K M
0 siblings, 1 reply; 18+ messages in thread
From: Julien Danjou @ 2012-09-11 9:41 UTC (permalink / raw)
To: Noorul Islam K M; +Cc: Charles Philip Chan, ding
[-- Attachment #1: Type: text/plain, Size: 239 bytes --]
On Tue, Sep 11 2012, Noorul Islam K M wrote:
> What if my gnus-ignored-from-addresses is nil?
You are right, I've added a check for both values.
--
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: gnus notifications setup
2012-09-11 9:41 ` Julien Danjou
@ 2012-09-12 3:32 ` Noorul Islam K M
2012-09-12 4:15 ` Charles Philip Chan
0 siblings, 1 reply; 18+ messages in thread
From: Noorul Islam K M @ 2012-09-12 3:32 UTC (permalink / raw)
To: Charles Philip Chan; +Cc: ding
Julien Danjou <julien@danjou.info> writes:
> On Tue, Sep 11 2012, Noorul Islam K M wrote:
>
>> What if my gnus-ignored-from-addresses is nil?
>
> You are right, I've added a check for both values.
It works now but pretty slow. I am not sure how this maximum level
setting will help to restrict some groups. I would like to have a
configurable custom variable groups list which should be ignored from
notifications. If you think this will be useful to others, I can come up
with a patch to add 'gnus-notifications-ignored-groups' variable.
Thanks and Regards
Noorul
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-12 3:32 ` Noorul Islam K M
@ 2012-09-12 4:15 ` Charles Philip Chan
2012-09-12 5:25 ` Noorul Islam K M
0 siblings, 1 reply; 18+ messages in thread
From: Charles Philip Chan @ 2012-09-12 4:15 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 614 bytes --]
Noorul Islam K M <noorul@noorul.com> writes:
Hi Noorul:
> It works now but pretty slow. I am not sure how this maximum level
> setting will help to restrict some groups.
The logic here is that you set the important groups that you want
notifications above and at the number set in
"gnus-notifications-minimum-level" by using group levels (set with S l
in the group buffer). For example, if you set it to "2", only groups
that are level 2 and 1 will have notifications.
Cheers,
Charles
--
"Oh, I've seen copies [of Linux Journal] around the terminal room at The
Labs."
(By Dennis Ritchie)
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-12 4:15 ` Charles Philip Chan
@ 2012-09-12 5:25 ` Noorul Islam K M
0 siblings, 0 replies; 18+ messages in thread
From: Noorul Islam K M @ 2012-09-12 5:25 UTC (permalink / raw)
To: Charles Philip Chan; +Cc: ding
Charles Philip Chan <cpchan@bell.net> writes:
> Noorul Islam K M <noorul@noorul.com> writes:
>
> Hi Noorul:
>
>> It works now but pretty slow. I am not sure how this maximum level
>> setting will help to restrict some groups.
>
> The logic here is that you set the important groups that you want
> notifications above and at the number set in
> "gnus-notifications-minimum-level" by using group levels (set with S l
> in the group buffer). For example, if you set it to "2", only groups
> that are level 2 and 1 will have notifications.
>
Thank you for explaining this to me clearly.
Thanks and Regards
Noorul
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-11 5:55 ` Charles Philip Chan
2012-09-11 6:18 ` Charles Philip Chan
2012-09-11 7:15 ` Noorul Islam K M
@ 2012-09-11 16:49 ` Adam Sjøgren
2012-09-12 1:53 ` Charles Philip Chan
2 siblings, 1 reply; 18+ messages in thread
From: Adam Sjøgren @ 2012-09-11 16:49 UTC (permalink / raw)
To: ding
On Tue, 11 Sep 2012 01:55:49 -0400, Charles wrote:
> OK, it is something else. Have you tried customizing
> "gnus-notifications-minimum-level"? It defaults to Level 1 groups.
I had missed this - I never had a reason to put my mail groups on level
1. Now I have.
Thanks for the tip!
Best regards,
Adam
--
"Hur långt man än har kommit Adam Sjøgren
är det alltid längre kvar" asjo@koldfront.dk
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-11 5:36 ` Noorul Islam K M
2012-09-11 5:55 ` Charles Philip Chan
@ 2012-09-11 6:37 ` Michael Albinus
2012-09-11 7:07 ` Noorul Islam K M
1 sibling, 1 reply; 18+ messages in thread
From: Michael Albinus @ 2012-09-11 6:37 UTC (permalink / raw)
To: Noorul Islam K M; +Cc: Charles Philip Chan, ding
Noorul Islam K M <noorul@noorul.com> writes:
> I think I have
>
> noman in ~
> $ --> echo $DBUS_SESSION_BUS_ADDRESS
> unix:abstract=/tmp/dbus-uxvaB7e5OP,guid=044075e05c08bb0ac331d85900000027
If you want to check your D-Bus settings, and whether the notifications
daemon is running, you could apply
--8<---------------cut here---------------start------------->8---
(require 'notifications)
(notifications-notify :title "test")
--8<---------------cut here---------------end--------------->8---
> Thanks and Regards
> Noorul
Best regards, Michael.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gnus notifications setup
2012-09-11 6:37 ` Michael Albinus
@ 2012-09-11 7:07 ` Noorul Islam K M
0 siblings, 0 replies; 18+ messages in thread
From: Noorul Islam K M @ 2012-09-11 7:07 UTC (permalink / raw)
To: Michael Albinus; +Cc: Charles Philip Chan, ding
Michael Albinus <michael.albinus@gmx.de> writes:
> Noorul Islam K M <noorul@noorul.com> writes:
>
>> I think I have
>>
>> noman in ~
>> $ --> echo $DBUS_SESSION_BUS_ADDRESS
>> unix:abstract=/tmp/dbus-uxvaB7e5OP,guid=044075e05c08bb0ac331d85900000027
>
> If you want to check your D-Bus settings, and whether the notifications
> daemon is running, you could apply
>
> (require 'notifications)
> (notifications-notify :title "test")
>
Well, in my initial mail, I said;
I tested this using the following expression and it works.
(gnus-notifications-notify "Noorul" "Testing notification" nil)
Thanks and Regards
Noorul
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2012-09-12 5:25 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-11 5:04 gnus notifications setup Noorul Islam K M
2012-09-11 5:32 ` Charles Philip Chan
2012-09-11 5:36 ` Noorul Islam K M
2012-09-11 5:55 ` Charles Philip Chan
2012-09-11 6:18 ` Charles Philip Chan
2012-09-11 7:15 ` Noorul Islam K M
2012-09-11 8:01 ` Julien Danjou
2012-09-11 9:12 ` Noorul Islam K M
2012-09-11 9:21 ` Julien Danjou
2012-09-11 9:24 ` Noorul Islam K M
2012-09-11 9:41 ` Julien Danjou
2012-09-12 3:32 ` Noorul Islam K M
2012-09-12 4:15 ` Charles Philip Chan
2012-09-12 5:25 ` Noorul Islam K M
2012-09-11 16:49 ` Adam Sjøgren
2012-09-12 1:53 ` Charles Philip Chan
2012-09-11 6:37 ` Michael Albinus
2012-09-11 7:07 ` Noorul Islam K M
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).