From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: feature/android b91e8ada70e 3/5: Fix auto-revert-mode on Android Date: Sat, 25 Feb 2023 19:13:41 +0800 Message-ID: <87h6va2e1m.fsf@yahoo.com> References: <167724502313.15669.16640007729364817665@vcs2.savannah.gnu.org> <20230224132344.40927C1391F@vcs2.savannah.gnu.org> <87k006vy4g.fsf@gmx.de> <87lekm2fjc.fsf@yahoo.com> <87fsauvx2v.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="38445"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 25 12:16:50 2023 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 1pVsXp-0009qn-EO for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Feb 2023 12:16:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVsX5-0007Iz-Cr; Sat, 25 Feb 2023 06:16:03 -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 1pVsX2-0007BB-W4 for emacs-devel@gnu.org; Sat, 25 Feb 2023 06:16:01 -0500 Original-Received: from sonic314-47.consmr.mail.ne1.yahoo.com ([66.163.189.173]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVsX1-0002N7-AJ for emacs-devel@gnu.org; Sat, 25 Feb 2023 06:16:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677323752; bh=M3uSG/jW88FQC9eFHUo4EwVdKRS9Y9+HoPb6bcmYGVE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=YqjjAq8Xp2VMxLJH96IHqWq8e1+39kiizirVEXAlEZNZveZv++kHpUL9aCGdT/HLRcbJpGsv7eWp9pWIfCXM7DsoVtDWrlImpXONV3hpc53vE5bAWaOP8F8H3LZz4FbOkye3gh2Nn1ieOmlzLRv8u4bwELVmGVH08/APDoxhaPWmjJD0c/IyZLGv7KMf2yTBddmdeJcSXo3G5vT7uBBKIZgRZhqokUAe14g0TxshCFrUd7prI2Gj16ndHz9UhDgfdm179GaJu0SJ4sYxGaO2q5oycRrZLvMV6tlnuq3ns0jOF4opuJ2w6O0XmGRJwedVLQfUbw7DfaqhhH56KCSLeg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677323752; bh=C3nrZacfOw/7a5TZt6Q7a13W+LazDLNAY3weAq6PoM0=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Xba4CwV4yMZ71lzTTyFQ0KUOlVNaDNfz+plHnB5HsSQaqk2STT54ysIkBegRCPI0EePQxDNEkHF0VqdUa7QJH1i+/aFDENQPlnPYdAK9DthDFSYxlrH9yoV34xvIBHTD7GkiOR6fIdpFfMTd8WZedn6DXZflkKKZd8X0rLLpeJi5xuq/vABx5d/7LF4Z+Kv3F8/zn8ZmrqZiaCWXKcs7uaOOhDv4MuE8MK2QnRU2R5YxpYgdQgyry2+6WIlu+2/qNw/QTPNUTCrneetfEAgvTXmviFLOmL/sRTrfkOBYL4mIGyZsW+u5LJ64Vu5D0Cg9kklUaVt1frHwu2GZ6QrTmg== X-YMail-OSG: BIFp7jYVM1mPDKgxdZIBf.gAQowqioieWm84agzpNAHVr0uT8AinGD5xmFfXqyu tYps2AiNXbu1XDsEWoJCGViYgO9ywfnXLjrRlgXq7MGmpexEM6TxlJkGiYQRDvPwvdC5OeoWlOed 3ZD6dGzhZcR3x6Pns.yB05D4v7FuJ5FzSV3K8dXLplP2XhOWNQO65rh7lqS6RBFJUtwR32g_Oio0 c31ecXliTE9j30BTQN9TEtNkBGFsKo1K3Xm_bwqQILVVokCGJodLIuB0y67.c7H1NY7gwoHFdRc7 1hXXXQcyuSA.jWTuh5WJLMxQWfs5P2amNARcQXTwuZQtl4s2Em6TMjYGpjZvIKNmQGBcvUVQh9Lw KkciFFd0QtqT4PzWhvorBXdhHZU0PIhheFguSQ_O2tTDjpdPAViUNUDqMBn5Cdws4govWS2fvgCQ Xtjfjr83pReqLJsGFMYzV0w8gt48H0nM93IHPAAejk5bhNYoJb1SSa8QtONLMwtZfSbqSquq26_L F9ZZOkIEGg7Sk1T9_i5fUNihp7AYccBla78ZINJ0MRVrQIKsh0IC7kYLAUBPRIz482oC6vP6wZDb rMbi_74SxP_4ZS12XGSN0BOjhvaesFGIYeyQFAmZNHCSEXQD20hh647ateUuA8Tx3c1P1jM99VJ. 6KVB5JVj8rBVSWCFR0.uxUjqhWZEL6H0gm0hsXN9agcKNQ0APZn6eTlOhBwUzxAAKCbZk.OERH_H 8Ergce2fwXnrrIFno6kbbL.CoOSOhx9LvPNEmPZncyY9sMG2Rf0mD7.VLKvT5mtxKkQiQUBgbWNL 4PLx1NlU.PZCperQVwIilZr9rvBOXUd1kvwcFO3eV9 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Sat, 25 Feb 2023 11:15:52 +0000 Original-Received: by hermes--production-sg3-9fc5746c8-nc5k6 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ede0b16df1dffecea3d8f4b1d310845f; Sat, 25 Feb 2023 11:13:49 +0000 (UTC) In-Reply-To: <87fsauvx2v.fsf@gmx.de> (Michael Albinus's message of "Sat, 25 Feb 2023 11:49:44 +0100") X-Mailer: WebService/1.1.21221 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.189.173; envelope-from=luangruo@yahoo.com; helo=sonic314-47.consmr.mail.ne1.yahoo.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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:303795 Archived-At: Michael Albinus writes: > Po Lu 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.