all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#20441: 24.5; Auto revert mode does not work
@ 2015-04-27 18:18 Kaushal
  2015-04-27 20:48 ` Kaushal
  0 siblings, 1 reply; 11+ messages in thread
From: Kaushal @ 2015-04-27 18:18 UTC (permalink / raw)
  To: 20441

[-- Attachment #1: Type: text/plain, Size: 2849 bytes --]

I have setup emacs so that I can run multiple versions simultaneously.

- I opened the same file (somefile.txt) simultaneously in an emacs 24.5
instance and an emacs 24.4 instance (both with -Q option)
- Did M-x global-auto-revert-mode in both.
- From terminal when I echoed some string (echo 1234 >> somefile.txt) to
that file

But only the emacs 24.4 buffer auto-reverted.

I verified that the same bug is present in the emacs master branch too
(emacs 25.0.50.2 last built on 04/24).

In GNU Emacs 24.5.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4)
 of 2015-04-24 on ...
Repository revision: 866501efe0fdc0c29448e0aaf8696eb0a3c8fcd6
Windowing system distributor `The X.Org Foundation', version 11.0.60900000
System Description: Red Hat Enterprise Linux Client release 5.10 (Tikanga)

Configured using:
 `configure --prefix=/home/kmodi/usr_local/apps/emacs/emacs-24.5
 CPPFLAGS=-fgnu89-inline'

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 71377 5779)
 (symbols 48 17554 0)
 (miscs 40 35 113)
 (strings 32 9238 5022)
 (string-bytes 1 268401)
 (vectors 16 8917)
 (vector-slots 8 383608 17837)
 (floats 8 63 81)
 (intervals 56 177 3)
 (buffers 960 11)
 (heap 1024 257035 626))

[-- Attachment #2: Type: text/html, Size: 3806 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#20441: 24.5; Auto revert mode does not work
  2015-04-27 18:18 bug#20441: 24.5; Auto revert mode does not work Kaushal
@ 2015-04-27 20:48 ` Kaushal
  2015-04-27 21:01   ` Kaushal
  0 siblings, 1 reply; 11+ messages in thread
From: Kaushal @ 2015-04-27 20:48 UTC (permalink / raw)
  To: 20441

[-- Attachment #1: Type: text/plain, Size: 317 bytes --]

After doing `M-x global-auto-revert-mode` in an emacs -Q session, if I eval
`(setq auto-revert-use-notify nil)`, auto revert starts working as before
(in emacs 24.4).

(Thanks to this comment on emacs.SE:
http://emacs.stackexchange.com/questions/10966/global-auto-revert-mode-doesnt-seem-to-work#comment17031_10966
)

[-- Attachment #2: Type: text/html, Size: 486 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#20441: 24.5; Auto revert mode does not work
  2015-04-27 20:48 ` Kaushal
@ 2015-04-27 21:01   ` Kaushal
  2015-04-29 19:26     ` Michael Albinus
  0 siblings, 1 reply; 11+ messages in thread
From: Kaushal @ 2015-04-27 21:01 UTC (permalink / raw)
  To: 20441

[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]

Some more info,

When I do `C-h v auto-revert-use-notify` in that file buffer in emacs 24.4,
I get

auto-revert-use-notify is a variable defined in `autorevert.el'.
Its value is nil
Original value was t
Local in buffer abcd.txt; global value is t

But in emacs 24.5, the same `C-h v` shows

auto-revert-use-notify is a variable defined in `autorevert.el'.
Its value is t

It's unclear to me what's changing the local value of
`auto-revert-use-notify` to `nil` in an emacs -Q session on emacs 24.4. And
as the effective value of that var in that buffer is nil, auto reverting
works in emacs 24.4 right away without having to manually change the value
of that var to nil.


On Mon, Apr 27, 2015 at 4:48 PM Kaushal <kaushal.modi@gmail.com> wrote:

