From: "Alejandro Pérez Carballo" <apc@umass.edu>
To: help-gnu-emacs@gnu.org
Subject: Help debugging `file-notify-handle-event`
Date: Tue, 8 Nov 2022 20:50:37 -0500 [thread overview]
Message-ID: <1C18C574-8BF6-44D8-B88E-85E43AD0579B@umass.edu> (raw)
Hello,
I've been trying to figure out the source of this recurring error message for weeks. I thought I had found a bug, but discussion with Michael Albinus after my bug report made me think I was confused.
https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-11/msg00123.html
The error message I've gotten for months now, often multiple times overnight, is just this:
file-notify--call-handler: Symbol’s function definition is void: nil
I don't really know what's triggering it, but having once caught a backtrace (which I failed to save somewhere), I ended up suspecting that the issue was related to the fact that, just loading this in vanilla Emacs:
```
(require 'filenotify)
(require 'autorevert)
(require 'subr-x)
(global-auto-revert-mode)
(save-window-excursion
(find-file "~/tmp/test.el"))
```
and then running this:
(file-notify--handle-event (car (hash-table-keys file-notify-descriptors)) '(renamed deleted) "/Users/apc/tmp/test.el" nil)
led to the same error:
file-notify--call-handler: Symbol’s function definition is void: nil
But in his follow up to my bug report, Michael suggested that this call
file-notify--handle-event(20 (renamed deleted) "/Users/apc/org/agenda/work.org" nil)
was invalid (assuming 20 is the descriptor corresponding to the relevant file).
I now have a backtrace to point to, and it does seem that something is causing that invalid call to be made. My question is: what can I do to figure out what's triggering it?
---
Debugger entered--Lisp error: (void-function nil)
nil((20 deleted "/Users/apc/org/agenda/work.org"))
file-notify--call-handler(#s(file-notify--watch :directory "/Users/apc/org/agenda" :filename "work.org" :callback nil) 20 deleted "/Users/apc/org/agenda/work.org" nil)
file-notify--handle-event(20 (renamed deleted) "/Users/apc/org/agenda/work.org" nil)
file-notify--callback-kqueue((20 (rename delete) "/Users/apc/org/agenda/work.org"))
file-notify-handle-event((file-notify (20 (rename delete) "/Users/apc/org/agenda/work.org") file-notify--callback-kqueue))
funcall-interactively(file-notify-handle-event (file-notify (20 (rename delete) "/Users/apc/org/agenda/work.org") file-notify--callback-kqueue))
call-interactively(file-notify-handle-event nil [(file-notify (20 (rename delete) "/Users/apc/org/agenda/work.org") file-notify--callback-kqueue)])
command-execute(file-notify-handle-event nil [(file-notify (20 (rename delete) "/Users/apc/org/agenda/work.org") file-notify--callback-kqueue)] t)
---
Thanks in advance,
A.
next reply other threads:[~2022-11-09 1:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 1:50 Alejandro Pérez Carballo [this message]
2022-11-09 15:30 ` Help debugging `file-notify-handle-event` Emanuel Berg
2022-11-10 14:00 ` Robert Pluim
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=1C18C574-8BF6-44D8-B88E-85E43AD0579B@umass.edu \
--to=apc@umass.edu \
--cc=help-gnu-emacs@gnu.org \
/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.
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).