GNU bug report logs - #15377
24.1; erc-mode-line-update-buffer can mishandle updates when there is no topic

Previous Next

Package: emacs;

Reported by: Vivek Dasmohapatra <vivek <at> etla.org>

Date: Sat, 14 Sep 2013 00:34:02 UTC

Severity: normal

Found in version 24.1

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15377 in the body.
You can then email your comments to 15377 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15377; Package emacs. (Sat, 14 Sep 2013 00:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vivek Dasmohapatra <vivek <at> etla.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 14 Sep 2013 00:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vivek Dasmohapatra <vivek <at> etla.org>
To: bug-gnu-emacs <at> gnu.org
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.




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Sat, 14 Sep 2013 23:34:02 GMT) Full text and rfc822 format available.

Notification sent to Vivek Dasmohapatra <vivek <at> etla.org>:
bug acknowledged by developer. (Sat, 14 Sep 2013 23:34:03 GMT) Full text and rfc822 format available.

Message #10 received at 15377-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 15377-done <at> debbugs.gnu.org
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
Version: 24.4

Thanks; applied.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 13 Oct 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 221 days ago.

Previous Next


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