all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 19909@debbugs.gnu.org, rpluim@gmail.com
Subject: bug#19909: [PATCH] Error out if	with-file-notification=w32	is specified on cygwin
Date: Sat, 28 Feb 2015 11:32:29 -0500	[thread overview]
Message-ID: <54F1ED9D.9040303@cornell.edu> (raw)
In-Reply-To: <83sidq4gb2.fsf@gnu.org>

On 2/28/2015 2:59 AM, Eli Zaretskii wrote:
>> Date: Fri, 27 Feb 2015 17:25:54 -0500
>> From: Ken Brown <kbrown@cornell.edu>
>> CC: bug-gnu-emacs@gnu.org, rpluim@gmail.com
>>
>> It looks like it might not take much effort.  What I did for now, just
>> for testing purposes, is to copy into w32notify.c whatever was necessary
>> to make the Cygwin-w32 build compile with w32 file notification.  I
>> tested it briefly and it seems to work.  Obviously it needs much more
>> testing to make sure this doesn't break anything else, and then we can
>> worry about how to do this right.
>
> Thanks.  A few comments:
>
>    . Cygwin doesn't need to call MultiByteToWideChar and
>      WideCharToMultiByte via function pointers, it can call them
>      directly.
>
>    . I think there shouldn't be a need to call filename_to_utf16 and
>      its ilk, but instead use the to_unicode etc., like the rest of
>      Cygwin-w32 code does.  E.g., just use GUI_ENCODE_FILE defined on
>      w32term.h.

It turns out that filename_to_utf16 wasn't even being called in the 
Cygwin-w32 build, because w32_unicode_filenames == 0.

It also turns out that when I "tested" the build, which I did via M-x 
auto-revert-tail-mode, I wasn't actually testing w32notify, because I 
forgot to do this:

diff --git a/src/emacs.c b/src/emacs.c
index ca5633d..342d0fe 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1334,11 +1334,12 @@ Using an Emacs configured with 
--with-x-toolkit=lucid does not have this problem
    globals_of_gfilenotify ();
  #endif

-#ifdef WINDOWSNT
-  globals_of_w32 ();
  #ifdef HAVE_W32NOTIFY
    globals_of_w32notify ();
  #endif
+
+#ifdef WINDOWSNT
+  globals_of_w32 ();
    /* Initialize environment from registry settings.  */
    init_environment (argv);
    init_ntproc (dumping); /* must precede init_editfns.  */
@@ -1512,11 +1513,12 @@ Using an Emacs configured with 
--with-x-toolkit=lucid does not have this problem
        syms_of_dbusbind ();
  #endif /* HAVE_DBUS */

-#ifdef WINDOWSNT
-      syms_of_ntterm ();
  #ifdef HAVE_W32NOTIFY
        syms_of_w32notify ();
-#endif /* HAVE_W32NOTIFY */
+#endif
+
+#ifdef WINDOWSNT
+      syms_of_ntterm ();
  #endif /* WINDOWSNT */

        syms_of_profiler ();


When I add that patch, auto-revert-tail-mode no longer works; there's no 
error message, but the buffer doesn't get auto-reverted when something 
is appended.

I think I have again lost motivation to pursue this further, since gfile 
works fine.  And glib is required for the default Cygwin-w32 build 
anyway, because ImageMagick brings it in, so why not just use it?

Ken





  reply	other threads:[~2015-02-28 16:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-20  9:47 bug#19909: [PATCH] Error out if with-file-notification=w32 is specified on cygwin Robert Pluim
2015-02-20 10:06 ` Eli Zaretskii
2015-02-20 10:19   ` Robert Pluim
2015-02-20 10:46     ` Eli Zaretskii
2015-02-20 14:16       ` Robert Pluim
2015-02-20 15:10         ` Eli Zaretskii
2015-02-20 15:46           ` Robert Pluim
2015-02-20 16:17             ` Eli Zaretskii
2015-02-20 16:44               ` Robert Pluim
2015-02-20 17:16                 ` Eli Zaretskii
2015-02-20 16:15           ` Ken Brown
2015-02-20 17:06             ` Robert Pluim
2015-02-20 17:18             ` Eli Zaretskii
2015-02-27 22:25               ` Ken Brown
2015-02-28  7:59                 ` Eli Zaretskii
2015-02-28 16:32                   ` Ken Brown [this message]
2015-02-28 16:41                     ` Eli Zaretskii
2015-02-28 16:53                       ` Robert Pluim
2015-02-28 16:56                       ` Robert Pluim
2015-02-28 17:57                         ` Eli Zaretskii
2015-02-28 18:44                           ` Ken Brown
2015-02-28 19:14                             ` Eli Zaretskii
2015-02-28 20:14                               ` Ken Brown
2015-03-02  9:35                                 ` Robert Pluim
2015-03-02 14:05                                   ` Ken Brown
2015-03-02 14:06 ` bug#19909: closed (Re: bug#19909: [PATCH] Error out if with-file-notification=w32 is specified on cygwin) GNU bug Tracking System

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F1ED9D.9040303@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=19909@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=rpluim@gmail.com \
    /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 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.