<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src, branch scratch/kqueue</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Some final fixes in file notification before merging with master</title>
<updated>2015-11-25T14:07:12+00:00</updated>
<author>
<name>Michael Albinus</name>
</author>
<published>2015-11-25T14:00:06+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=bec57a486a2a40d7c770dab72a34cf6a4d17a5d0'/>
<id>bec57a486a2a40d7c770dab72a34cf6a4d17a5d0</id>
<content type='text'>
* lisp/filenotify.el (file-notify--rm-descriptor): Remove WHAT arg.
(file-notify-callback): Improve check for `stopped' event.  Call
`file-notify-rm-watch' rather than `file-notify--rm-descriptor'.
(file-notify-add-watch): In case FILE is not a directory, call the
file monitor for the kqueue backend.  Otherwise, call the
directory monitor for the upper directory.

* src/inotify.c (inotifyevent_to_event): Extract file name from
watch_object if the event doesn't provide it.
(Finotify_add_watch): Add file name to watch_object.

* test/automated/file-notify-tests.el (file-notify--test-timeout):
Use different timeouts for different libraries.
(file-notify--test-with-events): Suppress lock files.  Flush
outstanding events before running the body.
(file-notify-test02-events, file-notify-test04-file-validity): Do
not skip cygwin tests.  Add additional test for file creation.
Adapt expected result for different backends.
(file-notify-test03-autorevert): Some of the tests don't work for
w32notify.
(file-notify-test06-many-events): Rename into both directions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/filenotify.el (file-notify--rm-descriptor): Remove WHAT arg.
(file-notify-callback): Improve check for `stopped' event.  Call
`file-notify-rm-watch' rather than `file-notify--rm-descriptor'.
(file-notify-add-watch): In case FILE is not a directory, call the
file monitor for the kqueue backend.  Otherwise, call the
directory monitor for the upper directory.

* src/inotify.c (inotifyevent_to_event): Extract file name from
watch_object if the event doesn't provide it.
(Finotify_add_watch): Add file name to watch_object.

* test/automated/file-notify-tests.el (file-notify--test-timeout):
Use different timeouts for different libraries.
(file-notify--test-with-events): Suppress lock files.  Flush
outstanding events before running the body.
(file-notify-test02-events, file-notify-test04-file-validity): Do
not skip cygwin tests.  Add additional test for file creation.
Adapt expected result for different backends.
(file-notify-test03-autorevert): Some of the tests don't work for
w32notify.
(file-notify-test06-many-events): Rename into both directions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rework file notifications, kqueue has problems with directory monitors</title>
<updated>2015-11-25T14:07:12+00:00</updated>
<author>
<name>Michael Albinus</name>
</author>
<published>2015-11-20T18:06:42+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=0247489fed0f70b2abf960de48bc4432381a581b'/>
<id>0247489fed0f70b2abf960de48bc4432381a581b</id>
<content type='text'>
* lisp/filenotify.el (file-notify-add-watch): Call the native
add-watch function on the file, not on the dir.

* src/kqueue.c (kqueue_compare_dir_list): Make also bookkeeping
about already deleted entries.

* test/automated/auto-revert-tests.el
(auto-revert-test01-auto-revert-several-files): Do not call "cp -f"
since this deletes the target file first.

* test/automated/file-notify-tests.el (file-notify--test-event-test):
Make stronger checks.
(file-notify-test01-add-watch, file-notify-test02-events)
(file-notify-test04-file-validity, file-notify-test05-dir-validity):
Rewrite in order to call file monitors but directory monitors.
(file-notify-test06-many-events): Ler rename work in both directions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/filenotify.el (file-notify-add-watch): Call the native
add-watch function on the file, not on the dir.

* src/kqueue.c (kqueue_compare_dir_list): Make also bookkeeping
about already deleted entries.

* test/automated/auto-revert-tests.el
(auto-revert-test01-auto-revert-several-files): Do not call "cp -f"
since this deletes the target file first.

