From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: auto-revert error on macOS when auto-revert-use-notify is t Date: Sun, 21 Jan 2018 20:16:46 +0000 Message-ID: <20180121201646.GA47260@breton.holly.idiocy.org> References: <87po6xvom5.fsf@gmx.de> <83r2rdg7u3.fsf@gnu.org> <87vagkjswm.fsf@gmx.de> <874lngfssx.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1516565707 20025 195.159.176.226 (21 Jan 2018 20:15:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 21 Jan 2018 20:15:07 +0000 (UTC) User-Agent: Mutt/1.9.1 (2017-09-22) Cc: Eli Zaretskii , "emacs-devel@gnu.org" , zhang cc To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 21 21:15:03 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edM14-0004eD-2u for ged-emacs-devel@m.gmane.org; Sun, 21 Jan 2018 21:14:58 +0100 Original-Received: from localhost ([::1]:47225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edM34-0003Nx-96 for ged-emacs-devel@m.gmane.org; Sun, 21 Jan 2018 15:17:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edM2x-0003Nj-N2 for emacs-devel@gnu.org; Sun, 21 Jan 2018 15:16:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edM2w-0002su-Kr for emacs-devel@gnu.org; Sun, 21 Jan 2018 15:16:55 -0500 Original-Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:33921) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edM2v-0002qa-0q; Sun, 21 Jan 2018 15:16:53 -0500 Original-Received: by mail-wm0-x231.google.com with SMTP id j21so6174268wmh.1; Sun, 21 Jan 2018 12:16:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=C5QKpatKXGEZQFrVpzBFQNeBEaJWYH4KfUcTEkDfDB0=; b=CyLfiDN8MrYXrk5QJpDvsVTK8K2NaDTKnljwmswhZzBDdLfUO8ZK3i2hIz8sk07DHH U8UtCLcAe7NwAxE7q+tsLXcKxfkGLqh8auoyz4zRsOuBVlZa3Uhj26EdHK9TTvWBzoy8 Lf27gpZ9PyZ7tZF382F+P+pX6/3h+For0jS36cwES3kq35MldJ+Aa7TVFDWUn7Uno9LN 06GGTdgQ/pJ0szhUcDcMKPjZGN3f+IiIWlcJWUEHTVQws6iZivF6VvXxEnWevnuqt4f/ FLsi9AHx6jrL3n8dQKvDJ0XlDI+eviY2jlpYC9tlnsnxGfKvMeMmZ/SsUPekiY+a2NDe wOOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=C5QKpatKXGEZQFrVpzBFQNeBEaJWYH4KfUcTEkDfDB0=; b=iALNdd0MXWzki4XO0cU0wSQGOvF7KCkgVygaulPUONtslQW0UGgvkloRhn0k61WJTL nhJq/x99DNZQdHHWzYISbeqCjgs6uHzW+XtkCDa3aK+mxBxgZuF0u1cNfukcbXchjFX1 tiLT6Aq9HhB/OSXstr3DU7OfkJuoJrLTuWGqDpQqJoi6yepGhBhSdeFgI/4QgMXx7Z5c my2ZaOC0H+obGVH0EfHkjEHblr36voIKcm1cYlmj7DAVyxMnZFufpzOqRuVI6IHtcEUO lXHQMvphl/eRyl6a5KZQOEcmdCuf/JMf/5PsxJVFTGHqfCnLzYbdrrCZltdVHIhN7jQg tidA== X-Gm-Message-State: AKwxytelakIjn2kX0GbHaFQoQh8zNwwk3JSZRyM9ltClCIpAObvGlFAT OKf5H+cIO7bYwBaVb+JTDU0= X-Google-Smtp-Source: AH8x227uHAHbhzDrwP7kcVVtykRZBg7LnJTgoR2VZKV3dri5RYAbR5Z34QpI9BFvv4rn+usQpNDtNg== X-Received: by 10.28.1.73 with SMTP id 70mr1603475wmb.49.1516565810586; Sun, 21 Jan 2018 12:16:50 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-e189-7066-bb8d-c785.holly.idiocy.org. [2001:8b0:3f8:8129:e189:7066:bb8d:c785]) by smtp.gmail.com with ESMTPSA id z18sm7207751wrh.33.2018.01.21.12.16.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Jan 2018 12:16:48 -0800 (PST) Content-Disposition: inline In-Reply-To: <874lngfssx.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222128 Archived-At: On Sat, Jan 20, 2018 at 04:34:06PM +0100, Michael Albinus wrote: > > I've pushed a patch to the master branch. It recreates a file > notification in autorevert, if a file was deleted and recreated > afterwards. > > Since autorevert watches directories, the solution was simpler than > expected. The `create' event for the file from the directory is a > perfect trigger. > > Could you, pls, check whether it works for you? I have extended the > `auto-revert-test02-auto-revert-deleted-file', which runs OK in my > environment. Testing on macOS (kqueue) is not possible for me. Hi Michael, The autorevert test fails on macOS for me: Running 8 tests (2018-01-21 20:06:51+0000) Library: `kqueue' passed 1/8 file-notify-test00-availability passed 2/8 file-notify-test01-add-watch passed 3/8 file-notify-test02-rm-watch passed 4/8 file-notify-test03-events Reverting buffer `file-notify-test5Qh30O'. Test file-notify-test04-autorevert backtrace: signal(ert-test-failed (((should-not auto-revert-use-notify) :form a ert-fail(((should-not auto-revert-use-notify) :form auto-revert-use- (if (not (unwind-protect (setq value-208 auto-revert-use-notify) (se (let (form-description-209) (if (not (unwind-protect (setq value-208 (let ((value-208 (gensym "ert-form-evaluation-aborted-"))) (let (for (save-current-buffer (set-buffer buf) (let* ((fn-189 (function strin (progn (advice-add 'vc-refresh-state :around 'ignore) (setq file-not (unwind-protect (progn (advice-add 'vc-refresh-state :around 'ignore (let ((timeout (if (file-remote-p temporary-file-directory) 60 10)) (closure (t) nil (let* ((fn-184 (function file-notify--test-local-en ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name file-notify-test04-autorevert :docume ert-run-or-rerun-test(#s(ert--stats :selector (not (or (tag :expensi ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable))) ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) ( command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/filenotify-tests.el" command-line() normal-top-level() Test file-notify-test04-autorevert condition: (ert-test-failed ((should-not auto-revert-use-notify) :form auto-revert-use-notify :value t)) FAILED 5/8 file-notify-test04-autorevert passed 6/8 file-notify-test05-file-validity passed 7/8 file-notify-test06-dir-validity passed 8/8 file-notify-test08-backup Ran 8 tests, 7 results as expected, 1 unexpected (2018-01-21 20:07:14+0000) 1 unexpected results: FAILED file-notify-test04-autorevert -- Alan Third