From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38768 Path: main.gmane.org!not-for-mail From: ShengHuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: Mouse-2 on e-mail in From: header? Date: Fri, 14 Sep 2001 22:52:52 -0400 Message-ID: <2nsndpqi63.fsf@piglet.jia.vnet> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035174578 24213 80.91.224.250 (21 Oct 2002 04:29:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:29:38 +0000 (UTC) Cc: Gerd =?iso-8859-1?q?M=F6llmann?= Return-Path: Return-Path: Original-Received: (qmail 12386 invoked from network); 15 Sep 2001 02:53:06 -0000 Original-Received: from roc-24-95-193-9.rochester.rr.com (HELO zsh.2y.net) (@24.95.193.9) by gnus.org with SMTP; 15 Sep 2001 02:53:06 -0000 Original-Received: (from zsh@localhost) by zsh.2y.net (8.11.6/8.11.2) id f8F2qr502363; Fri, 14 Sep 2001 22:52:53 -0400 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q Mail-Copies-To: never In-Reply-To: (Pavel@Janik.cz's message of "Sat, 15 Sep 2001 01:37:57 +0200") User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.106 Original-Lines: 34 Xref: main.gmane.org gmane.emacs.gnus.general:38768 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38768 --=-=-= Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable Pavel@Janik.cz (Pavel Jan=EDk) writes: > Debugger entered--Lisp error: (wrong-type-argument window-live-p #) > select-window(#) > widget-button-click((down-mouse-2 (# 39 (266 . 6) -13279171= 2))) > call-interactively(widget-button-click) Pavel@Janik.cz (Pavel Jan=EDk) writes: > From: Simon Josefsson > Date: Fri, 14 Sep 2001 21:39:35 +0200 > > Hi, > > > Maybe you could try applying the diff's between gnus-art.el in prete= st > > and the one in CVS incrementally to find what change caused this? > > Assuming it is gnus-art.el which causes this.. > > OK, running with Gnus 5.9.0 with gnus-msg.el and gnus.el is OK (at least > for this particular problem). After applying the following patch: The problem is because the button-click function changes the window configuration, however, in widget-button-click, there is a save-selected-window. The attached workaround fixes the problem. Gerd, what is the reason to save the selected window around the code handling clicks on buttons in widget-button-click? Is the workaround appropriate? ShengHuo --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gnus-msg.el.diff Index: gnus-msg.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-msg.el,v retrieving revision 6.46 diff -u -r6.46 gnus-msg.el --- gnus-msg.el 2001/08/20 18:54:43 6.46 +++ gnus-msg.el 2001/09/15 02:41:26 @@ -322,19 +322,27 @@ ;; COMPOSEFUNC should return t if succeed. Undocumented ??? t) +(defvar save-selected-window-window) + ;;;###autoload (defun gnus-button-mailto (address) "Mail to ADDRESS." (set-buffer (gnus-copy-article-buffer)) (gnus-setup-message 'message - (message-reply address))) + (message-reply address)) + (and (boundp 'save-selected-window-window) + (not (window-live-p save-selected-window-window)) + (setq save-selected-window-window (selected-window)))) ;;;###autoload (defun gnus-button-reply (&optional to-address wide) "Like `message-reply'." (interactive) (gnus-setup-message 'message - (message-reply to-address wide))) + (message-reply to-address wide)) + (and (boundp 'save-selected-window-window) + (not (window-live-p save-selected-window-window)) + (setq save-selected-window-window (selected-window)))) ;;;###autoload (define-mail-user-agent 'gnus-user-agent --=-=-=--