unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Oscar Najera <najera.oscar@gmail.com>
To: 25399@debbugs.gnu.org, tzz@lifelogs.com
Subject: bug#25399: [PATCH]
Date: Sun, 08 Jan 2017 19:17:43 +0100	[thread overview]
Message-ID: <87r34d4drs.fsf@gmail.com> (raw)

Hello,

I tried to use the auth-source-user-and-password function with the user
argument, but it always returns a list of nil. Looking at the code I see
that the argument is not used in the auth-source-search but that a fixed
string "yourusername" is used.

With this patch I obtain the correct behavior.

Thank you for your attention,
Best regards,
Oscar

---
 lisp/auth-source.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index c26935fcc9..7402ab21d7 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -2129,7 +2129,7 @@ MODE can be \"login\" or \"password\"."
                      (if user
                          (auth-source-search
                           :host host
-                          :user "yourusername"
+                          :user user
                           :max 1
                           :require '(:user :secret)
                           :create nil)





             reply	other threads:[~2017-01-08 18:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-08 18:17 Oscar Najera [this message]
2017-02-01  1:39 ` bug#25399: [PATCH] npostavs
2017-02-01 15:27   ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r34d4drs.fsf@gmail.com \
    --to=najera.oscar@gmail.com \
    --cc=25399@debbugs.gnu.org \
    --cc=tzz@lifelogs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).