emacs-devel
[Top][All Lists]
Advanced

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

Re: feature/android b91e8ada70e 3/5: Fix auto-revert-mode on Android


From: Po Lu
Subject: Re: feature/android b91e8ada70e 3/5: Fix auto-revert-mode on Android
Date: Sat, 25 Feb 2023 19:13:41 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Michael Albinus <michael.albinus@gmx.de> writes:

> Po Lu <luangruo@yahoo.com> writes:
>
> Hi,
>
>>> I have two problems with this patch. First, nil is not defined as return
>>> value of *-add-watch functions. If we want to allow this, we must extend
>>> the interface.
>>>
>>> Second, do we really want to have such a hard coded list in inotify.c?
>>> What about other directories on other systems, like "/proc"? Shouldn't
>>> we add rather a common interface for excluding directories from being
>>> watched, say file-notify-excluded-directories (a list of strings)? This
>>> could be modified on Lisp level, no need to do it in the notification
>>> backends.
>>
>> Shouldn't watching /proc work, in that no error is signalled, unlike
>> watching /content and /assets, which are wholly inventions of android.c
>> which do not exist in the VFS?
>
> I haven't checked /proc, it was just the first example which came to
> mind for a directory we might want to exclude. Other examples might be
> mounted directories, which could also fail for watching files.
>
>> Anyway, what return value do you think would be appropriate here?
>
> nil might be a correct return value. We haven't simply specified it, and
> implementing a file-notify-excluded-directories would give the backends
> a simple way to achive the goal, w/o modifying C source.

Hmmm... I'd rather go with modifying C, since the whole point of using
/content and /assets is to be as transparent as possible towards Lisp.
IOW, Lisp shouldn't care.  It should get the same results for /assets
that any other directory gets, except that no file notifications can be
generated, as /assets cannot change.

Thanks.


reply via email to

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