Skip to content

Commit

Permalink
Start fixing tramp completion user-error for emacs-24.4.
Browse files Browse the repository at this point in the history
* helm-files.el (helm-find-files-get-candidates): let-bind non-essential
* helm-utils.el: Comment tramp-dissect-file-name defadvice.
* helm.el: let-bind non-essential to t on helm startup.
  • Loading branch information
thierryvolpiatto committed Mar 28, 2013
1 parent c87dd9d commit 9521b78
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions helm-files.el
Expand Up @@ -1322,6 +1322,7 @@ purpose."
(file-name-as-directory path) (file-name-as-directory path)
(file-name-directory path))) (file-name-directory path)))
invalid-basedir invalid-basedir
non-essential
(tramp-verbose helm-tramp-verbose)) ; No tramp message when 0. (tramp-verbose helm-tramp-verbose)) ; No tramp message when 0.
(set-text-properties 0 (length path) nil path) (set-text-properties 0 (length path) nil path)
;; Issue #118 allow creation of newdir+newfile. ;; Issue #118 allow creation of newdir+newfile.
Expand Down
12 changes: 6 additions & 6 deletions helm-utils.el
Expand Up @@ -175,12 +175,12 @@ Return nil if DIR is not an existing directory."
concat (if p (concat "/" i) (concat i "/")) into root concat (if p (concat "/" i) (concat i "/")) into root
finally return (file-equal-p (file-truename root) f2))))))) finally return (file-equal-p (file-truename root) f2)))))))


(when (and (require 'tramp) ;; (when (and (require 'tramp)
(fboundp 'tramp-compat-user-error)) ;; (fboundp 'tramp-compat-user-error))
(defadvice tramp-dissect-file-name (around disable-user-error activate) ;; (defadvice tramp-dissect-file-name (around disable-user-error activate)
"Disable `user-error'." ;; "Disable `user-error'."
(flet ((tramp-compat-user-error (format &rest objects) nil)) ;; (flet ((tramp-compat-user-error (format &rest objects) nil))
ad-do-it))) ;; ad-do-it)))




;; CUA workaround ;; CUA workaround
Expand Down
1 change: 1 addition & 0 deletions helm.el
Expand Up @@ -1479,6 +1479,7 @@ ANY-KEYMAP ANY-DEFAULT ANY-HISTORY See `helm'."
;; #163 no cursor in minibuffer in <=Emacs-24.2. ;; #163 no cursor in minibuffer in <=Emacs-24.2.
;; This is not needed in emacs-24.3+ ;; This is not needed in emacs-24.3+
(cursor-in-echo-area t) (cursor-in-echo-area t)
(non-essential t)
(helm-maybe-use-default-as-input (helm-maybe-use-default-as-input
(or helm-maybe-use-default-as-input ; it is let-bounded so use it. (or helm-maybe-use-default-as-input ; it is let-bounded so use it.
(loop for s in (helm-normalize-sources any-sources) (loop for s in (helm-normalize-sources any-sources)
Expand Down

0 comments on commit 9521b78

Please sign in to comment.