@@ -850,27 +850,13 @@ directories belonging to each visible windows."
850
850
nil )))
851
851
852
852
(defcustom helm-ff-use-notify t
853
- " Control watching and caching directories visited with `helm-find-files' .
854
-
855
- When `t' watch and cache directories.
856
- When `nil' stop watching directories but continue caching directories.
857
- Any other value disable watching directories and disable caching as well.
858
-
853
+ " Watch directories visited with `helm-find-files' when non nil.
859
854
If your system have no file notification package available turn this
860
- to nil or 0 to avoid error messages when using `helm-find-files' .
861
-
862
- You can also disable watching and caching in specific tramp methods by settings
863
- `helm-ff-incompatible-notify-methods' , in this case no need to modify default
864
- setting of `helm-ff-use-notify' .
865
-
866
- Warning: Do not use `setq' to set this variable."
867
- :type '(radio
868
- (const :tag " Enable watching and caching directories" t )
869
- (const :tag " Disable watching only" nil )
870
- (const :tag " Disable watching and caching" 0 ))
855
+ to nil to avoid error messages when using `helm-find-files' ."
856
+ :type 'boolean
871
857
:set (lambda (var val )
872
858
(set-default var val)
873
- (unless (eq ( symbol-value var) t )
859
+ (unless (symbol-value var)
874
860
(cl-loop for dir being the hash-keys of helm-ff--file-notify-watchers
875
861
do (remhash dir helm-ff--list-directory-cache)))))
876
862
@@ -3802,11 +3788,6 @@ later in the transformer."
3802
3788
; ; watcher ring on the truename remove the symlinked directory from cache.
3803
3789
(defvar helm-ff--list-directory-links nil )
3804
3790
3805
- (defvar helm-ff-incompatible-notify-methods nil
3806
- " Tramp methods incompatible with (i)notify.
3807
- When `helm-find-files' visit a directory with one of those methods, it stops
3808
- using the cache and setting a watcher in this directory." )
3809
-
3810
3791
(defun helm-ff-directory-files (directory &optional force-update )
3811
3792
" List contents of DIRECTORY.
3812
3793
Argument FULL mean absolute path.
@@ -3817,17 +3798,13 @@ When FORCE-UPDATE is non nil recompute candidates even if DIRECTORY is
3817
3798
in cache."
3818
3799
(let* ((method (file-remote-p directory 'method ))
3819
3800
(dfn (directory-file-name directory))
3820
- (truename (and (file-symlink-p dfn) (file-truename dfn)))
3821
- (tramp-compatible (not (member (file-remote-p directory 'method )
3822
- helm-ff-incompatible-notify-methods))))
3801
+ (truename (and (file-symlink-p dfn) (file-truename dfn))))
3823
3802
(setq directory (file-name-as-directory
3824
3803
(expand-file-name directory)))
3825
3804
(when truename
3826
3805
(cl-pushnew (cons truename directory)
3827
3806
helm-ff--list-directory-links :test 'equal ))
3828
3807
(or (and (not force-update)
3829
- (booleanp helm-ff-use-notify)
3830
- tramp-compatible
3831
3808
(gethash directory helm-ff--list-directory-cache))
3832
3809
(let* (file-error
3833
3810
(ls (condition-case err
@@ -3852,16 +3829,13 @@ in cache."
3852
3829
watcher)
3853
3830
(puthash directory (+ (length ls) 2 ) helm-ff--directory-files-length)
3854
3831
(prog1
3855
- (let ((lst (cl-loop for f in candidates
3856
- when (helm-ff-filter-candidate-one-by-one f)
3857
- collect it)))
3858
- (if tramp-compatible
3859
- (puthash directory lst helm-ff--list-directory-cache)
3860
- lst))
3832
+ (puthash directory
3833
+ (cl-loop for f in candidates
3834
+ when (helm-ff-filter-candidate-one-by-one f)
3835
+ collect it)
3836
+ helm-ff--list-directory-cache)
3861
3837
; ; Put an inotify watcher to check directory modifications.
3862
3838
(unless (or (null helm-ff-use-notify)
3863
- (not (booleanp helm-ff-use-notify))
3864
- (not tramp-compatible)
3865
3839
(member method helm-ff-inotify-unsupported-methods)
3866
3840
(helm-aand (setq watcher (gethash
3867
3841
directory
0 commit comments