GNU bug report logs - #17769
24.4.50; [PATCH] rcirc-omit-mode: `recenter'ing a window that does not display current-buffer.

Previous Next

Package: emacs;

Reported by: Daimrod <daimrod <at> gmail.com>

Date: Fri, 13 Jun 2014 07:00:02 UTC

Severity: normal

Tags: patch

Merged with 17778

Found in version 24.4.50

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Leo Liu <sdl.web <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#17778: closed (24.4.50; rcirc-omit-mode should only call
 `recenter' if `current-buffer' is equal to `window-buffer')
Date: Thu, 19 Jun 2014 11:19:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 19 Jun 2014 19:18:12 +0800
with message-id <m3d2e5jggb.fsf <at> gmail.com>
and subject line Re: bug#17769: 24.4.50; [PATCH] rcirc-omit-mode: `recenter'ing a window that does not display	current-buffer.
has caused the debbugs.gnu.org bug report #17769,
regarding 24.4.50; rcirc-omit-mode should only call `recenter' if `current-buffer' is equal to `window-buffer'
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
17769: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17769
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Kan-Ru Chen (陳侃如) <kanru <at> kanru.info>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50;
 rcirc-omit-mode should only call `recenter' if `current-buffer' is
 equal to `window-buffer'
Date: Sat, 14 Jun 2014 19:27:22 +0800
[Message part 3 (text/plain, inline)]
Step to reproduce:

 (add-hook 'rcirc-mode-hook 'rcirc-omit-mode)

When rcirc trys auto-connect to channels, emacs will show

 (error "`recenter'ing a window that does not display current-buffer.")

Patch attached

In GNU Emacs 24.4.50.6 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
 of 2014-06-14 on isil
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:	Debian GNU/Linux unstable (sid)

[0001-net-rcirc.el-Only-call-recenter-if-current-buffer-is.patch (text/x-diff, inline)]
From 901b38e1f17def0b4ee64f78f54d04e3295eb6db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kan-Ru=20Chen=20=28=E9=99=B3=E4=BE=83=E5=A6=82=29?=
 <kanru <at> kanru.info>
Date: Sat, 14 Jun 2014 19:21:00 +0800
Subject: [PATCH] net/rcirc.el: Only call `recenter' if `current-buffer' is
 equal to `window-buffer'

---
 lisp/ChangeLog    | 5 +++++
 lisp/net/rcirc.el | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1df12d4..8317393 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-14  Kan-Ru Chen  <kanru <at> kanru.info>
+
+	* net/rcirc.el (rcirc-omit-mode): Only call `recenter' if
+	`current-buffer' is equal to `window-buffer'.
+
 2014-06-13  Glenn Morris  <rgm <at> gnu.org>
 
 	* Makefile.in ($(lisp)/cus-load.el, $(lisp)/finder-inf.el)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 41cc002..1e3ee32 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -1903,7 +1903,9 @@ Uninteresting lines are those whose responses are listed in
 	(message "Rcirc-Omit mode enabled"))
     (remove-from-invisibility-spec '(rcirc-omit . nil))
     (message "Rcirc-Omit mode disabled"))
-    (recenter (when (> (point) rcirc-prompt-start-marker) -1)))
+  (when (and (eq (current-buffer) (window-buffer))
+             (> (point) rcirc-prompt-start-marker))
+    (recenter -1)))
 
 (defun rcirc-switch-to-server-buffer ()
   "Switch to the server buffer associated with current channel buffer."
-- 
2.0.0

[Message part 5 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: Daimrod <daimrod <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, Eli Zaretskii <eliz <at> gnu.org>,
 17769-done <at> debbugs.gnu.org
Subject: Re: bug#17769: 24.4.50;
 [PATCH] rcirc-omit-mode: `recenter'ing a window that does not
 display	current-buffer.
Date: Thu, 19 Jun 2014 19:18:12 +0800
Fixed in 24.5.

On 2014-06-14 01:08 +0900, Daimrod wrote:
> I see, thanks for inputs.
>
> Here is an updated patch.

Thanks for the patch.

Leo


This bug report was last modified 11 years and 34 days ago.

Previous Next


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