diff --git a/modules/private/hlissner/config.el b/modules/private/hlissner/config.el index 62a791472..805fc0979 100644 --- a/modules/private/hlissner/config.el +++ b/modules/private/hlissner/config.el @@ -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