From: Paul Eggert <eggert@cs.ucla.edu>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 21241@debbugs.gnu.org, Tassilo Horn <tsdh@gnu.org>
Subject: bug#21241: 25.0.50; gfilenotify doesn't indicate when limits are reached
Date: Fri, 14 Aug 2015 18:27:39 -0700 [thread overview]
Message-ID: <55CE958B.1000006@cs.ucla.edu> (raw)
In-Reply-To: <878u9gly4p.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 485 bytes --]
Michael Albinus writes:
> I would also agree to favor inotify when available.
Let's give that a try, then. I installed the attached patch as master commit
200c2b10faf298bf65e8b6dbd0cb9ef00b2f95d6.
> On OS X (better: on systems which have defined HAVE_NS), we should
> disable gfilenotify, because the Glib main loop won't be used (ns_select
> is used rather than xg_select).
configure.ac was trying to do that, but there was a typo. Should also be fixed
in the attached patch.
[-- Attachment #2: 0001-Default-to-inotify-instead-of-gfile.patch --]
[-- Type: text/x-diff, Size: 3697 bytes --]
From 3f9999c2c0b0eb96c7e7e83fd5dd97da4ca301d1 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 14 Aug 2015 18:20:35 -0700
Subject: [PATCH] Default to inotify instead of gfile
* configure.ac (with_file_notification): Fix typo that
prevented suppression of file notification if HAVE_NS.
(NOTIFY_OBJ): Prefer inotify to gfile if both exist and
with_file_notification is 'yes' (Bug#21241).
* etc/NEWS: Mention this.
---
configure.ac | 34 ++++++++++++++++------------------
etc/NEWS | 4 ++++
2 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index 16d4484..9f8089f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -365,7 +365,7 @@ AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
* ) AC_MSG_ERROR(['--with-file-notification=$withval' is invalid;
this option's value should be 'yes', 'no', 'gfile', 'inotify' or 'w32'.
'yes' is a synonym for 'w32' on MS-Windows, for 'no' on Nextstep,
-otherwise for the first of 'gfile' or 'inotify' that is usable.])
+otherwise for the first of 'inotify' or 'gfile' that is usable.])
;;
esac
with_file_notification=$val
@@ -2674,7 +2674,7 @@ NOTIFY_SUMMARY=no
dnl FIXME? Don't auto-detect on NS, but do allow someone to specify
dnl a particular library. This doesn't make much sense?
-if test "${HAVE_ns}" = yes && test ${with_file_notification} = yes; then
+if test "${HAVE_NS}" = yes && test ${with_file_notification} = yes; then
with_file_notification=no
fi
@@ -2694,22 +2694,7 @@ case $with_file_notification,$opsys in
fi ;;
esac
-dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED
-dnl has been added in glib 2.24. It has been tested under
-dnl GNU/Linux only. We take precedence over inotify, but this makes
-dnl only sense when glib has been compiled with inotify support. How
-dnl to check?
-case $with_file_notification,$NOTIFY_OBJ in
- gfile, | yes,)
- EMACS_CHECK_MODULES([GFILENOTIFY], [gio-2.0 >= 2.24])
- if test "$HAVE_GFILENOTIFY" = "yes"; then
- AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.])
- NOTIFY_OBJ=gfilenotify.o
- NOTIFY_SUMMARY="yes -lgio (gfile)"
- fi ;;
-esac
-
-dnl inotify is only available on GNU/Linux.
+dnl inotify is available only on GNU/Linux.
case $with_file_notification,$NOTIFY_OBJ in
inotify, | yes,)
AC_CHECK_HEADER(sys/inotify.h)
@@ -2723,6 +2708,19 @@ case $with_file_notification,$NOTIFY_OBJ in
fi ;;
esac
+dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED
+dnl has been added in glib 2.24. It has been tested under
+dnl GNU/Linux only.
+case $with_file_notification,$NOTIFY_OBJ in
+ gfile,* | yes,)
+ EMACS_CHECK_MODULES([GFILENOTIFY], [gio-2.0 >= 2.24])
+ if test "$HAVE_GFILENOTIFY" = "yes"; then
+ AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.])
+ NOTIFY_OBJ=gfilenotify.o
+ NOTIFY_SUMMARY="yes -lgio (gfile)"
+ fi ;;
+esac
+
case $with_file_notification,$NOTIFY_OBJ in
yes,* | no,* | *,?*) ;;
*) AC_MSG_ERROR([File notification '$with_file_notification' requested but requirements not found.]) ;;
diff --git a/etc/NEWS b/etc/NEWS
index f131981..bbcdc0c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -43,6 +43,10 @@ or by sticking with Emacs 24.4.
If gnustep-config is not available, the old heuristics are used.
---
+** 'configure' now prefers inotify to gfile for file notification,
+unless gfile is explicitly requested via --with-file-notification='gfile'.
+
+---
** The configure option '--with-pkg-config-prog' has been removed.
Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to.
--
2.1.0
next prev parent reply other threads:[~2015-08-15 1:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 8:16 bug#21241: 25.0.50; gfilenotify doesn't indicate when limits are reached Tassilo Horn
[not found] ` <handler.21241.B.14393674365819.ack@debbugs.gnu.org>
2015-08-12 8:34 ` Tassilo Horn
2015-08-12 12:47 ` Eli Zaretskii
2015-08-12 13:27 ` Tassilo Horn
2015-08-12 14:16 ` Eli Zaretskii
2015-08-12 19:18 ` Michael Albinus
2015-08-15 1:27 ` Paul Eggert [this message]
2015-08-18 14:33 ` Tassilo Horn
2015-08-18 17:09 ` Paul Eggert
2015-08-21 9:46 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55CE958B.1000006@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=21241@debbugs.gnu.org \
--cc=michael.albinus@gmx.de \
--cc=tsdh@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).