* test/automated/file-notify-tests.el (file-notify--test-event-test):
Make stronger checks.
(file-notify-test01-add-watch, file-notify-test02-events)
(file-notify-test04-file-validity, file-notify-test05-dir-validity):
Rewrite in order to call file monitors but directory monitors.
(file-notify-test06-many-events): Ler rename work in both directions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Continie with pending events</title>
<updated>2015-11-25T14:07:12+00:00</updated>
<author>
<name>Michael Albinus</name>
</author>
<published>2015-11-19T18:49:33+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5154781141c2305c24103beb358453d30a838921'/>
<id>5154781141c2305c24103beb358453d30a838921</id>
<content type='text'>
* src/kqueue.c (pending_events): Remove global variable.
(kqueue_compare_dir_list): Create `write' event for not used
pending events.
(globals_of_kqueue): Remove initialization of pending_events.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/kqueue.c (pending_events): Remove global variable.
(kqueue_compare_dir_list): Create `write' event for not used
pending events.
(globals_of_kqueue): Remove initialization of pending_events.
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle more complex rename operation in kqueue</title>
<updated>2015-11-25T14:07:12+00:00</updated>
<author>
<name>Michael Albinus</name>
</author>
<published>2015-11-19T09:58:08+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c8e266ff5f1862567a9f4b77b2d90b8586b12539'/>
<id>c8e266ff5f1862567a9f4b77b2d90b8586b12539</id>
<content type='text'>
* src/kqueue.c (pending_events): New variable.
(kqueue_compare_dir_list): Handle more complex rename operation.
(globals_of_kqueue): Initialize pending_events.

* test/automated/file-notify-tests.el (file-notify-test06-many-events):
Adapt expected events in the `rename-file' case.
(file-notify-test06-many-events-remote): Declare.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/kqueue.c (pending_events): New variable.
(kqueue_compare_dir_list): Handle more complex rename operation.
(globals_of_kqueue): Initialize pending_events.

* test/automated/file-notify-tests.el (file-notify-test06-many-events):
Adapt expected events in the `rename-file' case.
(file-notify-test06-many-events-remote): Declare.
</pre>
</div>
</content>
</entry>
<entry>
<title>Further fixes for kqueue.</title>
<updated>2015-11-25T14:07:11+00:00</updated>
<author>
<name>Michael Albinus</name>
</author>
<published>2015-11-18T13:47:25+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=65ba5a98d47f4305f95f960efdf424684754a11d'/>
<id>65ba5a98d47f4305f95f960efdf424684754a11d</id>
<content type='text'>
* lisp/filenotify.el (file-notify-callback): Raise also event if
directory name matches.
(file-notify-add-watch): Add `create' to the flags for `kqueue'.

* src/kqueue.c (kqueue_generate_event): Use watch_object as
argument instead of ident.  Remove callback argument.  Adapt
callees.  Check actions whether they are monitored flags.

* test/automated/file-notify-tests.el (file-notify--test-library):
New defun.
(file-notify-test00-availability, file-notify-test02-events)
(file-notify-test04-file-validity)
(file-notify-test05-dir-validity): Use it.
(file-notify-test02-events, file-notify-test04-file-validity): Add
`read-event' calls between different file actions, in order to
give the backends a chance to rais an event.  Needed especially
for kqueue.  In case of deleting a directory, there are two
`deleted' events.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/filenotify.el (file-notify-callback): Raise also event if
directory name matches.
(file-notify-add-watch): Add `create' to the flags for `kqueue'.

* src/kqueue.c (kqueue_generate_event): Use watch_object as
argument instead of ident.  Remove callback argument.  Adapt
callees.  Check actions whether they are monitored flags.

