diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2018-06-25 13:25:34 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2018-06-25 13:29:41 +0200 |
commit | 45652879f925b1af1a84136fa280ecfe85a677e4 (patch) | |
tree | 2c679166c17429b7818a7bf7768f0b7c43287b30 | |
parent | c4c3bb419543cfbad6abd30e79dc63cd9197e0d5 (diff) |
Remove helm-ff-tramp-not fancy
* helm-files.el:
(helm-ff-filter-candidate-one-by-one): Do it.
* helm-for-files.el (helm-for-files-tramp-not-fancy): New.
(helm-highlight-files): Use it.
* helm-help.el (helm-ff-help-message): Update.
-rw-r--r-- | helm-files.el | 29 | ||||
-rw-r--r-- | helm-for-files.el | 11 | ||||
-rw-r--r-- | helm-help.el | 6 |
3 files changed, 15 insertions, 31 deletions
diff --git a/helm-files.el b/helm-files.el index 0bff9bf4..25237446 100644 --- a/helm-files.el +++ b/helm-files.el @@ -97,19 +97,6 @@ See `helm-ff--transform-pattern-for-completion' for more info." :group 'helm-files :type 'boolean) -(defcustom helm-ff-tramp-not-fancy 'dirs-only - "Colorize remote files when non nil. - -When 'dirs-only is passed as value (default) only directories are -shown. - -Be aware that a nil value will make tramp display very slow." - :group 'helm-files - :type '(choice - (const :tag "Show directories only" dirs-only) - (const :tag "No colors" t) - (const :tag "Colorize all" nil))) - (defcustom helm-ff-exif-data-program "exiftran" "Program used to extract exif data of an image file." :group 'helm-files @@ -2820,8 +2807,7 @@ Return candidates prefixed with basename of `helm-input' first." ;; Handle tramp files with minimal highlighting. (if (and (or (string-match-p helm-tramp-file-name-regexp helm-pattern) - (helm-file-on-mounted-network-p helm-pattern)) - helm-ff-tramp-not-fancy) + (helm-file-on-mounted-network-p helm-pattern))) (let ((disp (if (and helm-ff-transformer-show-only-basename (not (setq dot (helm-dir-is-dot file)))) (or (helm-ff--get-host-from-tramp-invalid-fname file) @@ -2834,20 +2820,15 @@ Return candidates prefixed with basename of `helm-input' first." ;; Keep it though in case they fix this upstream... (setq disp (replace-regexp-in-string "[[:cntrl:]]" "?" disp)) (cond (;; Dot directories . and .. - dot (if (eq helm-ff-tramp-not-fancy 'dirs-only) - (propertize file 'face 'helm-ff-dotted-directory) - file)) + dot (propertize file 'face 'helm-ff-dotted-directory)) ;; Directories. - ((and (get-text-property 1 'helm-ff-dir file) - (eq helm-ff-tramp-not-fancy 'dirs-only)) + ((get-text-property 1 'helm-ff-dir file) (cons (propertize disp 'face 'helm-ff-directory) file)) ;; Executable files. - ((and (get-text-property 1 'helm-ff-exe file) - (eq helm-ff-tramp-not-fancy 'dirs-only)) + ((get-text-property 1 'helm-ff-exe file) (cons (propertize disp 'face 'helm-ff-executable) file)) ;; Symlinks. - ((and (get-text-property 1 'helm-ff-sym file) - (eq helm-ff-tramp-not-fancy 'dirs-only)) + ((get-text-property 1 'helm-ff-sym file) (cons (propertize disp 'face 'helm-ff-symlink) file)) ;; Any other files. (t (cons (propertize disp 'face 'helm-ff-file) file)))) diff --git a/helm-for-files.el b/helm-for-files.el index 47db4e51..c259704d 100644 --- a/helm-for-files.el +++ b/helm-for-files.el @@ -40,6 +40,13 @@ this source is accessible and properly loaded." :type '(repeat (choice symbol)) :group 'helm-files) +(defcustom helm-for-files-tramp-not-fancy t + "Colorize remote files when non nil. + +Be aware that a nil value will make tramp display very slow." + :group 'helm-files + :type 'boolean) + ;;; File Cache ;; ;; @@ -165,10 +172,10 @@ Colorize only symlinks, directories and files." (helm-file-on-mounted-network-p i)) ;; Call file-attributes only if: ;; - file is not remote - ;; - helm-ff-tramp-not-fancy is nil and file is remote AND + ;; - helm-for-files--tramp-not-fancy is nil and file is remote AND ;; connected. (Issue #1679) for type = (and (or (null isremote) - (and (null helm-ff-tramp-not-fancy) + (and (null helm-for-files-tramp-not-fancy) (file-remote-p i nil t))) (car (file-attributes i))) collect diff --git a/helm-help.el b/helm-help.el index c3dcb661..3d40403f 100644 --- a/helm-help.el +++ b/helm-help.el @@ -713,10 +713,6 @@ Of course the alias command should support this. `helm-find-files' works fine with TRAMP despite some limitations. -- By default filenames are not highlighted when working on remote directories, -this is controled by `helm-ff-tramp-not-fancy' variable. If you change this, -expect Helm to be very slow unless your connection is super fast. - - Grepping files is not very well supported when used incrementally. See [[Grepping on remote files]]. @@ -762,7 +758,7 @@ external commands i.e. ls+awk if your system have these commands \(common by default on all Linux systems). For this you can use `helm-list-dir-external' as value for `helm-list-directory-function'. -Related variables are `helm-list-directory-function' and `helm-ff-tramp-not-fancy'. +See `helm-list-directory-function' documentation for more infos. **** Completing host |