GNU bug report logs - #18510
24.4.50; ERC doesn't update mode line frequently enough

Previous Next

Package: emacs;

Reported by: Tom Tromey <tom <at> tromey.com>

Date: Fri, 19 Sep 2014 14:30:04 UTC

Severity: normal

Found in version 24.4.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

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 18510 in the body.
You can then email your comments to 18510 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#18510; Package emacs. (Fri, 19 Sep 2014 14:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tom Tromey <tom <at> tromey.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 19 Sep 2014 14:30:04 GMT) Full text and rfc822 format available.

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

From: Tom Tromey <tom <at> tromey.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; ERC doesn't update mode line frequently enough
Date: Fri, 19 Sep 2014 08:28:54 -0600
When using ERC with the 'track' module, I notice that when I am idle, if
a new message comes in then the mode line is not updated.  If I type,
though, the mode line updates.

This defeats the purpose of erc-track.

I've worked around it locally by advising erc-update-mode-line to call
(force-mode-line-update t).




In GNU Emacs 24.4.50.8 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9)
 of 2014-09-15 on bapiya
Repository revision: 117884 dancol <at> dancol.org-20140915050944-sqsajysnwef51f9m
Windowing system distributor `Fedora Project', version 11.0.11404000
Configured using:
 `configure --prefix=/home/tromey/Emacs/install'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  flyspell-mode: t
  eldoc-mode: t
  which-function-mode: t
  global-auto-revert-mode: t
  desktop-save-mode: t
  erc-services-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  savehist-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: do-auto-fill

Recent input:
C-u C-u C-n C-l C-u C-u C-n C-l C-v C-s c h a n n e 
l C-r C-r C-r C-a C-s c o m m a n d C-w C-s C-a C-u 
C-n C-u C-n C-u C-p C-n C-l C-s d e C-w C-w C-s C-s 
C-s C-v C-l C-v C-l C-v C-v C-v M-v M-v M-v C-r # C-r 
C-r C-r C-r C-r C-r C-r C-r C-s C-s C-s C-s C-s C-s 
C-s C-s C-s C-a C-u C-u C-n C-l C-s d e c C-a M-v M-v 
M-< C-s d e c o d e - s t r i n g C-w C-w C-a C-u C-SPC 
C-u C-SPC C-s C-s C-a C-n C-n C-u C-n C-u C-n C-u C-u 
C-p C-u C-p C-u C-p C-s e r C-w C-w C-w C-w C-w C-s 
C-s C-l C-n C-n C-M-b C-s C-w C-w C-w C-w C-w C-s C-a 
C-u C-u C-n C-p C-p C-p C-l M-f M-b C-s C-w C-w C-w 
C-r C-r C-r C-s C-s C-s C-s C-l M-< C-s e r c - g e 
t - h o o k M-< C-s d e f i n e C-s C-s C-w C-w C-w 
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s 
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s 
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s 
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s 
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s 
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s 
C-s C-s C-a C-v C-l C-u C-u C-n C-l <switch-frame> 
<switch-frame> C-z n M-x r e p o r t - e m <tab> <
return>

Recent messages:
Making completion list...

Grep finished (matches found)
Mark saved where search started [9 times]
Mark set
Mark saved where search started [5 times]
Mark set
Mark saved where search started
Mark set
Mark saved where search started

Load-path shadows:
/home/tromey/.emacs.d/elpa/css-mode-1.0/css-mode hides /home/tromey/Emacs/install/share/emacs/24.4.50/lisp/textmodes/css-mode
/home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /home/tromey/Emacs/install/share/emacs/24.4.50/lisp/play/bubbles

