[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm d0468a6128 4/5: Add more log messages to inotify call
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm d0468a6128 4/5: Add more log messages to inotify callback |
Date: |
Tue, 20 Sep 2022 07:59:30 -0400 (EDT) |
branch: elpa/helm
commit d0468a61288506a8e1066bf0bf62fad6c9794f8e
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Add more log messages to inotify callback
---
helm-files.el | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/helm-files.el b/helm-files.el
index e1d591c67a..767b7c991f 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -3525,10 +3525,10 @@ in cache."
(defun helm-ff--inotify-make-callback (directory)
"Return a callback for `file-notify-add-watch'."
(lambda (event)
- (let ((desc (cadr event))
+ (let (watch
+ (desc (cadr event))
(target directory)) ; Either truename or directory.
- (when helm-debug
- (helm-log "Inotify callback" "Event %S called on %S" event directory))
+ (helm-log "Inotify callback" "Event %S called on %S" event directory)
;; `attribute-changed' means permissions have changed, not
;; file modifications like file changes, visit
;; etc... AFAIU the desc for this is `changed' and for our
@@ -3545,10 +3545,15 @@ in cache."
(setq helm-ff--list-directory-links
(delete it helm-ff--list-directory-links))))
;; When TARGET is modified remove it from cache.
+ (helm-log "Inotify callback"
+ "Removing %S from `helm-ff--list-directory-cache'" target)
(remhash target helm-ff--list-directory-cache)
;; Remove watch as well in case of rename or delete.
- (file-notify-rm-watch (gethash target helm-ff--file-notify-watchers))
- (remhash target helm-ff--file-notify-watchers)))))
+ (helm-log "Inotify callback"
+ "Removing %S from `helm-ff--file-notify-watchers'" target)
+ (setq watch (gethash target helm-ff--file-notify-watchers))
+ (remhash target helm-ff--file-notify-watchers)
+ (file-notify-rm-watch watch)))))
(defun helm-ff-tramp-cleanup-hook (vec)
"Remove remote directories related to VEC in helm-ff* caches.
- [nongnu] elpa/helm updated (d1a4c6eee7 -> 0c12230b4f), ELPA Syncer, 2022/09/20
- [nongnu] elpa/helm d0468a6128 4/5: Add more log messages to inotify callback,
ELPA Syncer <=
- [nongnu] elpa/helm a217591623 2/5: Incompatible changes: Change helm-log signature., ELPA Syncer, 2022/09/20
- [nongnu] elpa/helm 0c12230b4f 5/5: Disable helm-debug when quitting helm, ELPA Syncer, 2022/09/20
- [nongnu] elpa/helm b0d2bac7d4 1/5: Some more commentaries, no code change, ELPA Syncer, 2022/09/20
- [nongnu] elpa/helm 895a065515 3/5: Remove saving log to directory which prevent logging from elsewhere, ELPA Syncer, 2022/09/20