unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Zhang Haijun <ccsmile2008@outlook.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: "35418@debbugs.gnu.org" <35418@debbugs.gnu.org>
Subject: bug#35418: [PATCH] Don't poll auto-revert files that use notification
Date: Wed, 1 May 2019 03:10:20 +0000	[thread overview]
Message-ID: <PS1PR06MB27599C7431569C1C70878550A83B0@PS1PR06MB2759.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <PS1PR06MB2759E0D8B6B8202E2728FC3CA83B0@PS1PR06MB2759.apcprd06.prod.outlook.com>

If both file watching and directory watching are used for one file, it will works for all use cases.

> 在 2019年5月1日,上午10:59,张海君 <ccsmile2008@outlook.com> 写道:
> 
> I haven’t run the test before. It seems that directory watching doesn’t work for file content only change. But it works for many common use cases while file watching doesn’t work.
> 
> 1. Use vim to modify the file and save. It seems that vim will write to a temp file, then remove the original file and then rename the temp file to original file name.
> 2. Use git to switch branch.
> 3. For files in a soft link directory.
> 
> So directory watching is much more usefull for me than file watching in everyday use. 
> 
> 
> 
>> 在 2019年5月1日,上午10:15,张海君 <ccsmile2008@outlook.com> 写道:
>> 
>> 
>>> I don't understand the patch. Symbol kqueue11 does not exist, so do you mean
>>> 
>>> +                  func dir
>> Yes.
>> 
>>> 
>>> And have you applied the tests in filenotify-tests.el? Do all of them pass?
>>> 
>>> Best regards, Michael.
>> 
>> $ make -C test autorevert-tests
>> ELC      lisp/autorevert-tests.elc
>> GEN      lisp/autorevert-tests.log
>> Running 5 tests (2019-05-01 10:06:38+0800)
>> Reverting buffer `auto-revert-testqe4qed'.
>> passed  1/5  auto-revert-test00-auto-revert-mode
>> (Shell command succeeded with no output)
>> Test auto-revert-test01-auto-revert-several-files backtrace:
>> signal(ert-test-failed (((should (string-match "another text" (buffe
>> ert-fail(((should (string-match "another text" (buffer-string))) :fo
>> (if (unwind-protect (setq value-40 (apply fn-38 args-39)) (setq form
>> (let (form-description-42) (if (unwind-protect (setq value-40 (apply
>> (let ((value-40 (quote ert-form-evaluation-aborted-41))) (let (form-
>> (let* ((fn-38 (function string-match)) (args-39 (condition-case err
>> (save-current-buffer (set-buffer buf) (auto-revert--wait-for-revert
>> (while --dolist-tail-- (setq buf (car --dolist-tail--)) (save-curren
>> (let ((--dolist-tail-- (list buf1 buf2)) buf) (while --dolist-tail--
>> (progn (write-region "any text" nil tmpfile1 nil (quote no-message))
>> (unwind-protect (progn (write-region "any text" nil tmpfile1 nil (qu
>> (let* ((auto-revert--messages "") (g30 (function (lambda (msg) (setq
>> (unwind-protect (let* ((auto-revert--messages "") (g30 (function (la
>> (let* ((cp (executable-find "cp")) (tmpdir1 (make-temp-file "auto-re
>> (lambda nil (let* ((fn-23 (function executable-find)) (args-24 (cond
>> ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
>> ert-run-test(#s(ert-test :name auto-revert-test01-auto-revert-severa
>> ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :unstable))
>> ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type
>> ert-run-tests-batch((not (tag :unstable)))
>> ert-run-tests-batch-and-exit((not (tag :unstable)))
>> eval((ert-run-tests-batch-and-exit (quote (not (tag :unstable)))))
>> command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/autorevert-tests.el"
>> command-line()
>> normal-top-level()
>> Test auto-revert-test01-auto-revert-several-files condition:
>>  (ert-test-failed
>>   ((should
>>     (string-match "another text"
>>                   (buffer-string)))
>>    :form
>>    (string-match "another text" "any text")
>>    :value nil))
>> FAILED  2/5  auto-revert-test01-auto-revert-several-files
>> Reverting buffer `auto-revert-test49vRly'.
>> Reverting buffer `auto-revert-test49vRly'.
>> Reverting buffer `auto-revert-test49vRly'.
>> passed  3/5  auto-revert-test02-auto-revert-deleted-file
>> Reverting buffer `auto-revert-testvVIyEY'.
>> passed  4/5  auto-revert-test03-auto-revert-tail-mode
>> ls does not support --dired; see `dired-use-ls-dired' for more details.
>> Reverting buffer `T'.
>> Reverting buffer `T'.
>> passed  5/5  auto-revert-test04-auto-revert-mode-dired
>> 
>> Ran 5 tests, 4 results as expected, 1 unexpected (2019-05-01 10:07:23+0800)
>> 
>> 1 unexpected results:
>> FAILED  auto-revert-test01-auto-revert-several-files
>> 
>> make[1]: *** [lisp/autorevert-tests.log] Error 1
>> make: *** [lisp/autorevert-tests] Error 2
>> 
> 


  reply	other threads:[~2019-05-01  3:10 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 18:14 bug#35418: [PATCH] Don't poll auto-revert files that use notification Mattias Engdegård
2019-04-24 18:58 ` Eli Zaretskii
2019-04-24 19:36   ` Michael Albinus
2019-04-26 20:46     ` Mattias Engdegård
2019-04-27  9:40       ` Michael Albinus
2019-04-27 16:28         ` Mattias Engdegård
2019-04-25  9:56   ` Mattias Engdegård
2019-04-25 10:04     ` Eli Zaretskii
2019-04-25 18:07       ` Mattias Engdegård
2019-04-27  9:27       ` Michael Albinus
2019-04-27  9:54         ` Eli Zaretskii
2019-04-27 10:23           ` Michael Albinus
2019-04-27 16:19         ` Mattias Engdegård
2019-04-27 16:52           ` Eli Zaretskii
2019-04-28 10:21             ` Mattias Engdegård
2019-04-29  7:53               ` Michael Albinus
2019-04-29 11:06                 ` Mattias Engdegård
2019-04-29 12:18                   ` Michael Albinus
2019-04-29 16:24                     ` Eli Zaretskii
2019-04-29 18:29                     ` Mattias Engdegård
2019-04-29 20:17                       ` Michael Albinus
2019-04-30  3:57                         ` Eli Zaretskii
2019-04-30 11:41                           ` Mattias Engdegård
2019-04-30 12:59                             ` Michael Albinus
2019-04-30 13:56                               ` Mattias Engdegård
2019-04-30 14:19                                 ` Michael Albinus
2019-04-29 16:23                   ` Eli Zaretskii
2019-04-29 19:21                     ` Mattias Engdegård
2019-04-29 19:56                       ` Michael Albinus
2019-04-30 21:09                     ` Mattias Engdegård
2019-05-01 17:45                       ` Eli Zaretskii
2019-05-01 19:41                         ` Mattias Engdegård
2019-05-02 12:18                           ` Michael Albinus
2019-05-02 12:53                             ` Mattias Engdegård
2019-05-02 13:02                               ` Michael Albinus
2019-05-03 12:00                                 ` Mattias Engdegård
2019-05-03 13:44                               ` Eli Zaretskii
2019-05-03 14:47                                 ` Mattias Engdegård
2019-05-04  9:04                                   ` Eli Zaretskii
2019-05-04 11:21                                     ` Mattias Engdegård
2019-05-04 13:41                                       ` Eli Zaretskii
2019-05-04 16:53                                       ` Michael Albinus
2019-05-04 17:08                                         ` Eli Zaretskii
2019-05-04 18:50                                         ` Mattias Engdegård
2019-05-04 19:43                                           ` Michael Albinus
2019-05-04 20:31                                             ` Michael Albinus
2019-05-04 20:46                                               ` Mattias Engdegård
2019-05-05  8:22                                                 ` Michael Albinus
2019-05-05  9:58                                                   ` Mattias Engdegård
2019-05-08  8:34                                                     ` Mattias Engdegård
2019-05-08  8:47                                                       ` Eli Zaretskii
2019-05-08 10:18                                                         ` Mattias Engdegård
2019-05-08 10:58                                                           ` Eli Zaretskii
2019-05-08 11:48                                                             ` Mattias Engdegård
2019-05-08 12:35                                                               ` Eli Zaretskii
2019-05-08 12:58                                                                 ` Mattias Engdegård
2019-05-08 13:09                                                                   ` Michael Albinus
2019-05-08 13:28                                                                   ` Eli Zaretskii
2019-05-08 14:13                                                                     ` Mattias Engdegård
2019-05-08 17:24                                                                       ` Eli Zaretskii
2019-05-08 18:17                                                                         ` Michael Albinus
2019-05-09 11:50                                                               ` Michael Albinus
2019-05-10 15:22                                                                 ` Mattias Engdegård
2019-05-12  8:48                                                                   ` Michael Albinus
2019-05-12 19:49                                                                     ` Mattias Engdegård
2019-05-13 13:35                                                                       ` Michael Albinus
2019-05-14 12:41                                                                         ` Mattias Engdegård
2019-05-14 14:52                                                                           ` Michael Albinus
2019-05-08 10:23                                                       ` Mattias Engdegård
2019-05-09 10:00                                                     ` Mattias Engdegård
2019-05-09 10:48                                                       ` Eli Zaretskii
2019-05-09 11:15                                                         ` Mattias Engdegård
2019-05-10  9:49                                                       ` Michael Albinus
2019-05-10 12:27                                                         ` Mattias Engdegård
2019-05-10 12:43                                                           ` Michael Albinus
2019-05-13 11:34                                                             ` Mattias Engdegård
2019-05-13 15:08                                                               ` Michael Albinus
2019-05-18 17:39                                                                 ` Mattias Engdegård
2019-05-19  9:12                                                                   ` Michael Albinus
2019-05-19 20:25                                                                     ` Mattias Engdegård
2019-05-20  7:30                                                                       ` Michael Albinus
2019-05-20 19:19                                                                         ` Mattias Engdegård
2019-04-29  7:19           ` Michael Albinus
2019-04-29 11:54             ` Mattias Engdegård
2019-04-29 12:26               ` Michael Albinus
2019-04-29 18:58                 ` Mattias Engdegård
2019-04-29 20:04                   ` Michael Albinus
2019-04-30 15:14                   ` Eli Zaretskii
2019-04-24 19:59 ` Michael Albinus
2019-04-25  9:58   ` Mattias Engdegård
2019-04-25 11:04     ` Michael Albinus
2019-04-25 15:22       ` Mattias Engdegård
2019-04-30  1:03 ` Zhang Haijun
2019-04-30  7:06   ` Michael Albinus
2019-05-01  2:17     ` Zhang Haijun
2019-05-01  2:59       ` Zhang Haijun
2019-05-01  3:10         ` Zhang Haijun [this message]
2019-05-02 12:30           ` Michael Albinus
2019-05-02 13:24             ` Zhang Haijun
2019-05-02 12:28         ` Michael Albinus
2019-05-02 12:24       ` Michael Albinus

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=PS1PR06MB27599C7431569C1C70878550A83B0@PS1PR06MB2759.apcprd06.prod.outlook.com \
    --to=ccsmile2008@outlook.com \
    --cc=35418@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).