Features:
(shadow emacsbug log-view cus-edit tar-mode bbdb-sc supercite regi debug
cl-macs eieio-opt speedbar sb-image ezimage dframe help-mode dabbrev
log-edit pcvs-util copyright url-http url-gw url-auth url-queue
mailalias misearch multi-isearch mail-hist nnir find-file gnus-fun
gnus-html xml url-cache mm-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util url-parse
url-vars shr-color color shr browse-url bbdb-gui bbdb-hooks mule-util
sort smiley gnus-cite flow-fill mm-archive gnus-async gnus-bcklg qp
gnus-ml disp-table gnus-topic nndraft nnmh nnfolder utf-7 bbdb-gnus
bbdb-snarf mail-extr bbdb-com warnings cl gv gnutls network-stream
starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg
nntp gnus-cache gnus-registry registry eieio-base gnus-art mm-uu mml2015
epg-config mm-view mml-smime smime dig mailcap gnus-sum gnus-group
gnus-undo smtpmail sendmail gnus-start gnus-cloud nnimap nnmail
mail-source tls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range
message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader
gnus-win gnus gnus-ems nnheader mail-utils tcl autoconf autoconf-mode
make-mode smerge-mode diff-mode goto-addr python js json vc-arch vc-mtn
vc-hg vc-bzr vc-sccs vc-svn vc-cvs vc-rcs bug-reference cc-mode cc-fonts
cc-guess cc-menus cc-cmds org-element org-rmail org-mhe org-irc org-info
org-gnus org-docview doc-view jka-compr image-mode dired org-bibtex
bibtex org-bbdb org-w3m org org-macro org-footnote org-pcomplete
org-list org-faces org-entities noutline outline easy-mmode org-version
ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp
ob-comint ob-core ob-eval org-compat org-macs org-loaddefs vc-git
add-log flyspell ispell eldoc diminish projectile edmacro kmacro
pkg-info find-func lisp-mnt epl grep compile dash s appt diary-lib
diary-loaddefs cal-menu calendar cal-loaddefs which-func imenu minimap
autorevert filenotify desktop frameset cus-start cus-load status
erc-services erc-list erc-menu erc-join erc-ring erc-networks
erc-pcomplete pcomplete erc-track erc-match erc-button wid-edit
cl-loaddefs cl-lib erc-fill erc-stamp erc-netsplit erc-goodies erc
erc-backend erc-compat format-spec auth-source eieio byte-opt bytecomp
byte-compile cconv eieio-core gnus-util mm-util mail-prsvr
password-cache thingatpt pp advice help-fns vc-dir ewoc vc vc-dispatcher
cc-styles cc-align cc-engine cc-vars cc-defs bbdb timezone ange-ftp
comint ansi-color ring server savehist dwarf-mode-autoloads
gdb-shell-autoloads jabber-autoloads lisppaste-autoloads
pydoc-info-autoloads info-look info easymenu weblogger-autoloads package
bbdb-autoloads time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 977335 198850)
 (symbols 48 105217 553)
 (miscs 40 41771 4212)
 (strings 32 332091 34639)
 (string-bytes 1 15139520)
 (vectors 16 97683)
 (vector-slots 8 2190694 174189)
 (floats 8 563 901)
 (intervals 56 49476 1106)
 (buffers 976 350)
 (heap 1024 278846 83955))

