I am a heavy user of https://github.com/yuya373/emacs-slack, and I noticed a weird behavior of
auth-source-search: If I call this function multiple times, querying the second info always returns
This is my slack configuration:
(let ((auth1 (car (auth-source-search :host "team1.slack.com"))) (auth2 (car (auth-source-search :host "team2.slack.com")))) (slack-register-team :name "Team 1" :user "firstname.lastname@example.org" :token (funcall (plist-get auth1 :secret))) (slack-register-team :name "Team 2" :user "email@example.com" :token (funcall (plist-get auth2 :secret)))
And the second call to
auth-source-search fails, making
nil. So, Emacs cannot evaluate the expression
(funcall (plist-get auth2 :secret)) since
(plist-get auth2 :secret) is
I am certain that
auth-source-search is somehow broken, and have found a prior question to this: `auth-source-search` returns nil for valid queries . A comment to this question suggested to add
:port keyword argument to
auth-source-search, but in this case I cannot because the Slack auth info does not contain any
How can I solve this issue?
.authinfo looks roughly like this:
host team1.slack.com user firstname.lastname@example.org password ... machine imap.gmail.com login ... port ... password ... machine smtp.gmail.com login ... port ... password ... host team2.slack.com user email@example.com password ...
That is, the entry of
team1.slack.com comes before that of
My Emacs is of version 27.1, configured with Spacemacs at the develop branch's latest commit.