From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68364 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Annoying windowp nil error Date: Mon, 23 Mar 2009 08:07:14 +0900 Organization: Emacsen advocacy group Message-ID: References: <87iqm2d4yo.fsf@topper.koldfront.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1237763367 19430 80.91.229.12 (22 Mar 2009 23:09:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Mar 2009 23:09:27 +0000 (UTC) Cc: ding@gnus.org To: Daiki Ueno Original-X-From: ding-owner+M16803@lists.math.uh.edu Mon Mar 23 00:10:44 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1LlWoS-0003y2-OT for ding-account@gmane.org; Mon, 23 Mar 2009 00:10:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1LlWly-0003r3-Ea; Sun, 22 Mar 2009 18:08:06 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1LlWlv-0003qm-Bs for ding@lists.math.uh.edu; Sun, 22 Mar 2009 18:08:03 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LlWlo-0003Fg-CV for ding@lists.math.uh.edu; Sun, 22 Mar 2009 18:08:03 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1LlWmB-0006O1-00 for ; Mon, 23 Mar 2009 00:08:19 +0100 Original-Received: from localhost ([127.0.0.1]:37026) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1LlWlD-0004IU-Le; Sun, 22 Mar 2009 18:07:20 -0500 X-Hashcash: 1:20:090322:ueno@unixuser.org::OgDWDiGHZfQn4o4m:00000000000000000000000000000000000000000000211N X-Hashcash: 1:20:090322:ding@gnus.org::HADkGc9P3taex0TC:00001UlZ X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.91 (gnu/linux) Cancel-Lock: sha1:OmjLfGTBodm29U9KUzuCJjkgiFY= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68364 Archived-At: >>>>> Adam Sj=F8gren wrote: > Hi. > For quite as while I have sometimes gotten an annoying "Wrong type > argument: windowp, nil" when finished reading an article. > It didn't happen often enough that I bothered to investigate until > today; I thought I might just have configured something weirdly. > I have found out that it happens when I page through the last article of > a group by pressing SPC, when reaching the end of the article, but only > if I have a second window opened with gnuclient! > It looks like something has changed, making the weird work-around that > the patch included below removes not necessary - and now actually > detrimental? > At least on my machine: > XEmacs 21.4 (patch 22) "Instant Classic" [Lucid] (x86_64-linux-gnu, > Mule) of Tue Mar 3 2009 on nautilus > No Gnus v0.11 > Any ideas as to what the correct solution might be? I've never gotten such an error, though it will be because I do not use (gnu|emacs)client. I don't know how the trouble Ueno-san mentioned in the comment happens. > - ;; For some reason, the group window gets selected. We change > - ;; it back. > - (select-window (get-buffer-window (current-buffer))) But this workaround potentially causes an error on a user who uses a customized window configuration so that Gnus places some Gnus windows in separate Emacs frames. I mean `get-buffer-window' returns nil if the buffer does not have a window in the current frame. > Maybe the real solution is just to guard against calling select-window > with nil? This will help only users who use the default window configuration or similar. (let ((window (get-buffer-window (current-buffer)))) (when window (select-window window))) How about the next one instead? (gnus-configure-windows 'summary) I have no means to make sure it is a good solution, though. > Or maybe it is to go through select-window and find out what windowp is > being called on and add something there. Hm. > Well, now it has been reported! :-) > Best regards, > Adam > Index: gnus-sum.el > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v > retrieving revision 7.238 > diff -u -r7.238 gnus-sum.el > --- gnus-sum.el 5 Feb 2009 09:04:09 -0000 7.238 > +++ gnus-sum.el 21 Mar 2009 19:44:47 -0000 > @@ -7635,9 +7635,6 @@ > (if (eq gnus-keep-same-level 'best) > (gnus-summary-best-group gnus-newsgroup-name) > (gnus-summary-search-group backward gnus-keep-same-level)))) > - ;; For some reason, the group window gets selected. We change > - ;; it back. > - (select-window (get-buffer-window (current-buffer))) > ;; Select next unread newsgroup automagically. > (cond > ((or (not gnus-auto-select-next) > -- > "We get our thursdays from a banana." Adam Sj=F8g= ren > asjo@koldfront.dk