GNU bug report logs - #40914
27.0.91; erc send is failing on pretest

Previous Next

Package: emacs;

Reported by: Andrés Ramírez <rrandresf <at> gmail.com>

Date: Mon, 27 Apr 2020 22:23:01 UTC

Severity: normal

Found in version 27.0.91

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: andrés ramírez <rrandresf <at> gmail.com>
Cc: 40914 <at> debbugs.gnu.org
Subject: bug#40914: 27.0.91; erc send is failing on pretest
Date: Tue, 28 Apr 2020 19:10:48 +0300
> From: andrés ramírez <rrandresf <at> gmail.com>
> Cc: 40914 <at> debbugs.gnu.org
> Date: Tue, 28 Apr 2020 15:48:32 +0000
> 
>     Eli> What does the following yield in a session that fails like
>     Eli> this?
> 
>     Eli>   M-: (erc-coding-system-for-target nil) RET
> 
> --8<---------------cut here---------------start------------->8---
> utf-8
> --8<---------------cut here---------------end--------------->8---

That's the problem.  The question is: how did that happen?

And here's the answer:

>   (setq
>    erc-nick-uniquifier "_"
>    erc-kill-queries-on-quit t
>    erc-server-coding-system (quote utf-8)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

So does the patch below fix the problem?

diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 0e3495e..526e854 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -466,7 +466,8 @@ erc-split-line
 The length is specified in `erc-split-line-length'.
 
 Currently this is called by `erc-send-input'."
-  (let ((charset (car (erc-coding-system-for-target nil))))
+  (let* ((coding (erc-coding-system-for-target nil))
+         (charset (if (consp coding) (car coding) coding)))
     (with-temp-buffer
       (insert longline)
       ;; The line lengths are in octets, not characters (because these




This bug report was last modified 5 years and 103 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.