From unknown Mon Jun 23 16:49:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22736: 25.0.91; file-notify calls wrong callbacks Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Feb 2016 19:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 22736@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14558223119878 (code B ref -1); Thu, 18 Feb 2016 19:06:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Feb 2016 19:05:11 +0000 Received: from localhost ([127.0.0.1]:33203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWTsw-0002ZB-Td for submit@debbugs.gnu.org; Thu, 18 Feb 2016 14:05:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34418) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWTsr-0002Yb-MY for submit@debbugs.gnu.org; Thu, 18 Feb 2016 14:05:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWTsi-0002fW-PC for submit@debbugs.gnu.org; Thu, 18 Feb 2016 14:04:56 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTsi-0002fS-Lb for submit@debbugs.gnu.org; Thu, 18 Feb 2016 14:04:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTse-00022O-Qb for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 14:04:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWTsZ-0002dC-NM for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 14:04:48 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:34498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTsZ-0002cz-Ir for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 14:04:43 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3094D2097E for ; Thu, 18 Feb 2016 14:04:43 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 18 Feb 2016 14:04:43 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=6S iHl1SShHcndKB4ebnAlqv3OVI=; b=f6glohnSr26twwRLYg2hyyG4kCb3f8VfMF P5/5uxlbEB8qNTwqOfvl2XAIFQfsIUI9aV+0BSVPe3BgiTrms0zV99LcphKKxtJ6 e32pDU9bgEL3ezSfYuYP92C8HD4T8izEv+eN/sDtLcplGWkQUj0n69Bjx2RXk9O/ c+fsFzEx0= X-Sasl-enc: X6aGphDtr50M+JX+GEAt7IPX9l2y5J3LPEH91bJm9hxa 1455822282 Received: from thinkpad-t440p (unknown [2.163.102.192]) by mail.messagingengine.com (Postfix) with ESMTPA id 61256C00014 for ; Thu, 18 Feb 2016 14:04:42 -0500 (EST) From: Tassilo Horn Date: Thu, 18 Feb 2016 20:04:40 +0100 Message-ID: <877fi1x2k7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) I use inotify as `file-notify--library' on a GNU/Linux box and a very recent emacs-25 branch version of emacs. The problem is that when there is a directory watch on some directory and a file watch on a file in that directory, the callback for the directory watch gets an event with the descriptor of the file watch. For example, here's an entry from my `file-notify-descriptors' hashtable. 3 ("/home/horn/Repos/el/emacs/lisp" (nil . magit-filenotify--callback) ("filenotify.el" . auto-revert-notify-handler)) As you can see, the emacs/lisp directory is watched and changes are to be reported to `magit-filenotify--callback'. When that registered the watch, it was told the descriptor is (3). Additionally, the file filenotify.el in that directory has a watch, too. Changes are to be handled by `auto-revert-notify-handler', and the descriptor at registration time was the cons (3 . "filenotify.el"). So now I change filenotify.el and save. What happens is that `magit-filenotify--callback' is called with an event whose descriptor is (3 . "filenotify.el"). That's wrong. Callbacks should not have to explicitly ignore events they haven't registered for. And the docs also state that the callbacks are called with events whose descriptors are the same objects as the one returned by `file-notify-add-watch'. In GNU Emacs 25.0.91.3 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.7) of 2016-02-18 built on thinkpad-t440p Repository revision: fa8fd65ef40eacb808583a968c3621c228bf021c Windowing system distributor 'The X.Org Foundation', version 11.0.11801000 System Description: Arch Linux Configured using: 'configure --with-modules --with-xwidgets 'CFLAGS=-g -ggdb3 -Og'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES XWIDGETS Important settings: value of $LC_MONETARY: de_DE.utf8 value of $LC_NUMERIC: de_DE.utf8 value of $LC_TIME: de_DE.utf8 value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Summary Minor modes in effect: debbugs-gnu-summary-mode: t hl-line-mode: t magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t diff-auto-refine-mode: t global-company-mode: t shell-dirtrack-mode: t global-aggressive-indent-mode: t pdf-occur-global-minor-mode: t recentf-mode: t beacon-mode: t global-subword-mode: t subword-mode: t save-place-mode: t savehist-mode: t show-paren-mode: t ivy-mode: t minibuffer-depth-indicate-mode: t electric-pair-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t global-prettify-symbols-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: [2 times] Auto-Revert mode enabled in current buffer [2 times] Mark set Quit Contacting host: debbugs.gnu.org:80 [3 times] 20160218T194758.086> Opening nndoc server on /tmp/gnus-temp-group-53519uC-ephemeral... 20160218T194758.086> Opening nndoc server on /tmp/gnus-temp-group-53519uC-ephemeral...done EVENT: ((3) changed "/home/horn/Repos/el/emacs/lisp/#filenotify.el#") DATA: ("/home/horn/Repos/el/emacs/lisp/" #) Load-path shadows: None found. Features: (shadow emacsbug sendmail sort smiley gnus-cite gnus-bcklg nndoc url-handlers gnus-dup mm-archive debbugs-gnu debbugs soap-client warnings rng-xsd rng-dt rng-util xsd-regexp gnus-async qp gnus-ml hl-line nndraft nnmh rot13 utf-7 network-stream nsm starttls nnml nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-cache gnus-demon nntp spam spam-stat gnus-uu yenc gnus-msg gnus-gravatar mail-extr gravatar gnus-topic nnir gnus-registry registry eieio-compat eieio-base th-private eieio-opt speedbar sb-image ezimage dframe character-fold misearch multi-isearch linum magit-filenotify magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit magit-apply magit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert autorevert filenotify magit-process magit-popup magit-mode magit-git crm magit-section magit-utils git-commit log-edit pcvs-util add-log with-editor async-bytecomp async smex ido vc vc-dispatcher vc-git diff-mode colir color company-oddmuse company-keywords company-etags company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb highlight-indent-guides company stratego-mode tg-mode generic preview-latex tex-site auto-loads clj-refactor pkg-info url-http url-auth url-gw json map lisp-mnt epl inflections html-mode-expansions sgml-mode edn peg multiple-cursors-core s dash cider tramp-sh cider-debug cider-browse-ns cider-inspector cider-mode cider-resolve cider-interaction arc-mode archive-mode cider-overlays cider-repl cider-test cider-stacktrace cider-doc org-table the-org-mode-expansions org org-macro org-footnote org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs cider-grimoire cider-popup cider-eldoc cider-client cider-common cider-util nrepl-client tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete queue ewoc cider-compat spinner clojure-mode-expansions clojure-mode align paredit aggressive-indent epa-file epa rdictcc google-contacts-message google-contacts xml url-cache url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util google-oauth google-contacts-gnus gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems nnheader dired-x em-term term ehelp esh-opt esh-ext esh-util highlight-symbol boxquote rect ecomplete message rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader server yasnippet disp-table noutline outline pdf-occur ibuf-ext ibuffer tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local find-func cedet dired pdf-isearch let-alist pdf-misc imenu pdf-tools compile comint ansi-color cus-edit cus-start cus-load pdf-view bookmark pp jka-compr pdf-cache pdf-info tq pdf-util format-spec image-mode browse-kill-ring derived recentf tree-widget wid-edit expand-region text-mode-expansions er-basic-expansions expand-region-core expand-region-custom beacon seq highlight-parentheses easy-mmode cl iedit iedit-lib hydra lv counsel etags xref project swiper cap-words superword subword saveplace savehist paren ivy delsel ffap thingatpt url-parse auth-source eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core cl-macs gv gnus-util mm-util help-fns help-mode mail-prsvr password-cache url-vars icomplete mb-depth ace-window avy ring smart-mode-line-respectful-theme smart-mode-line-dark-theme cl-seq smart-mode-line rich-minority rx bs windmove elec-pair edmacro kmacro cl-loaddefs cl-lib subr-x pcase tsdh-dark-theme finder-inf memory-usage-autoloads advice info package easymenu epg-config time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 818216 119839) (symbols 48 60404 16) (miscs 40 525 1053) (strings 32 194650 65781) (string-bytes 1 6408650) (vectors 16 87142) (vector-slots 8 2026074 102176) (floats 8 1116 652) (intervals 56 8874 4719) (buffers 976 43) (heap 1024 110928 12933)) From unknown Mon Jun 23 16:49:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22736: 25.0.91; file-notify calls wrong callbacks Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Feb 2016 20:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tassilo Horn Cc: 22736@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22736-submit@debbugs.gnu.org id=B22736.145582615315510 (code B ref 22736); Thu, 18 Feb 2016 20:10:01 +0000 Received: (at 22736) by debbugs.gnu.org; 18 Feb 2016 20:09:13 +0000 Received: from localhost ([127.0.0.1]:33217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWUsz-000426-6o for submit@debbugs.gnu.org; Thu, 18 Feb 2016 15:09:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37356) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWUsx-00041q-2l for 22736@debbugs.gnu.org; Thu, 18 Feb 2016 15:09:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWUso-0001HP-Nl for 22736@debbugs.gnu.org; Thu, 18 Feb 2016 15:09:05 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWUso-0001HK-Kr for 22736@debbugs.gnu.org; Thu, 18 Feb 2016 15:09:02 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2104 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aWUsn-0005in-II; Thu, 18 Feb 2016 15:09:02 -0500 Date: Thu, 18 Feb 2016 22:09:18 +0200 Message-Id: <83a8mxu6fl.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <877fi1x2k7.fsf@gnu.org> (message from Tassilo Horn on Thu, 18 Feb 2016 20:04:40 +0100) References: <877fi1x2k7.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Tassilo Horn > Date: Thu, 18 Feb 2016 20:04:40 +0100 > > The problem is that when there is a directory watch on some directory > and a file watch on a file in that directory, the callback for the > directory watch gets an event with the descriptor of the file watch. I think this is because when you ask to watch a file, we actually watch its parent directory. From unknown Mon Jun 23 16:49:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22736: 25.0.91; file-notify calls wrong callbacks Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Feb 2016 08:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 22736@debbugs.gnu.org, Tassilo Horn Received: via spool by 22736-submit@debbugs.gnu.org id=B22736.1455871625438 (code B ref 22736); Fri, 19 Feb 2016 08:48:02 +0000 Received: (at 22736) by debbugs.gnu.org; 19 Feb 2016 08:47:05 +0000 Received: from localhost ([127.0.0.1]:33467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWgiP-00006z-Hg for submit@debbugs.gnu.org; Fri, 19 Feb 2016 03:47:05 -0500 Received: from mout.gmx.net ([212.227.17.21]:60287) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWgiN-00006P-F1 for 22736@debbugs.gnu.org; Fri, 19 Feb 2016 03:47:03 -0500 Received: from detlef.gmx.de ([79.195.30.152]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MX19U-1aR8Im2WfM-00W0Vi; Fri, 19 Feb 2016 09:46:56 +0100 From: Michael Albinus References: <877fi1x2k7.fsf@gnu.org> <83a8mxu6fl.fsf@gnu.org> Date: Fri, 19 Feb 2016 09:46:55 +0100 In-Reply-To: <83a8mxu6fl.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Feb 2016 22:09:18 +0200") Message-ID: <87d1rt5bpc.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:rmIRJJ4ygQdC6PLXOBjk6wKR0Jbpi5AhuRfN4SVo3S1v8Q3qeKm 5uj2ZsoC/hkgn8omIbwMAaJkctjNcxCIluIc+wBOelGrkenDRsA4r3rIYIOns0U0KViFGtK j69HiaX+uA/WCw7XLOxic7XyVMRebhwJhl9gqN1O5KwXbLeJEQK+rP1qj7nOuu/GRah9l+Y bLtTJwYs/X5OIeDh3Ud4g== X-UI-Out-Filterresults: notjunk:1;V01:K0:vAhZzQC9u5M=:V/gOvGT5ICT5ok/ausFct4 gSApynvL5l8RiyVmUiyGF0aj0DjAvIoZkIdKnqcvU9jnujWkIoFU5l0BxddAagk5KgL8mqkoV mXlyO4/qjtLbUR1XP0X2VaKzB3flru8XaeY9dpJ3gU/T38jmamrrWMg2npGd1zhIAVHB0zNG1 YNJ3NTlEU1voLsZm9cUxhU+RKKVKQY/rOOuKeWIbsLd5ON0JkIaHlyzBRbKz8MdEzI7oLKCcz uaxVXAvnDbDYYQip3/mRxFrEavFus570RG4hwpejD35+nNrdRkgDCqXsmRBAKbQ1LYLFWV0KZ 1ONrN/8SSrYxk7nr7rtQ+Avqtbu2h8/3k4PeqFK7lEM1k5wdjlNXwKR/PEUsMXQTAiMiasD70 Ne98W3tG4VD+EYJ1GGcNPm8BmmHwSlTAyR0xQpTVQrtoAzod1rYKlQ0I6F1NiGaQr6ycal8qm 0Vk8mZ1oJZJKdI7qy4Qj8eBnznlTMMYo9uuuos45s2u/CprSq59mk7frrU4v408UaalO9Y7pl VJVCTo52g0P1p9oNBDajqy6ep9xy0FzPaMNSzYNyYPiAaigaGIhZeqEdaLoFvdDZJisjMkN4S P6WixXJ/hTU5nI6uKYCMi/e8K8oD9Es0s8ouN2AGHXWiw9+wQEc3iOcYLfuvWvEWFk/dyHFb3 whBkysjCdY3ANaucKE9mUrZNxBUOsjbtFJtk0eFTPGOEAJKHqb995ngu1JujlhsRg3aXeKkY+ hLG0QsD56t+/394xI2dk1tHzyCBOaYDRCJqn8xfOhZJXFp8PlALxhYC8IYVs+S7whRMAKynfm k47wxY7 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: >> The problem is that when there is a directory watch on some directory >> and a file watch on a file in that directory, the callback for the >> directory watch gets an event with the descriptor of the file watch. > > I think this is because when you ask to watch a file, we actually > watch its parent directory. Although we watch the parent directory internally (except with kqueue), the given scenario by Tassilo shall work as he expected. There shall be two file notification events in the given case, calling magit-filenotify--callback and auto-revert-notify-handler with the respective descriptor. I'll check. Tassilo, would you be willing to write an ert test case for the problem? Best regards, Michael. From unknown Mon Jun 23 16:49:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22736: 25.0.91; file-notify calls wrong callbacks Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Feb 2016 23:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: Eli Zaretskii , 22736@debbugs.gnu.org Received: via spool by 22736-submit@debbugs.gnu.org id=B22736.145592278620082 (code B ref 22736); Fri, 19 Feb 2016 23:00:02 +0000 Received: (at 22736) by debbugs.gnu.org; 19 Feb 2016 22:59:46 +0000 Received: from localhost ([127.0.0.1]:34349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWu1a-0005Dq-84 for submit@debbugs.gnu.org; Fri, 19 Feb 2016 17:59:46 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52586) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWu1Z-0005Dj-G2 for 22736@debbugs.gnu.org; Fri, 19 Feb 2016 17:59:45 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1A07F20956 for <22736@debbugs.gnu.org>; Fri, 19 Feb 2016 17:59:45 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 19 Feb 2016 17:59:45 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=cdV0glGx+H+fSGXitklcOT2P4Yw=; b=CSvq6 DXuOob/ge71Yi3V7Wa0Ard5flM3wfiVPfjU2A5Q5a4EuXrXT9ucCfWGM8GaiDQNV mNQlRPmUDVDCBi50bfSJxKVQhNDG1wH0GcMBi8IiwIp3SaC+e1UMhdx/lOPAxxCn Ds6q2SbMAs3AFa3a3jytsGDs6ap5M6dP0dO1rc= X-Sasl-enc: ANJoL+sVXJQcnJ3FoiIEHHNDWzGd/sIf+FaJbhh+ctFF 1455922784 Received: from thinkpad-t440p (unknown [31.213.65.129]) by mail.messagingengine.com (Postfix) with ESMTPA id 4729CC0001B; Fri, 19 Feb 2016 17:59:44 -0500 (EST) From: Tassilo Horn References: <877fi1x2k7.fsf@gnu.org> <83a8mxu6fl.fsf@gnu.org> <87d1rt5bpc.fsf@gmx.de> Date: Fri, 19 Feb 2016 23:59:42 +0100 In-Reply-To: <87d1rt5bpc.fsf@gmx.de> (Michael Albinus's message of "Fri, 19 Feb 2016 09:46:55 +0100") Message-ID: <874md4z4pt.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) Michael Albinus writes: Hi Michael and Eli, >>> The problem is that when there is a directory watch on some >>> directory and a file watch on a file in that directory, the callback >>> for the directory watch gets an event with the descriptor of the >>> file watch. >> >> I think this is because when you ask to watch a file, we actually >> watch its parent directory. > > Although we watch the parent directory internally (except with > kqueue), the given scenario by Tassilo shall work as he expected. > There shall be two file notification events in the given case, calling > magit-filenotify--callback and auto-revert-notify-handler with the > respective descriptor. Yes, that's exactly what I had expected. > I'll check. Thanks! > Tassilo, would you be willing to write an ert test case for the problem? Sure, I'm already working on it. :-) Bye, Tassilo From unknown Mon Jun 23 16:49:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22736: 25.0.91; file-notify calls wrong callbacks In-Reply-To: <877fi1x2k7.fsf@gnu.org> Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Feb 2016 13:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tassilo Horn Cc: 22736@debbugs.gnu.org Received: via spool by 22736-submit@debbugs.gnu.org id=B22736.145597459021853 (code B ref 22736); Sat, 20 Feb 2016 13:24:02 +0000 Received: (at 22736) by debbugs.gnu.org; 20 Feb 2016 13:23:10 +0000 Received: from localhost ([127.0.0.1]:34707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aX7V8-0005gP-9T for submit@debbugs.gnu.org; Sat, 20 Feb 2016 08:23:10 -0500 Received: from mout.gmx.net ([212.227.17.21]:55338) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aX7V6-0005g3-0d for 22736@debbugs.gnu.org; Sat, 20 Feb 2016 08:23:08 -0500 Received: from detlef.gmx.de ([79.195.9.91]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MEbYb-1aiMxg1zYH-00Figu; Sat, 20 Feb 2016 14:23:01 +0100 From: Michael Albinus References: <877fi1x2k7.fsf@gnu.org> <83a8mxu6fl.fsf@gnu.org> <87d1rt5bpc.fsf@gmx.de> <874md4z4pt.fsf@gnu.org> Date: Sat, 20 Feb 2016 14:23:00 +0100 Message-ID: <87k2lzqzwr.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:YcBSkrtT14/GyWr4INFQvlevZGKWEojEqPSiRp2Iq8JRLoFz0zi kgMQoT52+xDW8mtdvkHkVyZOuGx00DCQIxn6nixJDrSE6iEWlnpKELjnyUSHWI1ug3AQfFI DxxHAvAuqgRkKwN5egLKqtdLJmcSdRLzwbrNA2djw2Ud8Hi4SHsakvxIdBjQqcmsN5/FwfG yfzC+K3+Y3bFWVb68qtxA== X-UI-Out-Filterresults: notjunk:1;V01:K0:6NeEw21h+t0=:GQGdRshDpDc2w264EXtrwY 6ZiXApqrSJSCYCwETWoYd096clS8JN4YO4orGwe26iS0XF3kTo3ToeuenPBjBT98OztKHQdc9 8NCWKzIYkIwnLUU4jCPptBxAf5x68MmW05saEc4xoWEbH5+8x+IfdhIUbWk887b/3EpOJWqF7 /TNzDoZGQkbYaO+mrRhiB9oDjHzkKecU8uG4WnQvlujJvXSoFdHuBmibK5ypuf16e/xkJ/DwV JSaFoDbmtTWuMW2I/nvGV5dYsKY2qhakvYY9PVxgZLzdk++YdYcJF9ALlM5VS5d22xWBI5gZr V1eWt1ZW3VFCSgCiOaxU8T68OHQ7mK6d8VV4xw9IeOZ3A47boRjuYT2ipJf6+F4wLZcWbW9W6 PlJAdIvnRgvRIqhTQ6ExmG7IT0pNhDNQ2fwD2uG7DwlGM7qo+zqRtw2ppCurahqb5xdSguabx ONYNbf+b3YZuWlIS+6jcxpza+cXdd0bqgVbKqfDmuc1wS+asIWo83FOkqBHl03/SkojwHRzGW CTg7LPd8gN6ADkMyNNxTP87CvJAyWM8fMJuf42DbPMhu9b+flon3fu5pIbEG+bThkWwyKvtYc V4IEGdMk4hwpVAv8KSYLlYqooEENvB+KmCnEqft33GISDMHd8SXuXPF12mkp+ciVMPZGL6v7B Na84J7CEoY5CwvOn1OaWu83HRMo05Fd6X9PRQgeHdo1vfjKpS2cyrS6l+jtLDbHGeRRiotVaJ 3pX4ppUTQRy9xdy9yWDoyEso63ZMJ0jEIRxP5esceJU9SeaPuaJi5mpXI13lHgCIOuNqH4Mxj ZbNW1ol X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Tassilo Horn writes: Hi Tassilo, >> Tassilo, would you be willing to write an ert test case for the problem? > > Sure, I'm already working on it. :-) Thanks for the patch. I have modified it a little bit, the major problem was that your (should ...) forms in the two callbacks have no effect, because the callbacks run out of the scope of the ert test. I have modified them in order to use the mechanism from file-notify--test-event-handler. I'll continue to check what's up. > Bye, > Tassilo Best regards, Michael. From unknown Mon Jun 23 16:49:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22736: 25.0.91; file-notify calls wrong callbacks Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Feb 2016 08:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: 22736@debbugs.gnu.org Received: via spool by 22736-submit@debbugs.gnu.org id=B22736.14560417378536 (code B ref 22736); Sun, 21 Feb 2016 08:03:01 +0000 Received: (at 22736) by debbugs.gnu.org; 21 Feb 2016 08:02:17 +0000 Received: from localhost ([127.0.0.1]:35768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXOy9-0002Dc-Iy for submit@debbugs.gnu.org; Sun, 21 Feb 2016 03:02:17 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:34901) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXOy8-0002DV-91 for 22736@debbugs.gnu.org; Sun, 21 Feb 2016 03:02:16 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2726C20987 for <22736@debbugs.gnu.org>; Sun, 21 Feb 2016 03:02:16 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Sun, 21 Feb 2016 03:02:16 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=gFnyeN1h6s6ogLNApeWHuRLHe6M=; b=kF6Vu lIGUJJk4h8RZHmrxvPnSUkDKKdKeaGSImNsrcsP1Jipdz/aMajZxD6JOOy7/4lNu UkKzQNGEjZRRGtm86ODCSrp+zohDSs1fklkyKX8IFGV9Qie4WFAkM3sObM/dSdeg N2wA803ib+ZQW4qhuLa+hsrggkr2M+OZGu730k= X-Sasl-enc: 1Bo+C6MIYp4ZB2Lq7qT5NFVHX2BQxTcEEGo425ngfmjt 1456041735 Received: from thinkpad-t440p (unknown [2.161.244.215]) by mail.messagingengine.com (Postfix) with ESMTPA id 53FE3C0001B; Sun, 21 Feb 2016 03:02:15 -0500 (EST) From: Tassilo Horn References: <877fi1x2k7.fsf@gnu.org> <83a8mxu6fl.fsf@gnu.org> <87d1rt5bpc.fsf@gmx.de> <874md4z4pt.fsf@gnu.org> <87k2lzqzwr.fsf@gmx.de> Date: Sun, 21 Feb 2016 09:02:13 +0100 In-Reply-To: <87k2lzqzwr.fsf@gmx.de> (Michael Albinus's message of "Sat, 20 Feb 2016 14:23:00 +0100") Message-ID: <87y4aeze2i.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) Michael Albinus writes: Hi Michael, >>> Tassilo, would you be willing to write an ert test case for the problem? >> >> Sure, I'm already working on it. :-) > > Thanks for the patch. I have modified it a little bit, the major > problem was that your (should ...) forms in the two callbacks have no > effect, because the callbacks run out of the scope of the ert test. Ups. I've tested it and got failures where (1) was expected but (1 . "fileX1234") was received which seemed correct. :-) > I have modified them in order to use the mechanism from > file-notify--test-event-handler. Thanks! Bye, Tassilo From unknown Mon Jun 23 16:49:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22736: 25.0.91; file-notify calls wrong callbacks In-Reply-To: <877fi1x2k7.fsf@gnu.org> Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Feb 2016 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tassilo Horn Cc: 22736@debbugs.gnu.org Received: via spool by 22736-submit@debbugs.gnu.org id=B22736.145604531713975 (code B ref 22736); Sun, 21 Feb 2016 09:02:02 +0000 Received: (at 22736) by debbugs.gnu.org; 21 Feb 2016 09:01:57 +0000 Received: from localhost ([127.0.0.1]:35780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXPtt-0003dK-FI for submit@debbugs.gnu.org; Sun, 21 Feb 2016 04:01:57 -0500 Received: from mout.gmx.net ([212.227.15.19]:54865) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXPtr-0003d6-CO for 22736@debbugs.gnu.org; Sun, 21 Feb 2016 04:01:55 -0500 Received: from detlef.gmx.de ([87.146.39.7]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0Lq9se-1a2jqG2rJo-00dlcI; Sun, 21 Feb 2016 10:01:48 +0100 From: Michael Albinus References: <877fi1x2k7.fsf@gnu.org> <83a8mxu6fl.fsf@gnu.org> <87d1rt5bpc.fsf@gmx.de> <874md4z4pt.fsf@gnu.org> <87k2lzqzwr.fsf@gmx.de> <87y4aeze2i.fsf@gnu.org> Date: Sun, 21 Feb 2016 10:01:46 +0100 Message-ID: <8737sma139.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:ZZAEL1vqLHr/yieIanZfCCPad2hpqvj2WOaPMxCfxwzt8zj/M3e fSHxOv0olv1Z7sRk4AzM9s6bqxKrUh1IZ7SMVK8l4iygPiNe2ThHblKpUy9n0nX04vb4b4C hD4UZTBNS36dO7umtdKS8QlXGPUgbNn84McCQXBAgKlZEbeOu4u9K6rw+2jeJhturECFqBv dB3whbObxcpXVP8Zk9Nxw== X-UI-Out-Filterresults: notjunk:1;V01:K0:fSotfsPoq2k=:QvPp0tzL+WAGcIEdXjVKuq BrnFrsSiLjoHPZnD5/jTAJsNDBZLhyd133xiF8/XhNcGJZrpRJ3A/M1DZ92unCR1Y62OMbZKj 9NhIfVeTPZiYLAomjjVlBisuEa6moG8xqSG5VsIYyP9CR1n61jEn+/s3Dbd4KrFjXE1WSoxL5 9iQr+9fe9szinl8Z3yj011w6J4k7GSrhvwCg47jdq71Qef6k7aESD6KlKR0DQUecPnqRWN9bN zj9EyIz7SCnWPIHQkqNUa0UgrvVALokMrQ3dUtSXiQ/S9smBvQvHbNOWNWSYZqSkz1cx4qc+G x6fq+HneCKRAWuu3UinqjwwKnlodU1o4GQb+s0sq1RIcskYgayRpHfRn4NZJzp2JKqqZ3gfH2 sdaU4+yl0jpHviG0oUMYGacslSjl6w+ywimedk9odF4LAxSkD7EpBECz3OJsiJuREwgfPDCVM cMXy0J7jbBjD/vPWu2g6pcaDfSZV75SFoETjxnYe0Vf10Ffxr3vf/0mU1Vuj8pwjMnKe2MVMW luYWebPlfFgnFnn1TQexQE1d25rU6HBzQfhZJfLDmk521uWp5nrEi6ZEw7zBmwNqCchKPXpXy WTQOjM4MMAUzCtW0stu+ZWGXbqkdzfcdDoSVfL+MEUVVCzfN1DflJ7pAysxvIra6PyS0UOZ5N +12kuyCaSYX+DLQKZTfrZ9ItgLStnYtgLJijmiKMA9VBZeFyg4pIzQcMi1nCQGTbWRlfiyrjs 6tXJkMlci3SC7pxirnhT4DdWH5+zZIXZnTjfGeIPiGaYAouv7EOgY+DgA0IVrepDrtBKf2cib 37ZKp/r X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Tassilo Horn writes: > Hi Michael, Hi Tassilo, >> I have modified them in order to use the mechanism from >> file-notify--test-event-handler. > > Thanks! I've pushed a patch to the emacs-25 branch which fixes the problem. The test passes successfully, using the inotify backend. Could you, please, crosscheck, that your use case runs also? There are still problems with the `stopped' events in this constellation, but that is outside the scope of this bug report. I'll continue to check. And I will run also the test with the other backends, afterwards. > Bye, > Tassilo Best regards, Michael. From unknown Mon Jun 23 16:49:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22736: 25.0.91; file-notify calls wrong callbacks Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Feb 2016 16:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: 22736@debbugs.gnu.org Received: via spool by 22736-submit@debbugs.gnu.org id=B22736.145607057626944 (code B ref 22736); Sun, 21 Feb 2016 16:03:01 +0000 Received: (at 22736) by debbugs.gnu.org; 21 Feb 2016 16:02:56 +0000 Received: from localhost ([127.0.0.1]:36512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXWTI-00070W-EK for submit@debbugs.gnu.org; Sun, 21 Feb 2016 11:02:56 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:57244) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXWTH-00070P-G0 for 22736@debbugs.gnu.org; Sun, 21 Feb 2016 11:02:55 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3580820096 for <22736@debbugs.gnu.org>; Sun, 21 Feb 2016 11:02:55 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 21 Feb 2016 11:02:55 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=ucFmWtigU5TivbEmqxUAn/597bw=; b=ToNmS WcXTwEyYvIb93kUwqszfiLF1IG3OC5VuSAhGGhx5fmiUufZKdma/imf1SaZeyoKD NfF2Y1IP/yQsJnavBGDR/Qn6NaXo373tTn5ACVyUTaH/GHfAg31l+CFpn+U9JDvn oVLySYOZik/JwY7Thywl3f7+o/v3ySKT93KsaE= X-Sasl-enc: 4+VaatkpUUOZdfKZhnijyRxsFeAFVuPSmifKQp+5wbgr 1456070574 Received: from thinkpad-t440p (unknown [2.161.244.215]) by mail.messagingengine.com (Postfix) with ESMTPA id 543346800B7; Sun, 21 Feb 2016 11:02:54 -0500 (EST) From: Tassilo Horn References: <877fi1x2k7.fsf@gnu.org> <83a8mxu6fl.fsf@gnu.org> <87d1rt5bpc.fsf@gmx.de> <874md4z4pt.fsf@gnu.org> <87k2lzqzwr.fsf@gmx.de> <87y4aeze2i.fsf@gnu.org> <8737sma139.fsf@gmx.de> Date: Sun, 21 Feb 2016 17:02:52 +0100 In-Reply-To: <8737sma139.fsf@gmx.de> (Michael Albinus's message of "Sun, 21 Feb 2016 10:01:46 +0100") Message-ID: <8760xi9hlf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) Michael Albinus writes: Hi Michael, > I've pushed a patch to the emacs-25 branch which fixes the problem. > The test passes successfully, using the inotify backend. Could you, > please, crosscheck, that your use case runs also? Yes, now it's working fine again. Bye, Tassilo From unknown Mon Jun 23 16:49:04 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tassilo Horn Subject: bug#22736: closed (Re: bug#22736: 25.0.91; file-notify calls wrong callbacks) Message-ID: References: <87r3g4vd8x.fsf@gmx.de> <877fi1x2k7.fsf@gnu.org> X-Gnu-PR-Message: they-closed 22736 X-Gnu-PR-Package: emacs Reply-To: 22736@debbugs.gnu.org Date: Mon, 22 Feb 2016 17:59:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1456163942-1523-1" This is a multi-part message in MIME format... ------------=_1456163942-1523-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #22736: 25.0.91; file-notify calls wrong callbacks which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 22736@debbugs.gnu.org. --=20 22736: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D22736 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1456163942-1523-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 22736-done) by debbugs.gnu.org; 22 Feb 2016 17:58:15 +0000 Received: from localhost ([127.0.0.1]:38371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXukR-0000Na-7r for submit@debbugs.gnu.org; Mon, 22 Feb 2016 12:58:15 -0500 Received: from mout.gmx.net ([212.227.15.18]:59104) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXukP-0000NO-Un for 22736-done@debbugs.gnu.org; Mon, 22 Feb 2016 12:58:14 -0500 Received: from detlef.gmx.de ([87.146.58.222]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MH0eg-1akcJx2NSU-00DmbI; Mon, 22 Feb 2016 18:58:07 +0100 From: Michael Albinus To: Tassilo Horn Subject: Re: bug#22736: 25.0.91; file-notify calls wrong callbacks References: <877fi1x2k7.fsf@gnu.org> <83a8mxu6fl.fsf@gnu.org> <87d1rt5bpc.fsf@gmx.de> <874md4z4pt.fsf@gnu.org> <87k2lzqzwr.fsf@gmx.de> <87y4aeze2i.fsf@gnu.org> <8737sma139.fsf@gmx.de> <8760xi9hlf.fsf@gnu.org> Date: Mon, 22 Feb 2016 18:58:06 +0100 In-Reply-To: <8760xi9hlf.fsf@gnu.org> (Tassilo Horn's message of "Sun, 21 Feb 2016 17:02:52 +0100") Message-ID: <87r3g4vd8x.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:sbt6Yc3QIzouRS1h75dZBZDc3jhAB2hLLSaGcpboqwxDoQUDngM eq+0WWTmJyI+mYYcomIrrAk4i2l17Syhqe+JVMfdZjUsWKeA7UtxNC/EPL4/LXwbZLeUcCK rYx7awCMCq4kFfArhOfCBFL4u9LP811jYksBvze16OVyDmAp1ve5tjL8Xu8eosdWfJQeRzt tJal6rI4bRF+g1NT+ryqw== X-UI-Out-Filterresults: notjunk:1;V01:K0:xHqpSgeao6M=:+5ysC9IxdN/HTOwpysiuhn a4l8ev32PmfptDIFr7pPPbmjMwadJD3THLRe/5TLs7cObsHheZU/QnlsctLp1zvTPdgty2HM4 8kgkBc1nmwW5ZeBj565dm4jeSURqEppqspUEurstdknC66BKrM8TSguDfxI0aFekjb0BP+I91 nctfRCZC1P7kuu1eURlWqeKUCznh94rGUmpQArD7nWmR+lLtPYAH9U56UEM/wm9Uk3RkLM/zB 1XIfvv4p5F+GuNdxnhDecaWPuzDx7uK0ptYheAbdCYAo9wSWeLqAZ2QMvN5VTk5/6XlJ+gNb1 XQUi1ku51nt4TdMQWRNQSlA/O7ZzgijqIyssbZto6KPOXs/oEDOw/MHvSNLTacN+8o7U8d1kg 7Smt0K2uw6fDdaaZCDxxuMrctMV3SGiwuuqm16EvSDGbbfwX4PEoMo4Q6Xob3Er6bwrVptpsq IdpWNSq/ybx5vLyTZbQ4vV48C7Yes9s9kmgeq7FsiY8RLRNM3NdUGq+Lp7AUUGFLJzx47ND2E xuHQNhxl7mlHGPckgbGS0r3puPv7R4ZYkhiSbWvL2FJ8x1CgmFAG1E7mUn7bf/yd1IDkzJUB0 zISnZotNTAXgIYdqOCHd1pxD74zjnswGD6efvKAiOz/OV2/vFFGBh2wAsG9JqRu82CHfGWsnx XY/Cp9pMogHFftpXb3quryqgvK0DO8U3suyVikICb5YzLc4P/xChoba5yKs1Y+OUtvJkyarZy Lowdh33l+wPns3y43lgcK9URDxafRrrYWk65GlRGNwO590jGHGDKfnxMmHvhO+9SZghd7u90N Gj0i6da X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22736-done Cc: 22736-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Tassilo Horn writes: > Hi Michael, Hi Tassilo, >> I've pushed a patch to the emacs-25 branch which fixes the problem. >> The test passes successfully, using the inotify backend. Could you, >> please, crosscheck, that your use case runs also? > > Yes, now it's working fine again. Thanks, I'm marking this bug as done. I've finished also my tests with different backends (except for cygwin); there were some minor glitches to fix. And I've pimped file-notify-test08-watched-file-in-watched-dir; it checks now the expected events. > Bye, > Tassilo Best regards, Michael. ------------=_1456163942-1523-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Feb 2016 19:05:11 +0000 Received: from localhost ([127.0.0.1]:33203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWTsw-0002ZB-Td for submit@debbugs.gnu.org; Thu, 18 Feb 2016 14:05:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34418) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWTsr-0002Yb-MY for submit@debbugs.gnu.org; Thu, 18 Feb 2016 14:05:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWTsi-0002fW-PC for submit@debbugs.gnu.org; Thu, 18 Feb 2016 14:04:56 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTsi-0002fS-Lb for submit@debbugs.gnu.org; Thu, 18 Feb 2016 14:04:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTse-00022O-Qb for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 14:04:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWTsZ-0002dC-NM for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 14:04:48 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:34498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTsZ-0002cz-Ir for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 14:04:43 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3094D2097E for ; Thu, 18 Feb 2016 14:04:43 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 18 Feb 2016 14:04:43 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=6S iHl1SShHcndKB4ebnAlqv3OVI=; b=f6glohnSr26twwRLYg2hyyG4kCb3f8VfMF P5/5uxlbEB8qNTwqOfvl2XAIFQfsIUI9aV+0BSVPe3BgiTrms0zV99LcphKKxtJ6 e32pDU9bgEL3ezSfYuYP92C8HD4T8izEv+eN/sDtLcplGWkQUj0n69Bjx2RXk9O/ c+fsFzEx0= X-Sasl-enc: X6aGphDtr50M+JX+GEAt7IPX9l2y5J3LPEH91bJm9hxa 1455822282 Received: from thinkpad-t440p (unknown [2.163.102.192]) by mail.messagingengine.com (Postfix) with ESMTPA id 61256C00014 for ; Thu, 18 Feb 2016 14:04:42 -0500 (EST) From: Tassilo Horn To: bug-gnu-emacs@gnu.org Subject: 25.0.91; file-notify calls wrong callbacks Date: Thu, 18 Feb 2016 20:04:40 +0100 Message-ID: <877fi1x2k7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) I use inotify as `file-notify--library' on a GNU/Linux box and a very recent emacs-25 branch version of emacs. The problem is that when there is a directory watch on some directory and a file watch on a file in that directory, the callback for the directory watch gets an event with the descriptor of the file watch. For example, here's an entry from my `file-notify-descriptors' hashtable. 3 ("/home/horn/Repos/el/emacs/lisp" (nil . magit-filenotify--callback) ("filenotify.el" . auto-revert-notify-handler)) As you can see, the emacs/lisp directory is watched and changes are to be reported to `magit-filenotify--callback'. When that registered the watch, it was told the descriptor is (3). Additionally, the file filenotify.el in that directory has a watch, too. Changes are to be handled by `auto-revert-notify-handler', and the descriptor at registration time was the cons (3 . "filenotify.el"). So now I change filenotify.el and save. What happens is that `magit-filenotify--callback' is called with an event whose descriptor is (3 . "filenotify.el"). That's wrong. Callbacks should not have to explicitly ignore events they haven't registered for. And the docs also state that the callbacks are called with events whose descriptors are the same objects as the one returned by `file-notify-add-watch'. In GNU Emacs 25.0.91.3 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.7) of 2016-02-18 built on thinkpad-t440p Repository revision: fa8fd65ef40eacb808583a968c3621c228bf021c Windowing system distributor 'The X.Org Foundation', version 11.0.11801000 System Description: Arch Linux Configured using: 'configure --with-modules --with-xwidgets 'CFLAGS=-g -ggdb3 -Og'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES XWIDGETS Important settings: value of $LC_MONETARY: de_DE.utf8 value of $LC_NUMERIC: de_DE.utf8 value of $LC_TIME: de_DE.utf8 value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Summary Minor modes in effect: debbugs-gnu-summary-mode: t hl-line-mode: t magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t diff-auto-refine-mode: t global-company-mode: t shell-dirtrack-mode: t global-aggressive-indent-mode: t pdf-occur-global-minor-mode: t recentf-mode: t beacon-mode: t global-subword-mode: t subword-mode: t save-place-mode: t savehist-mode: t show-paren-mode: t ivy-mode: t minibuffer-depth-indicate-mode: t electric-pair-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t global-prettify-symbols-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: [2 times] Auto-Revert mode enabled in current buffer [2 times] Mark set Quit Contacting host: debbugs.gnu.org:80 [3 times] 20160218T194758.086> Opening nndoc server on /tmp/gnus-temp-group-53519uC-ephemeral... 20160218T194758.086> Opening nndoc server on /tmp/gnus-temp-group-53519uC-ephemeral...done EVENT: ((3) changed "/home/horn/Repos/el/emacs/lisp/#filenotify.el#") DATA: ("/home/horn/Repos/el/emacs/lisp/" #) Load-path shadows: None found. Features: (shadow emacsbug sendmail sort smiley gnus-cite gnus-bcklg nndoc url-handlers gnus-dup mm-archive debbugs-gnu debbugs soap-client warnings rng-xsd rng-dt rng-util xsd-regexp gnus-async qp gnus-ml hl-line nndraft nnmh rot13 utf-7 network-stream nsm starttls nnml nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-cache gnus-demon nntp spam spam-stat gnus-uu yenc gnus-msg gnus-gravatar mail-extr gravatar gnus-topic nnir gnus-registry registry eieio-compat eieio-base th-private eieio-opt speedbar sb-image ezimage dframe character-fold misearch multi-isearch linum magit-filenotify magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit magit-apply magit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert autorevert filenotify magit-process magit-popup magit-mode magit-git crm magit-section magit-utils git-commit log-edit pcvs-util add-log with-editor async-bytecomp async smex ido vc vc-dispatcher vc-git diff-mode colir color company-oddmuse company-keywords company-etags company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb highlight-indent-guides company stratego-mode tg-mode generic preview-latex tex-site auto-loads clj-refactor pkg-info url-http url-auth url-gw json map lisp-mnt epl inflections html-mode-expansions sgml-mode edn peg multiple-cursors-core s dash cider tramp-sh cider-debug cider-browse-ns cider-inspector cider-mode cider-resolve cider-interaction arc-mode archive-mode cider-overlays cider-repl cider-test cider-stacktrace cider-doc org-table the-org-mode-expansions org org-macro org-footnote org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs cider-grimoire cider-popup cider-eldoc cider-client cider-common cider-util nrepl-client tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete queue ewoc cider-compat spinner clojure-mode-expansions clojure-mode align paredit aggressive-indent epa-file epa rdictcc google-contacts-message google-contacts xml url-cache url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util google-oauth google-contacts-gnus gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems nnheader dired-x em-term term ehelp esh-opt esh-ext esh-util highlight-symbol boxquote rect ecomplete message rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader server yasnippet disp-table noutline outline pdf-occur ibuf-ext ibuffer tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local find-func cedet dired pdf-isearch let-alist pdf-misc imenu pdf-tools compile comint ansi-color cus-edit cus-start cus-load pdf-view bookmark pp jka-compr pdf-cache pdf-info tq pdf-util format-spec image-mode browse-kill-ring derived recentf tree-widget wid-edit expand-region text-mode-expansions er-basic-expansions expand-region-core expand-region-custom beacon seq highlight-parentheses easy-mmode cl iedit iedit-lib hydra lv counsel etags xref project swiper cap-words superword subword saveplace savehist paren ivy delsel ffap thingatpt url-parse auth-source eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core cl-macs gv gnus-util mm-util help-fns help-mode mail-prsvr password-cache url-vars icomplete mb-depth ace-window avy ring smart-mode-line-respectful-theme smart-mode-line-dark-theme cl-seq smart-mode-line rich-minority rx bs windmove elec-pair edmacro kmacro cl-loaddefs cl-lib subr-x pcase tsdh-dark-theme finder-inf memory-usage-autoloads advice info package easymenu epg-config time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 818216 119839) (symbols 48 60404 16) (miscs 40 525 1053) (strings 32 194650 65781) (string-bytes 1 6408650) (vectors 16 87142) (vector-slots 8 2026074 102176) (floats 8 1116 652) (intervals 56 8874 4719) (buffers 976 43) (heap 1024 110928 12933)) ------------=_1456163942-1523-1--