Gnus development mailing list
 help / color / mirror / Atom feed
From: ShengHuo ZHU <zsh@cs.rochester.edu>
Cc: "Gerd Möllmann" <gerd@gnu.org>
Subject: Re: Mouse-2 on e-mail in From: header?
Date: Mon, 17 Sep 2001 09:09:21 -0400	[thread overview]
Message-ID: <2nsndm7ym6.fsf@piglet.jia.vnet> (raw)
In-Reply-To: <8666aiyr5t.fsf@gerd.dnsalias.org> (gerd.moellmann@t-online.de's message of "17 Sep 2001 13:48:14 +0200")

gerd.moellmann@t-online.de (Gerd Moellmann) writes:

> ShengHuo ZHU <zsh@cs.rochester.edu> writes:
>
>> 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?  
>
> I'm afraid I don't remember details anymore.  I think it was a report
> from Dave Love that triggered that, so I might be able to find this
> in my mail archive, if you think it's worth searching.
>
>> Is the workaround appropriate?
>> 
>> ShengHuo
>> 
>> 
>> 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))))
>
> Sorry if I'm dense, but I don't understand what the change does.
> Is save-selected-window-window used somewhere else?

The variable save-selected-window-window is a local variable in
save-selected-window (of Emacs).  Because gnus-button-mailto
(gnus-setup-message) changes the window configuration,
save-selected-window-window points to an invalid window, which causes
save-selected-window fails. In the patch, save-selected-window-window
is forced to point a live window.

ShengHuo


      reply	other threads:[~2001-09-17 13:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-31 10:09 Pavel Janík
2001-08-31 11:53 ` Roland Mas
2001-08-31 12:10   ` Pavel Janík
2001-09-03 10:12 ` Pavel Janík
2001-09-14 19:18 ` Pavel Janík
2001-09-14 19:39   ` Simon Josefsson
2001-09-14 23:37     ` Pavel Janík
2001-09-15  2:52       ` ShengHuo ZHU
2001-09-17 11:48         ` Gerd Moellmann
2001-09-17 13:09           ` ShengHuo ZHU [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2nsndm7ym6.fsf@piglet.jia.vnet \
    --to=zsh@cs.rochester.edu \
    --cc=gerd@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).