private/hlissner: don't look into .authinfo.gpg for sudo tramp buffers
This commit is contained in:
parent
7f4b7f6ca7
commit
a1eca7f801
1 changed files with 6 additions and 0 deletions
|
@ -15,6 +15,12 @@
|
||||||
epa-file-encrypt-to user-mail-address
|
epa-file-encrypt-to user-mail-address
|
||||||
auth-sources (list (expand-file-name ".authinfo.gpg" +hlissner-dir)))
|
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
|
;; 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
|
;; right side of the frame (which causes display glitches). Cycling fullscreen
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue