From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#58964: 28.2; `file-notify--handle-event` setting callback function to nil Date: Fri, 04 Nov 2022 14:09:56 +0100 Message-ID: <877d0ac1cr.fsf@gmx.de> References: <87fsf0bhus.fsf@gmx.de> <02BBE794-5B9D-4249-8A7F-51E1B03146E5@umass.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23994"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 58964-done@debbugs.gnu.org To: Alejandro =?UTF-8?Q?P=C3=A9rez?= Carballo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 04 14:11:27 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oqwTn-00068m-0C for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Nov 2022 14:11:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqwTe-0001Ys-1C; Fri, 04 Nov 2022 09:11:18 -0400 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 1oqwTO-0001Xo-R9 for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 09:11:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqwTO-0006cm-7p for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 09:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqwTO-0001yt-3E for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 09:11:02 -0400 Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Nov 2022 13:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 58964 X-GNU-PR-Package: emacs Mail-Followup-To: 58964@debbugs.gnu.org, michael.albinus@gmx.de, apc@umass.edu Original-Received: via spool by 58964-done@debbugs.gnu.org id=D58964.16675674147546 (code D ref 58964); Fri, 04 Nov 2022 13:11:01 +0000 Original-Received: (at 58964-done) by debbugs.gnu.org; 4 Nov 2022 13:10:14 +0000 Original-Received: from localhost ([127.0.0.1]:52082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqwSb-0001xc-Ll for submit@debbugs.gnu.org; Fri, 04 Nov 2022 09:10:14 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:54529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqwSZ-0001xK-DL for 58964-done@debbugs.gnu.org; Fri, 04 Nov 2022 09:10:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1667567402; bh=h2srloibRlzfAb+K3xkuujjgZ55aD9DOm31LNdNEiwI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=uHh0oFDCQdJEPX+Vws4+M3CNnw9Ae9zbc99ZwVD6XRrJxOL6EUZ6EH8Gh3XlXpSHP t8QKvTnyGt1tyyWWqmOZ7LlHWCK25SALFjGDWDxdLIdt2N3pii0UXeyQAMC1hGKH/o zdSmxTjlEhZOqfTpluxgX8fIiyk/7cju3yH76aEEIHS2pYO2OuqhxwG1WZKSe+5189 nTmLdXluochIvMmJy7qVepU13hqPiugjaaeokW3U1ToWVklVIeCNXrhnAfWr3obTmW /5O/OHklJkdJ1gwRA/LJXm0PPvPbg220rjniJ9lt3gLETJbTlWEJTLoN9FRwaFBkBn GLRiaMmYPh/xg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([213.220.158.250]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MMXUD-1oYZzi3kVb-00JZW4; Fri, 04 Nov 2022 14:10:02 +0100 In-Reply-To: <02BBE794-5B9D-4249-8A7F-51E1B03146E5@umass.edu> ("Alejandro =?UTF-8?Q?P=C3=A9rez?= Carballo"'s message of "Thu, 3 Nov 2022 20:11:34 -0400") X-Provags-ID: V03:K1:p5tR8qO5oDoAXh5/ydya2wopBJkPS+snOhq9iS7SDBZk9+ejYE7 kVKT+ypHlseEjMu8W0M3VBkY0H3CmmIxOHo/y1QJpkBoewiGSBZZvccC8MG1G5zPmds1oew 2NaPEmdzriZDjALIEhj6COE5JM0W1RBniVMoHTbaiS26QCgUr0DQu18du1YoG5KTg2P/AzX DAMzuvz4P0r7fdvfRPS+A== UI-OutboundReport: notjunk:1;M01:P0:Os87owMviqk=;Dt/t0LT+2AE+pnzzDh1WuXMszxr OP+qbWaR9uwEuUX4bWy1HqnVpcDZWkjYB8Mc57kP4exwCawHqV6ksH6//u7Nbqqq4hn5/1cDF 49qVhAja7cTvUs3ielq07rCoMUoLtfRidKDmycZ3bBi07b2O91Y4uxA9IJu/438Qc4Ljj3Sg4 YkHM5tnx5F9chaj4F2pCyknFiVLofh2fPIzy28tZQf/fexFSQCpJrKVnsHnF9km9QZNV2rk6a LVMNwxX7rAvZpECkElPO/gPZCyS9ZYZwZEkswZ91/7QcpPDLTHQBOjg7qHh4+9Q4Gw4vWgm4X E0K6eq6rdtFFD2pDYECPbU62r9QkzPODcbs24i4NGGjY6SuZ30MAvaZIkN8hxYFtPtwFb+NuD CuXQtN2w+2RPjKYcK83jkx5mNb5a91IRk5bJa441mumvGKF4DnqX1FMjt1AybK6GvamlgPVWG v87Czf4r6LtxuWh3aXqbCIpzZi7Yz04ahheM81Qw/gYymmxQXSZ5uv1MgpcuEE9UYOBjM94kV Fme0YFn5OrAT0PZ5MZEBPG+RszLtcm+Dp4hcWPxl/tEiw6tKUnBJ9qhqsgdPGxpNCinEgO4p1 moyuIoBltFFbXTnrZLJLyyHQ4qgYcHVkxaFZDxio/WIGbO81M+Y2Ou82I7J2o1zzUC8m9b7SE YPL7sqYOgp4TTA/IZFZtjPq7O3h7Zefb9lynia2NLSOGefviufonZg+4gBPEGHSTtQnSZEgte cEbwu9h0UaTJrGtpithr6CyatNuT5SJpAbTDf5rqrz9cuTUqvFWJB9CWhDbU2m9Si5RUC7jy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247076 Archived-At: Alejandro P=C3=A9rez Carballo writes: > Hi Michael,=20 Hi Alejandro, >> This is not a valid call of `file-notify--handle-event', see its >> docstring how it shall be applied. > > I've looked at the docstring but don't really see why what I gave is > not a valid call of the function. > > Signature > (file-notify--handle-event DESC ACTIONS FILE FILE1-OR-COOKIE) >=20=20=20=20=20 > Documentation > Handle an event returned from file notification. >=20=20=20=20=20 > DESC is the back-end descriptor. ACTIONS is a list of: > created > changed > attribute-changed > deleted > renamed -- FILE is old name, FILE1-OR-COOKIE is new name o= r nil > renamed-from -- FILE is old name, FILE1-OR-COOKIE is cookie or = nil > renamed-to -- FILE is new name, FILE1-OR-COOKIE is cookie or = nil > stopped -- no more events after this should be sent > > I thought the descriptor would just be one of the keys in the hash > table that is the value of `file-notify-descriptors', but maybe I'm > misunderstanding how that's all supposed to work. So basically, the > call that's giving me the error is this: > > (file-notify--handle-event 18 '(renamed attribute-changed deleted) "/= Users/apc/tmp/test.el" nil) > > Is that not a valid call? (I was passing as first argument `(car > (hash-table-keys file-notify-descriptors))` because I thought it would > be easier to use for reproduction purposes than asking people to see > what the key associated with the visited file in > `file-notify-descriptors` was.) There are several problems. It is not clear whether desc 18 is related to the file name you have given. The combination of actions you have used is not valid, it makes no sense. When there is a renamed action, the file1-or-cookie arg must be a file name. And I'm not sure whether we want to see absolute file names. Conclusio: Don't mess with this internal function. > As for your other questions: I am not trying to call this function > directly, but instead trying to find the source of an error message > I've been getting on and off for months. After leaving > `debug-on-error' on for a while, I finally got a backtrace. From what > I could tell, that was the cause of the trouble. Something in my > system is making a call to `file-notify--handle-event' with similar > arguments (it was a different file, and a different key, the one that > in fact was associated with the file in question in the > `file-notify-descriptors` table). For debugging purposes, I recommend to set file-notify-debug to t. This shall give you a lot of information. > Unfortunately, I cannot find the original backtrace information. If > indeed what I provided was not a valid call of the function, I'll have > to wait until next time the error shows up and see if I get more > information about what could be making that invalid call in my system. Yes, please. And if you still cannot determine what's up, pls contact us. I'm closing *this* bug, because the problem you've reported doesn't exist as such. > Best,=20 > > A. Best regards, Michael.