> After doing `M-x global-auto-revert-mode` in an emacs -Q session, if I
> eval `(setq auto-revert-use-notify nil)`, auto revert starts working as
> before (in emacs 24.4).
>
> (Thanks to this comment on emacs.SE:
> http://emacs.stackexchange.com/questions/10966/global-auto-revert-mode-doesnt-seem-to-work#comment17031_10966
> )
>

[-- Attachment #2: Type: text/html, Size: 1662 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#20441: 24.5; Auto revert mode does not work
  2015-04-27 21:01   ` Kaushal
@ 2015-04-29 19:26     ` Michael Albinus
  2015-04-29 19:47       ` Kaushal
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2015-04-29 19:26 UTC (permalink / raw)
  To: Kaushal; +Cc: 20441

Hi,

first of all, it might be interesting to know whether file notifications
do work at all on your system. What is the value of `file-notify--library'?
I suppose it is 'gfilenotify.

Could you, please, perform the following forms then:

(require 'filenotify)
(defun my-notify-callback (event)
  (message "Event %S" event))
(file-notify-add-watch
  "/tmp" '(change attribute-change) 'my-notify-callback)
(write-region "foo" nil "/tmp/foo")
(write-region "bla" nil "/tmp/foo")
(set-file-modes "/tmp/foo" (default-file-modes))

Tell, whether you see related messages in the *Messages* buffer.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#20441: 24.5; Auto revert mode does not work
  2015-04-29 19:26     ` Michael Albinus
@ 2015-04-29 19:47       ` Kaushal
  2015-04-29 20:54         ` Kaushal
  0 siblings, 1 reply; 11+ messages in thread
From: Kaushal @ 2015-04-29 19:47 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 20441

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

Thanks for the pointer Michael.

I am puzzled. Of course filenotify does not work for me (it used to work; I
wrote this elisp snippet that used this feature:
http://emacs.stackexchange.com/a/2566/115).

The value of `file-notify--library` is `'gfilenotify` but the feature
doesn't work for me. Any pointers?

The test code evalling did not trigger the `my-notify-callback` function
and so no "Event .." messages in my *Messages* buffer.

On Wed, Apr 29, 2015 at 3:26 PM Michael Albinus <michael.albinus@gmx.de>
wrote:

> Hi,
>
> first of all, it might be interesting to know whether file notifications
> do work at all on your system. What is the value of `file-notify--library'?
> I suppose it is 'gfilenotify.
>
> Could you, please, perform the following forms then:
>
> (require 'filenotify)
> (defun my-notify-callback (event)
>   (message "Event %S" event))
> (file-notify-add-watch
>   "/tmp" '(change attribute-change) 'my-notify-callback)
> (write-region "foo" nil "/tmp/foo")
> (write-region "bla" nil "/tmp/foo")
> (set-file-modes "/tmp/foo" (default-file-modes))
>
> Tell, whether you see related messages in the *Messages* buffer.
>
> Best regards, Michael.
>

[-- Attachment #2: Type: text/html, Size: 1676 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#20441: 24.5; Auto revert mode does not work
  2015-04-29 19:47       ` Kaushal
@ 2015-04-29 20:54         ` Kaushal
  2015-04-29 21:43           ` Michael Albinus
  0 siblings, 1 reply; 11+ messages in thread
From: Kaushal @ 2015-04-29 20:54 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 20441

[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]

When I eval

(file-notify-add-watch
 "/tmp/foo" '(change attribute-change) 'my-notify-callback)

I see something like

38390812 (#o222346034, #x249cc1c)

in the *Messages* buffer and even the `file-notify-descriptors` hash is
updated.

But the callback fn is never executed.

On Wed, Apr 29, 2015 at 3:47 PM Kaushal <kaushal.modi@gmail.com> wrote:

> Thanks for the pointer Michael.
>
> I am puzzled. Of course filenotify does not work for me (it used to work;
> I wrote this elisp snippet that used this feature:
> http://emacs.stackexchange.com/a/2566/115).
>
> The value of `file-notify--library` is `'gfilenotify` but the feature
> doesn't work for me. Any pointers?
>
> The test code evalling did not trigger the `my-notify-callback` function
> and so no "Event .." messages in my *Messages* buffer.
>
> On Wed, Apr 29, 2015 at 3:26 PM Michael Albinus <michael.albinus@gmx.de>
> wrote:
>
>> Hi,
>>
>> first of all, it might be interesting to know whether file notifications
>> do work at all on your system. What is the value of
>> `file-notify--library'?
>> I suppose it is 'gfilenotify.
>>
>> Could you, please, perform the following forms then:
>>
>> (require 'filenotify)
>> (defun my-notify-callback (event)
>>   (message "Event %S" event))
>> (file-notify-add-watch
>>   "/tmp" '(change attribute-change) 'my-notify-callback)
>> (write-region "foo" nil "/tmp/foo")
>> (write-region "bla" nil "/tmp/foo")
>> (set-file-modes "/tmp/foo" (default-file-modes))
>>
>> Tell, whether you see related messages in the *Messages* buffer.
>>
>> Best regards, Michael.
>>
>

[-- Attachment #2: Type: text/html, Size: 2431 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#20441: 24.5; Auto revert mode does not work
  2015-04-29 20:54         ` Kaushal
@ 2015-04-29 21:43           ` Michael Albinus
  2015-04-30  0:08             ` Kaushal
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2015-04-29 21:43 UTC (permalink / raw)
  To: Kaushal; +Cc: 20441

Kaushal <kaushal.modi@gmail.com> writes:

> When I eval 
>
> (file-notify-add-watch
> "/tmp/foo" '(change attribute-change) 'my-notify-callback)
>
> I see something like
>
> 38390812 (#o222346034, #x249cc1c)
>
> in the *Messages* buffer and even the `file-notify-descriptors` hash
> is updated.
>
> But the callback fn is never executed.

Which Linux distribution are you using? Which glib version?

What are the configure options of your Emacs build? Pls show src/config.h.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#20441: 24.5; Auto revert mode does not work
  2015-04-29 21:43           ` Michael Albinus
@ 2015-04-30  0:08             ` Kaushal
  2015-04-30  0:39               ` Kaushal
  0 siblings, 1 reply; 11+ messages in thread
From: Kaushal @ 2015-04-30  0:08 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 20441

[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]

Thanks. glib looks like the culprit.

When filenotify used to work, I had glib 2.40.00 installed on RHEL 5.10.

Then I upgraded to glib 2.44.00 last week (also rebuilt emacs after that)
in efforts to fix a frame issue I am still facing (
http://emacs.stackexchange.com/q/10745/115 ). The upgrade didn't fix that
issue and it seemed that it didn't break anything so I stayed at that
version.

But looks that that broke the gfilenotify functionality.

Now, I did make uninstall on glib 2.44.00 and reinstalled glib 2.40.00 and
rebuilt latest emacs from master. But that did not fix the gfilenotify
issue. I don't know what else I can look into.

Here is the requested src/config.h after reverting back to glib 2.40.00 and
rebuilding emacs from master:
https://dl.dropboxusercontent.com/u/10985/config.h

Thanks for the help!

On Wed, Apr 29, 2015 at 5:43 PM Michael Albinus <michael.albinus@gmx.de>
wrote:

> Kaushal <kaushal.modi@gmail.com> writes:
>
> > When I eval
> >
> > (file-notify-add-watch
> > "/tmp/foo" '(change attribute-change) 'my-notify-callback)
> >
> > I see something like
> >
> > 38390812 (#o222346034, #x249cc1c)
> >
> > in the *Messages* buffer and even the `file-notify-descriptors` hash
> > is updated.
> >
> > But the callback fn is never executed.
>
> Which Linux distribution are you using? Which glib version?
>
> What are the configure options of your Emacs build? Pls show src/config.h.
>
> Best regards, Michael.
>

[-- Attachment #2: Type: text/html, Size: 2114 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#20441: 24.5; Auto revert mode does not work
  2015-04-30  0:08             ` Kaushal
@ 2015-04-30  0:39               ` Kaushal
  2015-05-01 14:11                 ` Kaushal
  0 siblings, 1 reply; 11+ messages in thread
From: Kaushal @ 2015-04-30  0:39 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 20441

[-- Attachment #1: Type: text/plain, Size: 2078 bytes --]

I just rebuilt emacs-24.4 tag from git while glib 2.40.00 is installed. But
the same results; gfilenotify doesn't work this time. The last time it
worked, it was the same RHEL 5.10, glib 2.40.00 and emacs 24.4. Here is the
config.h (renamed) created for the 24.4 build:
https://dl.dropboxusercontent.com/u/10985/config-emacs-24.4.h

Is there anything else that gfilenotify depends on? Can I test something
from the terminal to verify glib installation that would make gfilenotify
work?

Thanks!

On Wed, Apr 29, 2015 at 8:08 PM Kaushal <kaushal.modi@gmail.com> wrote:

> Thanks. glib looks like the culprit.
>
> When filenotify used to work, I had glib 2.40.00 installed on RHEL 5.10.
>
> Then I upgraded to glib 2.44.00 last week (also rebuilt emacs after that)
> in efforts to fix a frame issue I am still facing (
> http://emacs.stackexchange.com/q/10745/115 ). The upgrade didn't fix that
> issue and it seemed that it didn't break anything so I stayed at that
> version.
>
> But looks that that broke the gfilenotify functionality.
>
> Now, I did make uninstall on glib 2.44.00 and reinstalled glib 2.40.00 and
> rebuilt latest emacs from master. But that did not fix the gfilenotify
> issue. I don't know what else I can look into.
>
> Here is the requested src/config.h after reverting back to glib 2.40.00
> and rebuilding emacs from master:
> https://dl.dropboxusercontent.com/u/10985/config.h
>
> Thanks for the help!
>
> On Wed, Apr 29, 2015 at 5:43 PM Michael Albinus <michael.albinus@gmx.de>
> wrote:
>
>> Kaushal <kaushal.modi@gmail.com> writes:
>>
>> > When I eval
>> >
>> > (file-notify-add-watch
>> > "/tmp/foo" '(change attribute-change) 'my-notify-callback)
>> >
>> > I see something like
>> >
>> > 38390812 (#o222346034, #x249cc1c)
>> >
>> > in the *Messages* buffer and even the `file-notify-descriptors` hash
>> > is updated.
>> >
>> > But the callback fn is never executed.
>>
>> Which Linux distribution are you using? Which glib version?
>>
>> What are the configure options of your Emacs build? Pls show src/config.h.
>>
>> Best regards, Michael.
>>
>

[-- Attachment #2: Type: text/html, Size: 3085 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#20441: 24.5; Auto revert mode does not work
  2015-04-30  0:39               ` Kaushal
@ 2015-05-01 14:11                 ` Kaushal
  2015-05-01 16:33                   ` Michael Albinus
  0 siblings, 1 reply; 11+ messages in thread
From: Kaushal @ 2015-05-01 14:11 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 20441

[-- Attachment #1: Type: text/plain, Size: 2526 bytes --]

It got fixed but I can't explain why this fixed it.

I usually work on a headless machine, and am always working on a VNC server.
I randomly just killed the existing server and started a new one on the
same machine (nothing rebuilt since that last email) and now gfilenotify
started working again!

On Wed, Apr 29, 2015 at 8:39 PM Kaushal <kaushal.modi@gmail.com> wrote:

> I just rebuilt emacs-24.4 tag from git while glib 2.40.00 is installed.
> But the same results; gfilenotify doesn't work this time. The last time it
> worked, it was the same RHEL 5.10, glib 2.40.00 and emacs 24.4. Here is the
> config.h (renamed) created for the 24.4 build:
> https://dl.dropboxusercontent.com/u/10985/config-emacs-24.4.h
>
> Is there anything else that gfilenotify depends on? Can I test something
> from the terminal to verify glib installation that would make gfilenotify
> work?
>
> Thanks!
>
> On Wed, Apr 29, 2015 at 8:08 PM Kaushal <kaushal.modi@gmail.com> wrote:
>
>> Thanks. glib looks like the culprit.
>>
>> When filenotify used to work, I had glib 2.40.00 installed on RHEL 5.10.
>>
>> Then I upgraded to glib 2.44.00 last week (also rebuilt emacs after that)
>> in efforts to fix a frame issue I am still facing (
>> http://emacs.stackexchange.com/q/10745/115 ). The upgrade didn't fix
>> that issue and it seemed that it didn't break anything so I stayed at that
>> version.
>>
>> But looks that that broke the gfilenotify functionality.
>>
>> Now, I did make uninstall on glib 2.44.00 and reinstalled glib 2.40.00
>> and rebuilt latest emacs from master. But that did not fix the gfilenotify
>> issue. I don't know what else I can look into.
>>
>> Here is the requested src/config.h after reverting back to glib 2.40.00
>> and rebuilding emacs from master:
>> https://dl.dropboxusercontent.com/u/10985/config.h
>>
>> Thanks for the help!
>>
>> On Wed, Apr 29, 2015 at 5:43 PM Michael Albinus <michael.albinus@gmx.de>
>> wrote:
>>
>>> Kaushal <kaushal.modi@gmail.com> writes:
>>>
>>> > When I eval
>>> >
>>> > (file-notify-add-watch
>>> > "/tmp/foo" '(change attribute-change) 'my-notify-callback)
>>> >
>>> > I see something like
>>> >
>>> > 38390812 (#o222346034, #x249cc1c)
>>> >
>>> > in the *Messages* buffer and even the `file-notify-descriptors` hash
>>> > is updated.
>>> >
>>> > But the callback fn is never executed.
>>>
>>> Which Linux distribution are you using? Which glib version?
>>>
>>> What are the configure options of your Emacs build? Pls show
>>> src/config.h.
>>>
>>> Best regards, Michael.
>>>
>>

[-- Attachment #2: Type: text/html, Size: 3741 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#20441: 24.5; Auto revert mode does not work
  2015-05-01 14:11                 ` Kaushal
@ 2015-05-01 16:33                   ` Michael Albinus
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Albinus @ 2015-05-01 16:33 UTC (permalink / raw)
  To: Kaushal; +Cc: 20441

Kaushal <kaushal.modi@gmail.com> writes:

> I usually work on a headless machine, and am always working on a VNC
> server.
> I randomly just killed the existing server and started a new one on
> the same machine (nothing rebuilt since that last email) and now
> gfilenotify started working again!

Thanks for the update. Like you, I cannot explain what happened. But
this seems to be a problem of glib, indeed.

I have checked meanwhile the config.h files you have sent, they look
normal.

I'm closing this bug report. Feel free to reopen, if the problem happens
again.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-01 16:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-27 18:18 bug#20441: 24.5; Auto revert mode does not work Kaushal
2015-04-27 20:48 ` Kaushal
2015-04-27 21:01   ` Kaushal
2015-04-29 19:26     ` Michael Albinus
2015-04-29 19:47       ` Kaushal
2015-04-29 20:54         ` Kaushal
2015-04-29 21:43           ` Michael Albinus
2015-04-30  0:08             ` Kaushal
2015-04-30  0:39               ` Kaushal
2015-05-01 14:11                 ` Kaushal
2015-05-01 16:33                   ` Michael Albinus

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.