* notifications.el server mode?
@ 2011-06-10 16:19 Ted Zlatanov
2011-06-11 9:23 ` Michael Albinus
0 siblings, 1 reply; 6+ messages in thread
From: Ted Zlatanov @ 2011-06-10 16:19 UTC (permalink / raw)
To: emacs-devel
Can Emacs use notifications.el as a server (recipient)? Currently it
seems that it can only be a client (sender). If not, how hard is that
to add?
Thanks
Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: notifications.el server mode?
2011-06-10 16:19 notifications.el server mode? Ted Zlatanov
@ 2011-06-11 9:23 ` Michael Albinus
2011-06-11 10:49 ` Ted Zlatanov
0 siblings, 1 reply; 6+ messages in thread
From: Michael Albinus @ 2011-06-11 9:23 UTC (permalink / raw)
To: emacs-devel
Ted Zlatanov <tzz@lifelogs.com> writes:
> Can Emacs use notifications.el as a server (recipient)? Currently it
> seems that it can only be a client (sender). If not, how hard is that
> to add?
notifications.el uses the D-Bus specification of the
org.freedesktop.Notifications service on the session bus. Of course,
there could be an implementation of this service inside Emacs.
But according to the D-Bus architecture, there can be only one service
using a given service name at a time; the Emacs notification daemon
would need to replace the desktop's default notification daemon, which
might not be desirable (except you regard Emacs as *the* desktop, aren't
you?)
> Thanks
> Ted
Best regards, Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: notifications.el server mode?
2011-06-11 9:23 ` Michael Albinus
@ 2011-06-11 10:49 ` Ted Zlatanov
2011-06-11 11:03 ` Michael Albinus
0 siblings, 1 reply; 6+ messages in thread
From: Ted Zlatanov @ 2011-06-11 10:49 UTC (permalink / raw)
To: emacs-devel
On Sat, 11 Jun 2011 11:23:53 +0200 Michael Albinus <michael.albinus@gmx.de> wrote:
MA> Ted Zlatanov <tzz@lifelogs.com> writes:
>> Can Emacs use notifications.el as a server (recipient)? Currently it
>> seems that it can only be a client (sender). If not, how hard is that
>> to add?
MA> notifications.el uses the D-Bus specification of the
MA> org.freedesktop.Notifications service on the session bus. Of course,
MA> there could be an implementation of this service inside Emacs.
Great. How hard is it to add?
MA> But according to the D-Bus architecture, there can be only one service
MA> using a given service name at a time; the Emacs notification daemon
MA> would need to replace the desktop's default notification daemon, which
MA> might not be desirable
So we'll need a way to find if a notification daemon is running, too?
MA> (except you regard Emacs as *the* desktop, aren't you?)
Almost :) I want it to provide the things I listed in
http://permalink.gmane.org/gmane.emacs.devel/139687 plus notifications
as requested here. But it shouldn't be the WM, IMO that won't work.
Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: notifications.el server mode?
2011-06-11 10:49 ` Ted Zlatanov
@ 2011-06-11 11:03 ` Michael Albinus
2011-06-11 11:37 ` Ted Zlatanov
0 siblings, 1 reply; 6+ messages in thread
From: Michael Albinus @ 2011-06-11 11:03 UTC (permalink / raw)
To: emacs-devel
Ted Zlatanov <tzz@lifelogs.com> writes:
> MA> notifications.el uses the D-Bus specification of the
> MA> org.freedesktop.Notifications service on the session bus. Of course,
> MA> there could be an implementation of this service inside Emacs.
>
> Great. How hard is it to add?
I could provide you the D-Bus frame functionality, that's easy. I have
no idea how hard it is to implement the functionality with Emacs frames
and icons; this I would let to you :-)
Note, that the daemon would be responsible to handle *all* notifications
swimming around the session, not only the ones sent from Emacs itself.
> MA> But according to the D-Bus architecture, there can be only one service
> MA> using a given service name at a time; the Emacs notification daemon
> MA> would need to replace the desktop's default notification daemon, which
> MA> might not be desirable
>
> So we'll need a way to find if a notification daemon is running, too?
That's simple. D-Bus allows registration of services, kicking existing
ones out. It's not a common use case, though :-)
> Ted
Best regards, Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: notifications.el server mode?
2011-06-11 11:03 ` Michael Albinus
@ 2011-06-11 11:37 ` Ted Zlatanov
2011-06-11 14:49 ` Michael Albinus
0 siblings, 1 reply; 6+ messages in thread
From: Ted Zlatanov @ 2011-06-11 11:37 UTC (permalink / raw)
To: emacs-devel
On Sat, 11 Jun 2011 13:03:29 +0200 Michael Albinus <michael.albinus@gmx.de> wrote:
MA> Ted Zlatanov <tzz@lifelogs.com> writes:
MA> notifications.el uses the D-Bus specification of the
MA> org.freedesktop.Notifications service on the session bus. Of course,
MA> there could be an implementation of this service inside Emacs.
>>
>> Great. How hard is it to add?
MA> I could provide you the D-Bus frame functionality, that's easy. I have
MA> no idea how hard it is to implement the functionality with Emacs frames
MA> and icons; this I would let to you :-)
That would be great. I'll handle the messages, sure.
MA> Note, that the daemon would be responsible to handle *all* notifications
MA> swimming around the session, not only the ones sent from Emacs
MA> itself.
No problem :)
>> So we'll need a way to find if a notification daemon is running, too?
MA> That's simple. D-Bus allows registration of services, kicking existing
MA> ones out. It's not a common use case, though :-)
I keep discovering uncommon needs as I work on the Emacs desktop
functionality... Thanks for your help!
Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: notifications.el server mode?
2011-06-11 11:37 ` Ted Zlatanov
@ 2011-06-11 14:49 ` Michael Albinus
0 siblings, 0 replies; 6+ messages in thread
From: Michael Albinus @ 2011-06-11 14:49 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 859 bytes --]
Ted Zlatanov <tzz@lifelogs.com> writes:
> MA> I could provide you the D-Bus frame functionality, that's easy. I have
> MA> no idea how hard it is to implement the functionality with Emacs frames
> MA> and icons; this I would let to you :-)
>
> That would be great. I'll handle the messages, sure.
I've appended a very raw frame, which works already for me. You'll get
the idea.
If you want to test, you might use another Emacs instance for sending a
notification. Running notifications.el and ofn-daemon.el in the same
Emacs instance does not work yet, because notifications.el uses the
synchronous `dbus-call-method'. This must be replaced by
`dbus-call-method-non-blocking', then both packages could be used in the
same Emacs instance.
As test, I have sent
(notifications-notify :body "Hello Ted, this is Michael.")
> Ted
Best regards, Michael.
[-- Attachment #2: ofn-daemon.el --]
[-- Type: application/emacs-lisp, Size: 5052 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-06-11 14:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-10 16:19 notifications.el server mode? Ted Zlatanov
2011-06-11 9:23 ` Michael Albinus
2011-06-11 10:49 ` Ted Zlatanov
2011-06-11 11:03 ` Michael Albinus
2011-06-11 11:37 ` Ted Zlatanov
2011-06-11 14:49 ` Michael Albinus
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).