GNU bug report logs - #18861
25.0.50; gfile-based file notifications are not immediate

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Tue, 28 Oct 2014 00:30:03 UTC

Severity: normal

Found in version 25.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 18861 <at> debbugs.gnu.org
Subject: bug#18861: Acknowledgement (25.0.50; gfile-based file notifications are not immediate)
Date: Thu, 30 Oct 2014 12:12:40 -0400
> Hi.  A glib maintainer responded to the bug report, and it turns out
> emacs was using glib slightly incorrectly.  I'm attaching a patch to fix
> the issue, as suggested by the maintainer.

Thanks.  This is not my area of expertise at all, but since it seems
that noone else has replied yet, I'll try to move it along.

> +  if( g_main_context_acquire(context) != TRUE )
> +    {
> +      // we couldn't acquire the context. I let this function proceed because it
> +      // handles more than just glib file descriptors
> +      retval = -1;
> +    }
> +  else
> +    context_acquired = true;

[ Please follow our coding conventions: put a space before open parens
  (and not after, nor before close parens); use /*...*/ for comments;
  capitalize and punctuate comments; use two spaces between sentences.
  Also, I think "!g_main_context_acquire (context)" would be cleaner than
  "g_main_context_acquire (context) != TRUE".  I find comparing to NULL,
  true, or false generally ugly, tho maybe that's just a personal taste
  of mine that others don't share.  ]

Why set retval to -1?  It seems safer to leave it unchanged (ie. set to 0).


        Stefan




This bug report was last modified 10 years and 280 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.