[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/nonspecial-handlers 98ca7a4: Handle quoted file na
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] scratch/nonspecial-handlers 98ca7a4: Handle quoted file names in filenotify.el |
Date: |
Fri, 26 Jan 2018 07:12:24 -0500 (EST) |
branch: scratch/nonspecial-handlers
commit 98ca7a4c94bd89a7da25c30eceb357c81b83e98b
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Handle quoted file names in filenotify.el
* lisp/filenotify.el (file-notify-add-watch): Do not save
quoted file names in `file-notify-descriptors'.
* test/lisp/files-tests.el
(files-file-name-non-special-notify-handlers): Do not expect
to fail.
---
lisp/filenotify.el | 5 ++++-
test/lisp/files-tests.el | 2 --
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 562ac26..442dc89 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -307,7 +307,10 @@ FILE is the name of the file whose event is being
reported."
(unless (functionp callback)
(signal 'wrong-type-argument `(,callback)))
- (let* ((handler (find-file-name-handler file 'file-notify-add-watch))
+ (let* ((quoted (file-name-quoted-p file))
+ (file (file-name-unquote file))
+ (file-name-handler-alist (if quoted nil file-name-handler-alist))
+ (handler (find-file-name-handler file 'file-notify-add-watch))
(dir (directory-file-name
(if (file-directory-p file)
file
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index c4c8207..98a8f9a 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -339,14 +339,12 @@ be invoked with the right arguments."
(verify-visited-file-modtime nil))))))))
(ert-deftest files-file-name-non-special-notify-handlers ()
- :expected-result :failed
(files-tests--with-temp-file tmpfile
(let* ((nospecial (concat "/:" tmpfile))
(watch (file-notify-add-watch nospecial '(change) #'ignore)))
(should (file-notify-valid-p watch))
(file-notify-rm-watch watch))))
-
(ert-deftest files-file-name-non-special-handlers ()
(files-tests--with-temp-file tmpfile
(files-tests--with-temp-dir tmpdir
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] scratch/nonspecial-handlers 98ca7a4: Handle quoted file names in filenotify.el,
Michael Albinus <=