private/hlissner: don't look into .authinfo.gpg for sudo tramp buffers

This commit is contained in:
Henrik Lissner 2017-04-28 01:56:10 -04:00
parent 7f4b7f6ca7
commit a1eca7f801

View file

@ -15,6 +15,12 @@
epa-file-encrypt-to user-mail-address
auth-sources (list (expand-file-name ".authinfo.gpg" +hlissner-dir)))
(defun +hlissner*no-authinfo-for-tramp (orig-fn &rest args)
"Don't look into .authinfo for local sudo TRAMP buffers."
(let ((auth-sources (if (equal tramp-current-method "sudo") nil auth-sources)))
(apply orig-fn args)))
(advice-add #'tramp-read-passwd :around #'+hlissner*no-authinfo-for-tramp)
;; On Arch, bspwm is my window manager. When I open GUI Emacs a gap forms on the
;; right side of the frame (which causes display glitches). Cycling fullscreen