* file watch feature missing on darwin
@ 2013-12-30 1:45 Leo Liu
2013-12-30 9:08 ` Michael Albinus
0 siblings, 1 reply; 11+ messages in thread
From: Leo Liu @ 2013-12-30 1:45 UTC (permalink / raw)
To: emacs-devel
Hi there,
Any reason this feature is not implemented for darwin? Thanks.
Leo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: file watch feature missing on darwin
2013-12-30 1:45 file watch feature missing on darwin Leo Liu
@ 2013-12-30 9:08 ` Michael Albinus
2013-12-30 14:44 ` Jan Djärv
0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2013-12-30 9:08 UTC (permalink / raw)
To: Leo Liu; +Cc: emacs-devel
Leo Liu <sdl.web@gmail.com> writes:
> Hi there,
Hi Leo,
> Any reason this feature is not implemented for darwin? Thanks.
The native file monitoring library for BSD-like systems is kqueue. Support
to Emacs is not added due to a lack of a volunteer who implements
it. Feel free to do the job :-) I would be happy to add a kqueue
interface into filenotify.el.
According to the Changelogs, kqueue has been added as native library to
GIO a year a go. If you have linked Emacs to a recent (*) glib on your
Darwin system, file monitoring shall be available for you.
(*) I haven't checked which glib version.
> Leo
Best regards, Michael.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: file watch feature missing on darwin
2013-12-30 9:08 ` Michael Albinus
@ 2013-12-30 14:44 ` Jan Djärv
2013-12-30 15:12 ` Michael Albinus
0 siblings, 1 reply; 11+ messages in thread
From: Jan Djärv @ 2013-12-30 14:44 UTC (permalink / raw)
To: Michael Albinus; +Cc: Leo Liu, emacs-devel
Hello.
30 dec 2013 kl. 10:08 skrev Michael Albinus <michael.albinus@gmx.de>:
> Leo Liu <sdl.web@gmail.com> writes:
>
>> Hi there,
>
> Hi Leo,
>
>> Any reason this feature is not implemented for darwin? Thanks.
>
> The native file monitoring library for BSD-like systems is kqueue. Support
> to Emacs is not added due to a lack of a volunteer who implements
> it. Feel free to do the job :-) I would be happy to add a kqueue
> interface into filenotify.el.
>
> According to the Changelogs, kqueue has been added as native library to
> GIO a year a go. If you have linked Emacs to a recent (*) glib on your
> Darwin system, file monitoring shall be available for you.
It would not work if linking in Glib to a NS build due to differences in event loops.
Jan D.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: file watch feature missing on darwin
2013-12-30 14:44 ` Jan Djärv
@ 2013-12-30 15:12 ` Michael Albinus
2013-12-30 15:30 ` Jan Djärv
2013-12-31 11:37 ` Rüdiger Sonderfeld
0 siblings, 2 replies; 11+ messages in thread
From: Michael Albinus @ 2013-12-30 15:12 UTC (permalink / raw)
To: Jan Djärv; +Cc: Leo Liu, emacs-devel
Jan Djärv <jan.h.d@swipnet.se> writes:
> Hello.
Hi,
>> According to the Changelogs, kqueue has been added as native library to
>> GIO a year a go. If you have linked Emacs to a recent (*) glib on your
>> Darwin system, file monitoring shall be available for you.
>
> It would not work if linking in Glib to a NS build due to differences
> in event loops.
Well, I didn't know that. So we need a native kqueue integration into Emacs.
On a related topic, I plan to write an alternative to dbusbind.c. That
alternative shall use gdbus instead of libdbus. But this would mean that
this alternatvive D-Bus bindings couldn't be used for NS builds. Sad.
> Jan D.
Best regards, Michael.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: file watch feature missing on darwin
2013-12-30 15:12 ` Michael Albinus
@ 2013-12-30 15:30 ` Jan Djärv
2013-12-30 16:56 ` Michael Albinus
2013-12-31 0:22 ` Leo Liu
2013-12-31 11:37 ` Rüdiger Sonderfeld
1 sibling, 2 replies; 11+ messages in thread
From: Jan Djärv @ 2013-12-30 15:30 UTC (permalink / raw)
To: Michael Albinus; +Cc: Leo Liu, emacs-devel
Hello.
30 dec 2013 kl. 16:12 skrev Michael Albinus <michael.albinus@gmx.de>:
> Jan Djärv <jan.h.d@swipnet.se> writes:
>
>> Hello.
>
> Hi,
>
>>> According to the Changelogs, kqueue has been added as native library to
>>> GIO a year a go. If you have linked Emacs to a recent (*) glib on your
>>> Darwin system, file monitoring shall be available for you.
>>
>> It would not work if linking in Glib to a NS build due to differences
>> in event loops.
>
> Well, I didn't know that. So we need a native kqueue integration into Emacs.
On OSX you can also use GCD. But kqueue is not integrated into the event loop either, so it would require additional code anyway. Possibly by dispatching another thread. I guess this is required for any BSD system.
>
> On a related topic, I plan to write an alternative to dbusbind.c. That
> alternative shall use gdbus instead of libdbus. But this would mean that
> this alternatvive D-Bus bindings couldn't be used for NS builds. Sad.
AFAIK, using Glib and NS just means calling xg_select instead of pselect in one place. It is not done, because there has been no need for it. GLib and DBus is not much used for native OSX apps (if at all). GNUStep would be another matter.
Jan D.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: file watch feature missing on darwin
2013-12-30 15:30 ` Jan Djärv
@ 2013-12-30 16:56 ` Michael Albinus
2014-01-17 12:10 ` Michael Albinus
2013-12-31 0:22 ` Leo Liu
1 sibling, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2013-12-30 16:56 UTC (permalink / raw)
To: Jan Djärv; +Cc: Leo Liu, emacs-devel
Jan Djärv <jan.h.d@swipnet.se> writes:
> Hello.
Hi,
> On OSX you can also use GCD. But kqueue is not integrated into the
> event loop either, so it would require additional code anyway.
> Possibly by dispatching another thread. I guess this is required for
> any BSD system.
I have no knowledge about OSX (and BSD in general); I would let it to
whomever takes the ball.
> AFAIK, using Glib and NS just means calling xg_select instead of
> pselect in one place. It is not done, because there has been no need
> for it.
Ah, thanks for the hint. I'll take it into account when I integrate that
code. In case of problems I'll ask you :-)
> Jan D.
Best regards, Michael.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: file watch feature missing on darwin
2013-12-30 15:30 ` Jan Djärv
2013-12-30 16:56 ` Michael Albinus
@ 2013-12-31 0:22 ` Leo Liu
1 sibling, 0 replies; 11+ messages in thread
From: Leo Liu @ 2013-12-31 0:22 UTC (permalink / raw)
To: Jan Djärv; +Cc: Michael Albinus, emacs-devel
On 2013-12-30 23:30 +0800, Jan Djärv wrote:
> On OSX you can also use GCD. But kqueue is not integrated into the
> event loop either, so it would require additional code anyway.
> Possibly by dispatching another thread. I guess this is required for
> any BSD system.
Thank you for looking into this. I hope we have something available on
the three major platforms.
Leo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: file watch feature missing on darwin
2013-12-30 15:12 ` Michael Albinus
2013-12-30 15:30 ` Jan Djärv
@ 2013-12-31 11:37 ` Rüdiger Sonderfeld
1 sibling, 0 replies; 11+ messages in thread
From: Rüdiger Sonderfeld @ 2013-12-31 11:37 UTC (permalink / raw)
To: Michael Albinus, Jan Djärv; +Cc: Leo Liu, emacs-devel
Michael Albinus <michael.albinus@gmx.de> wrote:
>Jan Djärv <jan.h.d@swipnet.se> writes:
>Well, I didn't know that. So we need a native kqueue integration into
>Emacs.
Kqueue's file notify support is extremely bad. I've looked into it when i wrote the inotify support. I don't think we can implement all the features without some major hacks. That's why using glib seems like a good idea because it does all it can do to support that broken api. It should work on *BSD and tough luck to the non-free folks. Reimplementing it in Emacs seems like a big maintenance hassle. Maybe we can copy the necessary parts from glib if we really care enough about supporting non-free software.
Regards
Rüdiger
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: file watch feature missing on darwin
2013-12-30 16:56 ` Michael Albinus
@ 2014-01-17 12:10 ` Michael Albinus
2014-01-22 9:00 ` Jan D.
0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2014-01-17 12:10 UTC (permalink / raw)
To: Jan Djärv; +Cc: Leo Liu, emacs-devel
Michael Albinus <michael.albinus@gmx.de> writes:
> Jan Djärv <jan.h.d@swipnet.se> writes:
>
>> Hello.
Hi Jan,
>> AFAIK, using Glib and NS just means calling xg_select instead of
>> pselect in one place. It is not done, because there has been no need
>> for it.
>
> Ah, thanks for the hint. I'll take it into account when I integrate that
> code. In case of problems I'll ask you :-)
Here I am already ...
I'm just checking how to receive file notification events in batch
mode. It works fine when inotify.c is linked with Emacs, using
(read-event ...), but I'm not able to receive events when gfilenotify.c
is linked.
No problem when Emacs runs interactively. Do you know, how I could
retrieve events in that case?
>> Jan D.
Best regards, Michael.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: file watch feature missing on darwin
2014-01-17 12:10 ` Michael Albinus
@ 2014-01-22 9:00 ` Jan D.
2014-01-22 9:56 ` Michael Albinus
0 siblings, 1 reply; 11+ messages in thread
From: Jan D. @ 2014-01-22 9:00 UTC (permalink / raw)
To: Michael Albinus; +Cc: Leo Liu, emacs-devel
Michael Albinus skrev 2014-01-17 13:10:
> Michael Albinus <michael.albinus@gmx.de> writes:
>
>> Jan Djärv <jan.h.d@swipnet.se> writes:
>>
>>> Hello.
>
> Hi Jan,
>
>>> AFAIK, using Glib and NS just means calling xg_select instead of
>>> pselect in one place. It is not done, because there has been no need
>>> for it.
>>
>> Ah, thanks for the hint. I'll take it into account when I integrate that
>> code. In case of problems I'll ask you :-)
>
> Here I am already ...
>
> I'm just checking how to receive file notification events in batch
> mode. It works fine when inotify.c is linked with Emacs, using
> (read-event ...), but I'm not able to receive events when gfilenotify.c
> is linked.
>
> No problem when Emacs runs interactively. Do you know, how I could
> retrieve events in that case?
The select in the NS port runs in another thread. So just switching to
xg_select will not do. You have to explicitly check if in batch mode,
then check if GLib has file descriptors we don't know about, and then
call xg_select in the main thread.
Jan D.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: file watch feature missing on darwin
2014-01-22 9:00 ` Jan D.
@ 2014-01-22 9:56 ` Michael Albinus
0 siblings, 0 replies; 11+ messages in thread
From: Michael Albinus @ 2014-01-22 9:56 UTC (permalink / raw)
To: Jan D.; +Cc: Leo Liu, emacs-devel
"Jan D." <jan.h.d@swipnet.se> writes:
Hi Jan,
>> I'm just checking how to receive file notification events in batch
>> mode. It works fine when inotify.c is linked with Emacs, using
>> (read-event ...), but I'm not able to receive events when gfilenotify.c
>> is linked.
>>
>> No problem when Emacs runs interactively. Do you know, how I could
>> retrieve events in that case?
>
> The select in the NS port runs in another thread. So just switching
> to xg_select will not do. You have to explicitly check if in batch
> mode, then check if GLib has file descriptors we don't know about, and
> then call xg_select in the main thread.
Thanks. I've created Bug#16519 for the time being, 'cause I'm not
skilled to fix it immediately. Will start to read respective
documentation & sources ...
> Jan D.
Best regards, Michael.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-01-22 9:56 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-30 1:45 file watch feature missing on darwin Leo Liu
2013-12-30 9:08 ` Michael Albinus
2013-12-30 14:44 ` Jan Djärv
2013-12-30 15:12 ` Michael Albinus
2013-12-30 15:30 ` Jan Djärv
2013-12-30 16:56 ` Michael Albinus
2014-01-17 12:10 ` Michael Albinus
2014-01-22 9:00 ` Jan D.
2014-01-22 9:56 ` Michael Albinus
2013-12-31 0:22 ` Leo Liu
2013-12-31 11:37 ` Rüdiger Sonderfeld
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.