(process-put p 'adjust-window-size-function #'ignore)
(set-process-query-on-exit-flag p nil)
+ ;; Set connection-local variables.
+ (tramp-set-connection-local-variables vec)
+
;; Change prompt.
(tramp-set-connection-property
p "prompt" (regexp-quote (format "///%s#$" prompt)))
(tramp-error
vec 'file-error "Cannot switch to user `%s'" user)))
- ;; Set connection-local variables.
- (tramp-set-connection-local-variables vec)
-
;; Mark it as connected.
(tramp-set-connection-property p "connected" t)))))))
:buffer (tramp-get-connection-buffer vec)
:server t :host 'local :service t :noquery t)))
(process-put p 'vector vec)
- (set-process-query-on-exit-flag p nil)))
+ (set-process-query-on-exit-flag p nil)
+
+ ;; Set connection-local variables.
+ (tramp-set-connection-local-variables vec)))
(unless (tramp-gvfs-connection-mounted-p vec)
(let ((method (tramp-file-name-method vec))
(and (functionp tramp-password-save-function)
(funcall tramp-password-save-function)))
- ;; Set connection-local variables.
- (tramp-set-connection-local-variables vec)
-
;; Mark it as connected.
(tramp-set-connection-property
(tramp-get-connection-process vec) "connected" t)))))
(tramp-message vec 6 "%s" (string-join (process-command p) " "))
+ ;; Set connection-local variables.
+ (tramp-set-connection-local-variables vec)
+
;; Check whether process is alive.
(tramp-barf-if-no-shell-prompt
p 10
(setq options ""
target-alist (cdr target-alist)))
- ;; Set connection-local variables.
- (tramp-set-connection-local-variables vec)
-
;; Activate session timeout.
(when (tramp-get-connection-property p "session-timeout" nil)
(run-at-time
(process-put p 'adjust-window-size-function #'ignore)
(set-process-query-on-exit-flag p nil)
+ ;; Set connection-local variables.
+ (tramp-set-connection-local-variables vec)
+
(condition-case err
(let ((inhibit-message t))
;; Play login scenario.
(tramp-set-connection-property p "smb-share" share)
(tramp-set-connection-property p "chunksize" 1)
- ;; Set connection-local variables.
- (tramp-set-connection-local-variables vec)
-
;; Mark it as connected.
(tramp-set-connection-property p "connected" t))
(tramp-check-for-regexp proc tramp-password-prompt-regexp)
(format "%s for %s " (capitalize (match-string 1)) key))))
(auth-source-creation-prompts `((secret . ,pw-prompt)))
+ ;; Use connection-local value.
+ (auth-sources (with-current-buffer (process-buffer proc) auth-sources))
;; We suspend the timers while reading the password.
(stimers (with-timeout-suspend))
auth-info auth-passwd)
(setq auth-passwd (funcall auth-passwd)))
auth-passwd)
- ;; Try the password cache.
+ ;; Try the password cache. Exists since Emacs 26.1.
(progn
(setq auth-passwd (password-read pw-prompt key)
tramp-password-save-function