Re: bug#57955: 29.0.50; Allow session-local ERC modules

"J.P." <[email protected]> Thu, 29 Feb 2024 16:25:08 -0800
Newsgroups gmane.emacs.erc.general
Message-ID <[email protected]>
"J.P." <[email protected]> writes:

> A new Emacs user recently complained about the lack of an example
> showing local modules being `let'-bound around calls to ERC's entry
> point functions in lisp code. Perhaps we should add such an example to
> the Modules chapter and also possibly update the "Multiple networks"
> example in Advanced > SASL to include a non-SASL connection:
>
>   (defun my-erc-up (network)
>     (interactive "Snetwork: ")
>   
>     (pcase network
>       ('libera
>        (let ((erc-modules (cons 'sasl erc-modules))
>              (erc-sasl-mechanism 'external))
>          (erc-tls :server "irc.libera.chat" :port 6697
>                   :client-certificate t)))
>       ('example
>        (let ((erc-modules (cons 'sasl erc-modules))
>              (erc-sasl-auth-source-function
>               #'erc-sasl-auth-source-password-as-host))
>          (erc-tls :server "irc.example.net" :port 6697
>                   :user "alyssa"
>                   :password "Example.Net")))
>       (_ (call-interactively #'erc-tls))))

I've added an example similar to this one.