diff --git a/jupyter-rest-api.el b/jupyter-rest-api.el index ac4c4027..ccabb6f2 100644 --- a/jupyter-rest-api.el +++ b/jupyter-rest-api.el @@ -532,8 +532,9 @@ slot of CLIENT and restore the AUTH slot on failure." &optional passwd) "Authenticate CLIENT by asking for a password. If PASSWD is provided it must be a function that takes zero -arguments. It will be called before each authentication attempt. -If CLIENT could not be authenticated raise an error." +arguments and returns a password, it defaults to a call to +`read-passwd'. It will be called before each authentication +attempt. If CLIENT could not be authenticated raise an error." (or (functionp passwd) (setq passwd (lambda () (read-passwd (format "Password [%s]: " (oref client url)))))) diff --git a/jupyter-tramp.el b/jupyter-tramp.el index b66dc5c4..cbe49feb 100644 --- a/jupyter-tramp.el +++ b/jupyter-tramp.el @@ -312,10 +312,9 @@ fails." (jupyter-api-authenticate client 'password (let ((remote (file-remote-p filename))) - (lambda (try) + (lambda () (jupyter-tramp-read-passwd - filename (unless (zerop try) - (format "Password for %s " remote)))))))))))))) + filename (format "Password [%s]: " remote))))))))))))) ;;; Getting information about file models