From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daimrod Newsgroups: gmane.emacs.bugs Subject: bug#17769: 24.4.50; [PATCH] rcirc-omit-mode: `recenter'ing a window that does not display current-buffer. Date: Fri, 13 Jun 2014 18:14:09 +0900 Message-ID: <8738f9cgta.fsf@tanger.home> References: <87ioo5cn1m.fsf@tanger.home> <8338f9xldz.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1402650925 28488 80.91.229.3 (13 Jun 2014 09:15:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Jun 2014 09:15:25 +0000 (UTC) Cc: 17769@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 13 11:15:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WvNZt-0000Pr-3B for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jun 2014 11:15:17 +0200 Original-Received: from localhost ([::1]:57672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvNZs-00034J-LR for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jun 2014 05:15:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvNZk-00032C-O0 for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 05:15:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WvNZf-00033p-8K for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 05:15:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvNZf-00033Z-3z for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 05:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WvNZe-0000C6-IB for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 05:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daimrod Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Jun 2014 09:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17769 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 17769-submit@debbugs.gnu.org id=B17769.1402650863658 (code B ref 17769); Fri, 13 Jun 2014 09:15:02 +0000 Original-Received: (at 17769) by debbugs.gnu.org; 13 Jun 2014 09:14:23 +0000 Original-Received: from localhost ([127.0.0.1]:46174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WvNZ0-0000AX-O2 for submit@debbugs.gnu.org; Fri, 13 Jun 2014 05:14:23 -0400 Original-Received: from mail-pa0-f54.google.com ([209.85.220.54]:59631) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WvNYy-0000A1-2S for 17769@debbugs.gnu.org; Fri, 13 Jun 2014 05:14:20 -0400 Original-Received: by mail-pa0-f54.google.com with SMTP id et14so1928209pad.27 for <17769@debbugs.gnu.org>; Fri, 13 Jun 2014 02:14:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=bBIhxkn8eke4dbJ//Vou+oVOLppYNPsoc+qVh0LKhAg=; b=iowgKTHPkGBddNdFagFnZtzgIqPeeXIpDeVL/PzdGfPEExv7KcrU9nbRW1lzciAM+Q UADzZT7dUbaUxn2WI7hsVOyXg+ZV4tcJbNMgb6woxCxNCNDB7cElVVF/5CbCIsgbTVNh OtxGhpld4X3p9oVlMEeUxuW6vUCztdF2ZVCxJPXwyeMNFZDuhM2nEvQ7dUf1XRarIcfg ulbxe/gMZ+87Nc+puqhVFt4I1EUjnFVsmbj29uqaoS4y/oSsmS0aYfF6cI38sdK2Xm1T bivR3VOa8zJsgcCKXCNrYAEF0pXJJOL3UO12I18ubnYtPOim2yxMjavN/7/qzIJgRHNo hSNQ== X-Received: by 10.66.155.227 with SMTP id vz3mr1790212pab.26.1402650853957; Fri, 13 Jun 2014 02:14:13 -0700 (PDT) Original-Received: from localhost ([2001:2f8:200:1:e206:e6ff:fecb:5a]) by mx.google.com with ESMTPSA id kh4sm2444180pbc.64.2014.06.13.02.14.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jun 2014 02:14:13 -0700 (PDT) In-Reply-To: <8338f9xldz.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 13 Jun 2014 11:29:44 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:90314 Archived-At: Eli Zaretskii writes: >> From: Daimrod >> Date: Fri, 13 Jun 2014 15:59:33 +0900 >> >> The attached patch prevents `rcirc-omit-mode' to call `recenter' when >> `window-buffer' isn't the same as `current-buffer'. >> >> >> If `rcirc-omit-mode' is enabled by the user interactively (e.g. with C-c >> C-o) then it will do the right thing. >> >> If `rcirc-omit-mode' was called from elisp (e.g. from a hook), then we >> don't need to `recenter' the buffer, because it will be done the next >> time the user switch to the buffer with `rcirc-next-active-buffer'. >> >> I'm not an RCIRC expert, but I don't think anything else is required. >> WDYT? > > This doesn't sound like the right fix to me. Instead, the code should > momentarily switch to the right window, and call recenter there. > That's surely what the author of this code intended, AFAIU. But the buffer might not be displayed in any window. For example, when one invoked `rcirc-connect' with some channels by default: : (rcirc-connect "localhost" 6667 nil nil nil '("#bar") nil) Then a buffer "#bar@localhost" will be created but not displayed. Regards, -- Daimrod/Greg