Tom




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18510; Package emacs. (Fri, 19 Sep 2014 17:26:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Tom Tromey <tom <at> tromey.com>
Cc: 18510 <at> debbugs.gnu.org
Subject: Re: bug#18510: 24.4.50; ERC doesn't update mode line frequently enough
Date: Fri, 19 Sep 2014 13:25:40 -0400
> I've worked around it locally by advising erc-update-mode-line to call
> (force-mode-line-update t).

That's not a workaround, that's a fix.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18510; Package emacs. (Fri, 19 Sep 2014 18:38:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Tom Tromey <tom <at> tromey.com>
Cc: 18510 <at> debbugs.gnu.org
Subject: Re: bug#18510: 24.4.50; ERC doesn't update mode line frequently enough
Date: Fri, 19 Sep 2014 14:37:07 -0400
>> I've worked around it locally by advising erc-update-mode-line to call
>> (force-mode-line-update t).
> That's not a workaround, that's a fix.

Hmm... not sure what that was about, sorry.  Of course, the
(force-mode-line-update t) should only be called when changing
a variable that's visible in the global mode-line-format.

Does the patch below work?
[ I assume the problem is also present in 24.3.93.  ]


        Stefan


=== modified file 'lisp/erc/erc-track.el'
--- lisp/erc/erc-track.el	2014-02-10 01:34:22 +0000
+++ lisp/erc/erc-track.el	2014-09-19 18:34:57 +0000
@@ -767,8 +765,7 @@
 		  (erc-modified-channels-remove-buffer buffer))))
 	    erc-modified-channels-alist)
       (when removed-channel
-	(erc-modified-channels-display)
-	(force-mode-line-update t)))
+	(erc-modified-channels-display)))
     (remove-hook 'post-command-hook 'erc-modified-channels-update)))
 
 (defvar erc-track-mouse-face (if (featurep 'xemacs)
@@ -825,9 +822,10 @@
 	((eq 'importance erc-track-switch-direction)
 	 (erc-track-sort-by-importance)))
   (run-hooks 'erc-track-list-changed-hook)
-  (unless (eq erc-track-position-in-mode-line nil)
-  (if (null erc-modified-channels-alist)
-      (setq erc-modified-channels-object (erc-modified-channels-object nil))
+  (when erc-track-position-in-mode-line
+    (let* ((oldobject erc-modified-channels-object)
+	   (strings
+	    (when erc-modified-channels-alist
     ;; erc-modified-channels-alist contains all the data we need.  To
     ;; better understand what is going on, we split things up into
     ;; four lists: BUFFERS, COUNTS, SHORT-NAMES, and FACES.  These
@@ -858,10 +856,11 @@
 	      buffers (cdr buffers)
 	      counts (cdr counts)
 	      faces (cdr faces)))
-      (when (featurep 'xemacs)
-	(erc-modified-channels-object nil))
-      (setq erc-modified-channels-object
-	    (erc-modified-channels-object strings))))))
+		strings)))
+	   (newobject (erc-modified-channels-object strings)))
+      (unless (equal oldobject newobject)
+	(setq erc-modified-channels-object newobject)
+	(force-mode-line-update t)))))
 
 (defun erc-modified-channels-remove-buffer (buffer)
   "Remove BUFFER from `erc-modified-channels-alist'."





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18510; Package emacs. (Wed, 24 Sep 2014 13:21:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Tom Tromey <tom <at> tromey.com>
Cc: 18510 <at> debbugs.gnu.org
Subject: Re: bug#18510: 24.4.50; ERC doesn't update mode line frequently enough
Date: Wed, 24 Sep 2014 09:20:13 -0400
Ping?


        Stefan


>>>>> "Stefan" == Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> I've worked around it locally by advising erc-update-mode-line to call
>>> (force-mode-line-update t).
>> That's not a workaround, that's a fix.

> Hmm... not sure what that was about, sorry.  Of course, the
> (force-mode-line-update t) should only be called when changing
> a variable that's visible in the global mode-line-format.

> Does the patch below work?
> [ I assume the problem is also present in 24.3.93.  ]


>         Stefan


> === modified file 'lisp/erc/erc-track.el'
> --- lisp/erc/erc-track.el	2014-02-10 01:34:22 +0000
> +++ lisp/erc/erc-track.el	2014-09-19 18:34:57 +0000
> @@ -767,8 +765,7 @@
>  		  (erc-modified-channels-remove-buffer buffer))))
>  	    erc-modified-channels-alist)
>        (when removed-channel
> -	(erc-modified-channels-display)
> -	(force-mode-line-update t)))
> +	(erc-modified-channels-display)))
>      (remove-hook 'post-command-hook 'erc-modified-channels-update)))
 