* test/automated/file-notify-tests.el (file-notify--test-library):
New defun.
(file-notify-test00-availability, file-notify-test02-events)
(file-notify-test04-file-validity)
(file-notify-test05-dir-validity): Use it.
(file-notify-test02-events, file-notify-test04-file-validity): Add
`read-event' calls between different file actions, in order to
give the backends a chance to rais an event.  Needed especially
for kqueue.  In case of deleting a directory, there are two
`deleted' events.
</pre>
</div>
</content>
</entry>
<entry>
<title>Code cleanup of kqueue.c</title>
<updated>2015-11-25T14:07:11+00:00</updated>
<author>
<name>Michael Albinus</name>
</author>
<published>2015-11-17T15:46:29+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=13f3508443e4f5c48d40e4dbb11eaf875a5b2042'/>
<id>13f3508443e4f5c48d40e4dbb11eaf875a5b2042</id>
<content type='text'>
* src/kqueue.c (kqueue_directory_listing): Skip "." and "..".
(kqueue_compare_dir_list): Do not loop when calling
directory_files_internal.  Remove checks for "." and "..", this is
done in kqueue_directory_listing now.
(Fkqueue_add_watch): Check for proper emacs_open flags.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/kqueue.c (kqueue_directory_listing): Skip "." and "..".
(kqueue_compare_dir_list): Do not loop when calling
directory_files_internal.  Remove checks for "." and "..", this is
done in kqueue_directory_listing now.
(Fkqueue_add_watch): Check for proper emacs_open flags.
</pre>
</div>
</content>
</entry>
<entry>
<title>Finish implementation in kqueue.c</title>
<updated>2015-11-25T14:07:11+00:00</updated>
<author>
<name>Michael Albinus</name>
</author>
<published>2015-11-16T09:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=8deebe1ab8d79c3a3fbc3043f99af76802f60bd6'/>
<id>8deebe1ab8d79c3a3fbc3043f99af76802f60bd6</id>
<content type='text'>
* src/kqueue.c (kqueue_directory_listing, kqueue_callback):
Simplify access to list.
(kqueue_compare_dir_list): Simplify access to list.  Raise
`delete' event if directory does not exist any longer.  Otherwise,
wait until directory contents has changed.  Fix error in check.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/kqueue.c (kqueue_directory_listing, kqueue_callback):
Simplify access to list.
(kqueue_compare_dir_list): Simplify access to list.  Raise
`delete' event if directory does not exist any longer.  Otherwise,
wait until directory contents has changed.  Fix error in check.
</pre>
</div>
</content>
</entry>
<entry>
<title>More work on kqueue</title>
<updated>2015-11-25T14:07:11+00:00</updated>
<author>
<name>Michael Albinus</name>
</author>
<published>2015-11-15T17:45:32+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e95b309ae4f5fbdebdb7067daca9d091925047cf'/>
<id>e95b309ae4f5fbdebdb7067daca9d091925047cf</id>
<content type='text'>
* lisp/filenotify.el (file-notify-callback): Handle also the
`rename' event from kqueue.
(file-notify-add-watch): Do not register an entry twice.

* src/kqueue.c (kqueue_directory_listing): New function.
(kqueue_generate_event): New argument FILE1.  Adapt callees.
(kqueue_compare_dir_list): Rewrite in order to make it more robust.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/filenotify.el (file-notify-callback): Handle also the
`rename' event from kqueue.
(file-notify-add-watch): Do not register an entry twice.

* src/kqueue.c (kqueue_directory_listing): New function.
(kqueue_generate_event): New argument FILE1.  Adapt callees.
(kqueue_compare_dir_list): Rewrite in order to make it more robust.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement directory events</title>
<updated>2015-11-25T14:07:11+00:00</updated>
<author>
<name>Michael Albinus</name>
</author>
<published>2015-11-14T11:51:28+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=41d9bd0c3b19d839b72fdd20e613cb6ab3b1b1f4'/>
<id>41d9bd0c3b19d839b72fdd20e613cb6ab3b1b1f4</id>
<content type='text'>
* lisp/filenotify.el (file-notify-handle-event)
(file-notify-callback): Remove traces.

* src/kqueue.c: Include &lt;sys/time.h&gt;.
(kqueue_generate_event, kqueue_compare_dir_list): New functions.
(kqueue_callback): Use them.  Call kevent() with a zero timeout.
(Fkqueue_add_watch): Adapt docstring.  Support directory events.
Compute initial directory listing.  Close file descriptor in case
of errors.
(syms_of_kqueue): Declare Qcreate.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/filenotify.el (file-notify-handle-event)
(file-notify-callback): Remove traces.

* src/kqueue.c: Include &lt;sys/time.h&gt;.
(kqueue_generate_event, kqueue_compare_dir_list): New functions.
(kqueue_callback): Use them.  Call kevent() with a zero timeout.
(Fkqueue_add_watch): Adapt docstring.  Support directory events.
Compute initial directory listing.  Close file descriptor in case
of errors.
(syms_of_kqueue): Declare Qcreate.
</pre>
</div>
</content>
</entry>
<entry>
<title>Build fixes for kqueue support.</title>
<updated>2015-11-25T14:07:11+00:00</updated>
<author>
<name>Wolfgang Jenkner</name>
</author>
<published>2015-11-11T15:07:50+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c571fc149a786a5bef7f2b283b912999d76dd313'/>
<id>c571fc149a786a5bef7f2b283b912999d76dd313</id>
<content type='text'>
* src/kqueue.c (Fkqueue_add_watch): O_BINARY is not a POSIX open(3)
flag.

* configure.ac (HAVE_KQUEUE): There is no pkg-config module for native
kqueue on *BSD.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/kqueue.c (Fkqueue_add_watch): O_BINARY is not a POSIX open(3)
flag.

* configure.ac (HAVE_KQUEUE): There is no pkg-config module for native
kqueue on *BSD.
</pre>
</div>
</content>
</entry>
</feed>
