[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ac80e377830 02/11: ; * doc/misc/erc.texi: Fix reconnecting in SOC
From: |
F. Jason Park |
Subject: |
master ac80e377830 02/11: ; * doc/misc/erc.texi: Fix reconnecting in SOCKS example. |
Date: |
Mon, 12 Jun 2023 00:15:54 -0400 (EDT) |
branch: master
commit ac80e37783072b310121b7d3b7b0c335f0a6371f
Author: F. Jason Park <jp@neverwas.me>
Commit: F. Jason Park <jp@neverwas.me>
; * doc/misc/erc.texi: Fix reconnecting in SOCKS example.
---
doc/misc/erc.texi | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi
index 14c6a457654..e848ed21a50 100644
--- a/doc/misc/erc.texi
+++ b/doc/misc/erc.texi
@@ -1281,20 +1281,23 @@ something appropriate, like @code{("tor" "127.0.0.1"
9050 5)}. For
some networks, setting @code{erc-server-connect-function} to
@code{socks-open-network-stream} might be enough. Others, like
@samp{Libera.Chat}, involve additional setup. At the time of writing,
-connecting to @samp{Libera.Chat} requires both @acronym{TLS} and a
-non-@samp{PLAIN} @acronym{SASL} mechanism (@pxref{SASL}). One way to
-achieve that is by using the @samp{EXTERNAL} mechanism, as shown in
-the following example:
+connecting to that network requires both @acronym{TLS} and a permitted
+@acronym{SASL} mechanism, like @samp{EXTERNAL} (@pxref{SASL}), as
+shown in the following example:
@lisp
(require 'erc)
(require 'socks)
-(let* ((socks-password "")
- (socks-server '("tor" "localhost" 9050 5))
- (erc-modules (cons 'sasl erc-modules))
+(defun my-erc-open-socks-tls-stream (&rest args)
+ (let ((socks-username "")
+ (socks-password "")
+ (socks-server '("tor" "localhost" 9050 5)))
+ (apply #'erc-open-socks-tls-stream args)))
+
+(let* ((erc-modules (cons 'sasl erc-modules))
(erc-sasl-mechanism 'external)
- (erc-server-connect-function #'erc-open-socks-tls-stream))
+ (erc-server-connect-function #'my-erc-open-socks-tls-stream))
(erc-tls
:server "libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion"
:port 6697
@@ -1304,6 +1307,14 @@ the following example:
:client-certificate (list "/home/jrh/key.pem" "/home/jrh/cert.pem")))
@end lisp
+@noindent
+Here, the user-provided @code{my-erc-open-socks-tls-stream} ensures
+that the preferred values for @code{socks-server} and friends will be
+available when reconnecting. If you plan on using @acronym{SOCKS}
+with ERC exclusively, you can just set those options and variables
+globally and bind @code{erc-server-connect-function} to
+@code{erc-open-socks-tls-stream} instead.
+
@node auth-source
@subsection auth-source
@cindex auth-source
- master updated (b6d48190609 -> edfbdb3f165), F. Jason Park, 2023/06/12
- master 67f7ac2bbee 05/11: Deprecate nicknames entry in erc-button-alist, F. Jason Park, 2023/06/12
- master 2daa71f9329 09/11: Don't insert prompt input before markers in ERC, F. Jason Park, 2023/06/12
- master 1c3f6aa98f5 07/11: Measure stamps pixel-wise with erc-fill-wrap, F. Jason Park, 2023/06/12
- master d880a08f959 08/11: Cement ordering of essential hook members in ERC, F. Jason Park, 2023/06/12
- master ac80e377830 02/11: ; * doc/misc/erc.texi: Fix reconnecting in SOCKS example.,
F. Jason Park <=
- master a4df7483295 01/11: Prefer emacs-news-mode in etc/ERC-NEWS, F. Jason Park, 2023/06/12
- master 56e1922281d 10/11: Revert "Add hook to regain nickname in ERC", F. Jason Park, 2023/06/12
- master bd969326e96 04/11: Add alias erc-buffer-do for erc-buffer-filter, F. Jason Park, 2023/06/12
- master 0f76bed4928 03/11: ; * lisp/erc/erc.el (erc-send-input-line-function): Doc., F. Jason Park, 2023/06/12
- master e560f9af8e8 06/11: Allow ERC modules to extend erc-nick-popup-alist, F. Jason Park, 2023/06/12
- master edfbdb3f165 11/11: Define missing groups for ERC modules, F. Jason Park, 2023/06/12