Skip to content

Commit a8a2de5

Browse files
Revert all recent changes about emacs-helm#2668
1 parent a8b8d74 commit a8a2de5

File tree

1 file changed

+10
-36
lines changed

1 file changed

+10
-36
lines changed

helm-files.el

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -850,27 +850,13 @@ directories belonging to each visible windows."
850850
nil)))
851851

852852
(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.
859854
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
871857
:set (lambda (var val)
872858
(set-default var val)
873-
(unless (eq (symbol-value var) t)
859+
(unless (symbol-value var)
874860
(cl-loop for dir being the hash-keys of helm-ff--file-notify-watchers
875861
do (remhash dir helm-ff--list-directory-cache)))))
876862

@@ -3802,11 +3788,6 @@ later in the transformer."
38023788
;; watcher ring on the truename remove the symlinked directory from cache.
38033789
(defvar helm-ff--list-directory-links nil)
38043790

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-
38103791
(defun helm-ff-directory-files (directory &optional force-update)
38113792
"List contents of DIRECTORY.
38123793
Argument FULL mean absolute path.
@@ -3817,17 +3798,13 @@ When FORCE-UPDATE is non nil recompute candidates even if DIRECTORY is
38173798
in cache."
38183799
(let* ((method (file-remote-p directory 'method))
38193800
(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))))
38233802
(setq directory (file-name-as-directory
38243803
(expand-file-name directory)))
38253804
(when truename
38263805
(cl-pushnew (cons truename directory)
38273806
helm-ff--list-directory-links :test 'equal))
38283807
(or (and (not force-update)
3829-
(booleanp helm-ff-use-notify)
3830-
tramp-compatible
38313808
(gethash directory helm-ff--list-directory-cache))
38323809
(let* (file-error
38333810
(ls (condition-case err
@@ -3852,16 +3829,13 @@ in cache."
38523829
watcher)
38533830
(puthash directory (+ (length ls) 2) helm-ff--directory-files-length)
38543831
(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)
38613837
;; Put an inotify watcher to check directory modifications.
38623838
(unless (or (null helm-ff-use-notify)
3863-
(not (booleanp helm-ff-use-notify))
3864-
(not tramp-compatible)
38653839
(member method helm-ff-inotify-unsupported-methods)
38663840
(helm-aand (setq watcher (gethash
38673841
directory

0 commit comments

Comments
 (0)