emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#15377: closed (24.1; erc-mode-line-update-buffer c


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#15377: closed (24.1; erc-mode-line-update-buffer can mishandle updates when there is no topic)
Date: Sat, 14 Sep 2013 23:34:02 +0000

Your message dated Sat, 14 Sep 2013 19:33:47 -0400
with message-id <address@hidden>
and subject line Re: bug#15377: 24.1; erc-mode-line-update-buffer can mishandle 
updates when there is no topic
has caused the debbugs.gnu.org bug report #15377,
regarding 24.1; erc-mode-line-update-buffer can mishandle updates when there is 
no topic
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
15377: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15377
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.1; erc-mode-line-update-buffer can mishandle updates when there is no topic Date: Sat, 14 Sep 2013 01:32:40 +0100
Very rarely, erc can start throwing lots of errors inside its process
sentinel - a couple of users on #emacs also reported it recently:

[conversation edited for noise]
<xxxx> sigh, periodically, my erc … "error in process
       filter: Invalid format character: `%o'"

<yyyy> xxxx: I've seen this error a few times before--typically when my
       bouncer has just experienced connection difficulties and is in a
       disconnect/reconnect thrash.

I tracked it down to:

erc-header-line-format: "%n on %t (%m,%l) %o"

And in erc-update-mode-line-buffer:

    (let ((spec (format-spec-make
                 ⋮
                 ?o (erc-controls-strip erc-channel-topic)

And then:

    (format-spec erc-header-line-format spec)

But erc-controls-strip can return nil, which does make format-spec
choke on "%o", since it does not differentiate between a spec with
no ?o element and one containing ?o nil.

The following should fix it:

--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -6210,7 +6210,7 @@ if `erc-away' is non-nil."
                 ?m (erc-format-channel-modes)
                 ?n (or (erc-current-nick) "")
                 ?N (erc-format-network)
-                ?o (erc-controls-strip erc-channel-topic)
+                ?o (or (erc-controls-strip erc-channel-topic) "")
                 ?p (erc-port-to-string erc-session-port)
                 ?s (erc-format-target-and/or-server)
                 ?S (erc-format-target-and/or-network)

I have no real test recipe, since the error is intermittent and
I don't know what makes the erc-channel-topic degrade to nil,
but you can try this:

M-: (let (erc-channel-topic) (erc-update-mode-line-buffer (current-buffer)))

with an erc-buffer current.



--- End Message ---
--- Begin Message --- Subject: Re: bug#15377: 24.1; erc-mode-line-update-buffer can mishandle updates when there is no topic Date: Sat, 14 Sep 2013 19:33:47 -0400 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
Version: 24.4

Thanks; applied.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]