From a1eca7f801c3931350af25216ca12071cb697e13 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 28 Apr 2017 01:56:10 -0400 Subject: [PATCH] private/hlissner: don't look into .authinfo.gpg for sudo tramp buffers --- modules/private/hlissner/config.el | 6 ++++++ 1 file changed, 6 insertions(+) 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