>  (defvar erc-track-mouse-face (if (featurep 'xemacs)
> @@ -825,9 +822,10 @@
>  	((eq 'importance erc-track-switch-direction)
>  	 (erc-track-sort-by-importance)))
>    (run-hooks 'erc-track-list-changed-hook)
> -  (unless (eq erc-track-position-in-mode-line nil)
> -  (if (null erc-modified-channels-alist)
> -      (setq erc-modified-channels-object (erc-modified-channels-object nil))
> +  (when erc-track-position-in-mode-line
> +    (let* ((oldobject erc-modified-channels-object)
> +	   (strings
> +	    (when erc-modified-channels-alist
>      ;; erc-modified-channels-alist contains all the data we need.  To
>      ;; better understand what is going on, we split things up into
>      ;; four lists: BUFFERS, COUNTS, SHORT-NAMES, and FACES.  These
> @@ -858,10 +856,11 @@
>  	      buffers (cdr buffers)
>  	      counts (cdr counts)
>  	      faces (cdr faces)))
> -      (when (featurep 'xemacs)
> -	(erc-modified-channels-object nil))
> -      (setq erc-modified-channels-object
> -	    (erc-modified-channels-object strings))))))
> +		strings)))
> +	   (newobject (erc-modified-channels-object strings)))
> +      (unless (equal oldobject newobject)
> +	(setq erc-modified-channels-object newobject)
> +	(force-mode-line-update t)))))
 
>  (defun erc-modified-channels-remove-buffer (buffer)
>    "Remove BUFFER from `erc-modified-channels-alist'."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18510; Package emacs. (Wed, 24 Sep 2014 16:38:02 GMT) Full text and rfc822 format available.

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

From: Tom Tromey <tom <at> tromey.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18510 <at> debbugs.gnu.org, Tom Tromey <tom <at> tromey.com>
Subject: Re: bug#18510: 24.4.50; ERC doesn't update mode line frequently enough
Date: Wed, 24 Sep 2014 10:37:24 -0600
Stefan> Ping?

I'm sorry about the delay on this.

Your patch worked!  I applied it to my running Emacs and removed the
advice and waited to see if the ERC mode line updated.

Tom




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Wed, 24 Sep 2014 17:33:01 GMT) Full text and rfc822 format available.

Notification sent to Tom Tromey <tom <at> tromey.com>:
bug acknowledged by developer. (Wed, 24 Sep 2014 17:33:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Tom Tromey <tom <at> tromey.com>
Cc: 18510-done <at> debbugs.gnu.org
Subject: Re: bug#18510: 24.4.50; ERC doesn't update mode line frequently enough
Date: Wed, 24 Sep 2014 13:32:35 -0400
> Your patch worked!  I applied it to my running Emacs and removed the
> advice and waited to see if the ERC mode line updated.

Thanks, installed, closing,


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18510; Package emacs. (Sat, 11 Oct 2014 13:31:03 GMT) Full text and rfc822 format available.

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

From: Ivan Shmakov <ivan <at> siamics.net>
To: 18510 <at> debbugs.gnu.org
Subject: Re: bug#18510: 24.4.50; ERC doesn't update mode line frequently enough
Date: Sat, 11 Oct 2014 13:30:30 +0000
[Message part 1 (text/plain, inline)]
>>>>> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

 >> Your patch worked!  I applied it to my running Emacs and removed the
 >> advice and waited to see if the ERC mode line updated.

 > Thanks, installed, closing,

	Please consider the patch MIMEd.

	This should fix the issue introduced in 67c13dfc627d that now
	prevents erc-modified-channels-object from being updated when
	the buffer has already seen some activity /and/ then sees some
	more important (as per erc-track-faces-priority-list) activity
	in the same buffer.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A
[Message part 2 (text/diff, inline)]
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -860,7 +860,7 @@ Use `erc-make-mode-line-buffer-name' to create buttons."
 			faces (cdr faces)))
 		strings)))
 	   (newobject (erc-modified-channels-object strings)))
-      (unless (equal oldobject newobject)
+      (unless (equal-including-properties oldobject newobject)
 	(setq erc-modified-channels-object newobject)
 	(force-mode-line-update t)))))
 

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18510; Package emacs. (Wed, 15 Oct 2014 01:17:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 18510-done <at> debbugs.gnu.org
Subject: Re: bug#18510: 24.4.50; ERC doesn't update mode line frequently enough
Date: Tue, 14 Oct 2014 21:16:06 -0400
> 	This should fix the issue introduced in 67c13dfc627d that now
> 	prevents erc-modified-channels-object from being updated when
> 	the buffer has already seen some activity /and/ then sees some
> 	more important (as per erc-track-faces-priority-list) activity
> 	in the same buffer.

Thanks, installed,


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 12 Nov 2014 12:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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