Subject: bug#45340: erc-services.el: Auth-source support for passwords

From: Leon Vack <[email-masked]>
Date: Wed, 20 Jan 2021 11:42:05 +0100

Hello Olivier,

sorry for the long time it took me to reply.

Olivier Certner <[email-masked]> writes:

> I also have some further suggestion, beyond this enhancement. I think it would 
> be even more useful that `erc-prompt-for-nickserv-password' is not required to 
> be nil for auth source (or `erc-nickserv-passwords', for that purpose) to be 
> used, but rather that, if search in `erc-nickserv-passwords' and auth source 
> (if enabled) fails, then prompting should be used as a last resort (if 
> enabled). I think this would cover all the use cases I can think of (with 
> proper settings of `erc-prompt-for-nickserv-password' and `erc-use-auth-
> source-for-nickserv-password'). If more customizations are required, or just 
> for the sake of 'simplicity' (YMMV), than maybe replacing these booleans with 
> a single list indicating the means to get the password and their order could 
> be nice.
>
> What do people think?
>

I personally agree with you on this. Having to change
`erc-prompt-for-nickserv-password' for `erc-nickserv-passwords' to have
an effect caught me off guard in the beginning as well.

The list of NickServ password sources seems like the more flexible
solution, but would be a bit more complex to implement, considering how
the current system works. Changing the precedence to
`erc-nickserv-passwords', auth source and then prompt (if enabled), on
the other hand, should be a rather simple patch.

I think we should discuss this not on this bug, but on the emacs-erc
mailing list before we change that.

Regards,
Leon Vack