emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] elisp manual patch: add to file notification documentation


From: Yoni Rabkin
Subject: Re: [PATCH] elisp manual patch: add to file notification documentation
Date: Tue, 13 Dec 2022 12:34:25 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

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

> Stefan Kangas <stefankangas@gmail.com> writes:
>
> Hi,
>
>>> The following elisp manual documentation patch explains to the user how
>>> to check if their emacs was compiled with file notification support.
>>
>> If this is supposed to be user-facing, shouldn't it be renamed to
>> `file-notify-library'?
>>
>>> +The variable @var{file-notify--library} is non-nil when Emacs has been
>>> +compiled with file notification support, and value is the name of the
>>> +low-level file notification package to be used for local file systems.
>
> It isn't a variable but a constant. And no, it isn't designed to be
> public.
>
> Is this needed to be exposed? file-notify-add-watch returns an error, if
> Emacs hasn't been compiled with file notification.

Kind of.

The documentation for `file-notify-add-watch' says: "If the file cannot
be watched for some reason, this function signals a `file-notify-error'
error."

I think that there is value in documenting a way for us to check if the
emacs we are running supports file notification, short of actually
trying to run `file-notify-add-watch', getting a generic
`file-notify-error', and reading the associated message to find out if
it is a simple problem, like a missing directory, or a difficult
problem, like a missing library.

-- 
   "Cut your own wood and it will warm you twice"



reply via email to

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