From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yoni Rabkin Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] elisp manual patch: add to file notification documentation Date: Tue, 13 Dec 2022 12:34:25 -0500 Message-ID: <871qp3i4wu.fsf@rabkins.net> References: <87bko8knq2.fsf@rabkins.net> <87k02vu32l.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11719"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: Stefan Kangas , emacs-devel To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 13 18:35:15 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p59BS-0002pd-Dd for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Dec 2022 18:35:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p59B2-00046f-SP; Tue, 13 Dec 2022 12:34:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p59An-00045L-1z for emacs-devel@gnu.org; Tue, 13 Dec 2022 12:34:33 -0500 Original-Received: from smtprelay0011.hostedemail.com ([216.40.44.11] helo=relay.hostedemail.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p59Al-0008MC-Bp for emacs-devel@gnu.org; Tue, 13 Dec 2022 12:34:32 -0500 Original-Received: from omf15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2FAA140B42; Tue, 13 Dec 2022 17:34:28 +0000 (UTC) Original-Received: from [HIDDEN] (Authenticated sender: yoni@rabkins.net) by omf15.hostedemail.com (Postfix) with ESMTPA id 8FF7617; Tue, 13 Dec 2022 17:34:26 +0000 (UTC) X-Ethics: Use GNU In-Reply-To: <87k02vu32l.fsf@gmx.de> (Michael Albinus's message of "Tue, 13 Dec 2022 09:21:06 +0100") X-Rspamd-Server: rspamout06 X-Rspamd-Queue-Id: 8FF7617 X-Stat-Signature: xxqz53z1spjrb4mxu3mq7bu5w71zxbkd X-Session-Marker: 796F6E69407261626B696E732E6E6574 X-Session-ID: U2FsdGVkX19ZZ9SFS86tlJ0SdPD1nvlFIoqnMtceW5w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rabkins.net; h=from:to:cc:subject:references:date:in-reply-to:message-id:mime-version:content-type; s=dkim1; bh=xYUB7itz1fAv9oaHCMpRNs9pgEoVR1Ex5j18Ucy+I0U=; b=ReEg6yEUDk5nbCbszTe9UPHaGluFHDV7GH3qMmPP0GmDmrAgxoAeKzhUSsIqQUg+kloejjdaFU0msurKW+QrfXz/n7mVM74h6gTXmGV4BRTwD59IWf7uLprXgCtcMTaVguBmAHxy3kYi48ZAnE1JJW/rOBUUNu/Q7Dlmq070bBI= X-HE-Tag: 1670952866-40025 X-HE-Meta: U2FsdGVkX19ABrKRl54zNZPbZaeApZ/mnOP9MGDMEebv2K8uuWsqaCosilxsKQSfVI+G7HYCgTjet+uYcjVdng== Received-SPF: pass client-ip=216.40.44.11; envelope-from=yoni@rabkins.net; helo=relay.hostedemail.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301332 Archived-At: Michael Albinus writes: > Stefan Kangas 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"