unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Yoni Rabkin <yoni@rabkins.net>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Stefan Kangas <stefankangas@gmail.com>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: [PATCH] elisp manual patch: add to file notification documentation
Date: Tue, 13 Dec 2022 12:34:25 -0500	[thread overview]
Message-ID: <871qp3i4wu.fsf@rabkins.net> (raw)
In-Reply-To: <87k02vu32l.fsf@gmx.de> (Michael Albinus's message of "Tue, 13 Dec 2022 09:21:06 +0100")

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	other threads:[~2022-12-13 17:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13  3:05 [PATCH] elisp manual patch: add to file notification documentation Yoni Rabkin
2022-12-13  3:25 ` Stefan Kangas
2022-12-13  8:21   ` Michael Albinus
2022-12-13 17:34     ` Yoni Rabkin [this message]
2022-12-13 17:46       ` Eli Zaretskii
2022-12-13 18:23         ` Yoni Rabkin
2022-12-13 20:07           ` Eli Zaretskii
2022-12-13 18:06       ` Stefan Monnier
2022-12-13 18:28       ` Michael Albinus
2022-12-13 18:52         ` Stefan Kangas
2022-12-13 19:05           ` Michael Albinus
2022-12-13 17:18   ` Yoni Rabkin
2022-12-13 18:20     ` Stefan Kangas
2022-12-13 18:31     ` [External] : " Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qp3i4wu.fsf@rabkins.net \
    --to=yoni@rabkins.net \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).