bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21435: 25.0.50; file-notify has problems after renames


From: Michael Albinus
Subject: bug#21435: 25.0.50; file-notify has problems after renames
Date: Fri, 11 Sep 2015 11:53:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Tassilo Horn <tsdh@gnu.org> writes:

>>> I've added a new macro to the tests now which lets you do things this
>>> way:
>>>
>>>         ;; Check creation, change, and deletion.
>>>         (file-notify--test-with-events
>>>             3 3 (lambda (events)
>>>                   (should (equal '(created changed deleted)
>>>                                  (mapcar #'cadr events))))
>>>           (write-region
>>>            "any text" nil file-notify--test-tmpfile nil 'no-message)
>>>           (delete-file file-notify--test-tmpfile))
>>>
>>> This means we're waiting for 3 events for at most 3 seconds, and then
>>> apply the lambda to the received events.  The rest is the code which
>>> causes the events to be emitted.
>>
>> That's good, yes. Please add a docstring to that macro (boring, I
>> know, but it will help other people like Eli and me).
>
> Done.

Thanks. Another point is whether we always can expect that all native
libraries will report exactly the same number of events, and then
whether they report them exactly in the same order (you expect '(created
changed deleted) here). Let's see how the test cases evolve, maybe we
need more tolerant tests.

>> One point: you don't call any longer `read-event'.  I believe it still
>> makes sense; IIRC I did it because sometimes you must trigger Emacs to
>> check all its file descriptors for new events.
>
> I still do.  That macro uses `file-notify--wait-for-events' to wait
> until all N events have arrived before calling the ASSERT-FN.

Yep, I've overseen this. OK.

> Hm, then I wonder what causes these extreme delays here.  The remote
> autorevert test really takes at least 20 seconds here.  But I have no
> issues using TRAMP with its ssh method for accessing really remote
> files...

Now I see it also, but only when running in interactive mode. In batch
mode, there is no serious delay. Will contact the Tramp maintainer, again.

> Bye,
> Tassilo

Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]