From: Michael Albinus Date: Fri, 26 Jan 2018 10:57:41 +0000 (+0100) Subject: Handle quoted file names in filenotify.el X-Git-Tag: emacs-26.1.91~10 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=08840f2f7bfc6144bd163dd85efe87d28541e425;p=emacs.git 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. --- diff --git a/lisp/filenotify.el b/lisp/filenotify.el index 08a6f6efb65..101ddb6be09 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