emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c3a7693: Adapt tramp-sudoedit.el for better testing


From: Michael Albinus
Subject: master c3a7693: Adapt tramp-sudoedit.el for better testing
Date: Mon, 26 Jul 2021 03:55:43 -0400 (EDT)

branch: master
commit c3a76935fa63b0cb2c25f7ecbcd5402b4fb2ef7e
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Adapt tramp-sudoedit.el for better testing
    
    * doc/misc/tramp.texi (Bug Reports): Revert last change.  Mention
    exception for sudoedit.
    
    * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command):
    Let-bind `tramp-cache-read-persistent-data' for better password handling.
---
 doc/misc/tramp.texi        | 13 +++----------
 lisp/net/tramp-sudoedit.el |  3 +++
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 17302dd..5672648 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -4255,16 +4255,9 @@ test, @ref{Cleanup remote connections}.  Alternatively, 
and often
 better for analysis, reproduce the problem in a clean Emacs session
 started with @command{emacs -Q}.  Then, @value{tramp} does not load
 the persistency file (@pxref{Connection caching}), and it does not use
-passwords from @file{auth-source.el} (@pxref{Password handling}).  If
-you really need a password cache, for example for the
-@option{sudoedit} method, call
-
-@smallexample
-emacs -Q -l tramp \
-  --eval '(setq tramp-cache-read-persistent-data t)' \
-  --eval '(tramp-cleanup-all-connections)'
-@end smallexample
-
+passwords from @file{auth-source.el} (@pxref{Password handling}).  The
+latter does not happen for the @option{sudoedit} method, otherwise it
+would be unusable.
 
 When including @value{tramp}'s messages in the bug report, increase
 the verbosity level to 6 (@pxref{Traces and Profiles, Traces}) in the
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index e4d90dd..5895f1d 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -817,6 +817,9 @@ in case of error, t otherwise."
                      (tramp-compat-flatten-tree args))))
           ;; We suppress the messages `Waiting for prompts from remote shell'.
           (tramp-verbose (if (= tramp-verbose 3) 2 tramp-verbose))
+          ;; The password shall be cached also in case of "emacs -Q".
+          ;; See `tramp-process-actions'.
+          (tramp-cache-read-persistent-data t)
           ;; We do not want to save the password.
           auth-source-save-behavior)
       (tramp-message vec 6 "%s" (string-join (process-command p) " "))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]