Re: [O] Does org-nofity uses dbus?

2016-06-23 Thread Xi Shen
I also think it is a good idea to add some functions in Emacs for Win32
platform, and let other's used those functions from elisp. Thanks~

On Thu, Jun 23, 2016 at 1:02 AM Fabrice Popineau 
wrote:

> 2016-06-22 14:16 GMT+02:00 Xi Shen :
>
>> Well~that's good news. But I think dbus requires X11 to work. But in
>> Cygwin environment, people usually do not configure a full X11 environment.
>>
>
> No, dbus doesn't require X11 to work. Neither does emacs require  Cygwin
> to work.
> Actually, Emacs compiles as a native Windows application (using MinGW32 or
> MinGW64) and it is also the case of dbus.
>
>
>> Besides, for org-notify, could dbus help it playing a notification sound
>> on Windows? Or popup a notification message?
>>
>>
> I guess it will work the same way it does elsewhere.
>
>
>
>> So what I am thinking is to get some Windows native behavior for
>> org-notify on Windows/Cygwin environment.
>>
>>
> I too think that a native, session only module that will provide the same
> interface as dbus could be interesting
> for Windows users. However, that shouldn't prevent those who want to use
> dbus to use it.
>
> AFAIU, using dbus, you could have a distant running emacs (ssh) session
> and get notifications on your local desktop,
> provided the right setup.
>
> Well, browsing the source code, I see that Eli Zaretskii has already
> implemented native win32 tray notifications.
> They are a small subset of the dbus notifications.
> However, he made them exclusive with dbus. I don't see the reason yet.
>
> Fabrice
>
-- 


Thanks,
David S.


Re: [O] Does org-nofity uses dbus?

2016-06-22 Thread Fabrice Popineau
2016-06-22 14:16 GMT+02:00 Xi Shen :

> Well~that's good news. But I think dbus requires X11 to work. But in
> Cygwin environment, people usually do not configure a full X11 environment.
>

No, dbus doesn't require X11 to work. Neither does emacs require  Cygwin to
work.
Actually, Emacs compiles as a native Windows application (using MinGW32 or
MinGW64) and it is also the case of dbus.


> Besides, for org-notify, could dbus help it playing a notification sound
> on Windows? Or popup a notification message?
>
>
I guess it will work the same way it does elsewhere.



> So what I am thinking is to get some Windows native behavior for
> org-notify on Windows/Cygwin environment.
>
>
I too think that a native, session only module that will provide the same
interface as dbus could be interesting
for Windows users. However, that shouldn't prevent those who want to use
dbus to use it.

AFAIU, using dbus, you could have a distant running emacs (ssh) session and
get notifications on your local desktop,
provided the right setup.

Well, browsing the source code, I see that Eli Zaretskii has already
implemented native win32 tray notifications.
They are a small subset of the dbus notifications.
However, he made them exclusive with dbus. I don't see the reason yet.

Fabrice


Re: [O] Does org-nofity uses dbus?

2016-06-22 Thread Nick Dokos
Xi Shen  writes:

> Well~that's good news. But I think dbus requires X11 to work. But in Cygwin 
> environment, people usually
> do not configure a full X11 environment.
>
I don't think that's true: dbus is "just" a message bus - an IPC
mechanism that different processes use to communicate. It has nothing to
do with X11 or any other windowing protocol.

The dbus-daemon manual page says:

   The systemwide daemon is largely used for broadcasting system events, 
such as changes
   to the printer queue, or adding/removing devices.

   The per-session daemon is used for various interprocess communication 
among desktop
   applications (however, it is not tied to X or the GUI in any way).


What makes you think that it requires X11?

> Besides, for org-notify, could dbus help it playing a notification sound on 
> Windows? Or popup a
> notification message?
>

Sure it could: you send a message on the dbus saying "play a sound" and some 
other
process listening on the dbus gets the message and plays a sound.

> So what I am thinking is to get some Windows native behavior for org-notify 
> on Windows/Cygwin
> environment.
>

Bad idea imo.

> On Tue, Jun 21, 2016 at 10:25 PM Fabrice Popineau 
>  wrote:
>
> Le 21 juin 2016 16:14, "Xi Shen"  a écrit :
> >
> > Yeah...getting dbus to work on Windows will be hard.
>
> Actually, not so much. Dbus does work on windows. It doesn't work right 
> now on emacs. I'm looking
> into it.
>
> Fabrice
>
> --
>
> Thanks,
> David S.
>

-- 
Nick




Re: [O] Does org-nofity uses dbus?

2016-06-22 Thread Xi Shen
Well~that's good news. But I think dbus requires X11 to work. But in Cygwin
environment, people usually do not configure a full X11 environment.

Besides, for org-notify, could dbus help it playing a notification sound on
Windows? Or popup a notification message?

So what I am thinking is to get some Windows native behavior for org-notify
on Windows/Cygwin environment.


On Tue, Jun 21, 2016 at 10:25 PM Fabrice Popineau <
fabrice.popin...@centralesupelec.fr> wrote:

>
> Le 21 juin 2016 16:14, "Xi Shen"  a écrit :
> >
> > Yeah...getting dbus to work on Windows will be hard.
>
> Actually, not so much. Dbus does work on windows. It doesn't work right
> now on emacs. I'm looking into it.
>
> Fabrice
>
-- 


Thanks,
David S.


Re: [O] Does org-nofity uses dbus?

2016-06-21 Thread Fabrice Popineau
Le 21 juin 2016 16:14, "Xi Shen"  a écrit :
>
> Yeah...getting dbus to work on Windows will be hard.

Actually, not so much. Dbus does work on windows. It doesn't work right now
on emacs. I'm looking into it.

Fabrice


Re: [O] Does org-nofity uses dbus?

2016-06-21 Thread Xi Shen
Yeah...getting dbus to work on Windows will be hard. Maybe we should
consider using some other ways to display a notification on Windows.

E.g. On Windows/Cygwin environment, org-notify should use a command line
tool to show a notification in the Windows notification area.

But I wonder how to deploy this command line tool with Emacs system...any
suggestions/ideas?


Thanks,
David


On Tue, Jun 21, 2016 at 4:45 PM Fabrice Popineau <
fabrice.popin...@supelec.fr> wrote:

> 2016-06-21 8:31 GMT+02:00 Xi Shen :
>
>> Hi,
>>
>> I got below error after I called (org-notify-start). It seems the
>> dbus-error happens very close to the task notification. I wonder if
>> org-notify uses dbus.
>>
>> Error: (dbus-error "No connection to bus" :session)
>> Warning: notification for "Go to dental in 30 mins." behind schedule!
>> Error: (dbus-error "No connection to bus" :session) [2 times]
>> Warning: notification for "Go to dental in 30 mins." behind schedule!
>> Error: (dbus-error "No connection to bus" :session) [2 times]
>>
>> I am using Emacs on Windows, and there's no dbus on Windows...
>>
>>
> It seems so, yes: org-notify calls notifications-notify from the emacs
> notifications.el library.
> Clearly, notifications.el relies on dbus.
>
> However, if you are using Mingw64, there is a dbus package which should
> provide
> what is needed. Unfortunately, I tried it and can't tell yet how to
> configure it or if it
> even works.
>
>
> Fabrice
>
> --


Thanks,
David S.


Re: [O] Does org-nofity uses dbus?

2016-06-21 Thread Fabrice Popineau
2016-06-21 8:31 GMT+02:00 Xi Shen :

> Hi,
>
> I got below error after I called (org-notify-start). It seems the
> dbus-error happens very close to the task notification. I wonder if
> org-notify uses dbus.
>
> Error: (dbus-error "No connection to bus" :session)
> Warning: notification for "Go to dental in 30 mins." behind schedule!
> Error: (dbus-error "No connection to bus" :session) [2 times]
> Warning: notification for "Go to dental in 30 mins." behind schedule!
> Error: (dbus-error "No connection to bus" :session) [2 times]
>
> I am using Emacs on Windows, and there's no dbus on Windows...
>
>
It seems so, yes: org-notify calls notifications-notify from the emacs
notifications.el library.
Clearly, notifications.el relies on dbus.

However, if you are using Mingw64, there is a dbus package which should
provide
what is needed. Unfortunately, I tried it and can't tell yet how to
configure it or if it
even works.


Fabrice


[O] Does org-nofity uses dbus?

2016-06-21 Thread Xi Shen
Hi,

I got below error after I called (org-notify-start). It seems the
dbus-error happens very close to the task notification. I wonder if
org-notify uses dbus.

Error: (dbus-error "No connection to bus" :session)
Warning: notification for "Go to dental in 30 mins." behind schedule!
Error: (dbus-error "No connection to bus" :session) [2 times]
Warning: notification for "Go to dental in 30 mins." behind schedule!
Error: (dbus-error "No connection to bus" :session) [2 times]

I am using Emacs on Windows, and there's no dbus on Windows...


Thanks,
David

-- 


Thanks,
David S.