Subject: Re: bug#15247: 24.3.50; Emacs Cygwin crashes when replying to a mail

From: Katsumi Yamaoka <[email-masked]>
Date: Tue, 03 Sep 2013 08:27:23 +0900

martin rudalics wrote:
>> emacs -Q --eval '(make-frame-invisible (selected-frame) t)'
>> I also guess that it was harmless until about a week ago.

> Should be harmless again with revision 114106.

Thanks!

[...]
>> As I wrote in <http://thread.gmane.org/gmane.emacs.devel/150533>,
>> `raise-frame' doesn't raise iconified, invisible, or hidden frame.
>> Now I changed it into:
>>
>> (defadvice raise-frame (before make-it-work (&optional frame) activate)
>>   "Make it work on Cygwin."
>>   (or (eq frame (selected-frame))
>>       (make-frame-invisible frame)))

> I don't understand fully: Above you say that "`raise-frame' doesn't
> raise iconified, invisible, or hidden frame" and in the before-advice
> or `raise-frame' you make the frame invisible?

Yes, it does.  So far once vanishing a frame, that is alive but
is iconified or hidden behind other frames, from a Windows desktop
is the only means to make `raise-frame' raise the frame to the top.
Another way is:

(defadvice raise-frame (around make-it-work (&optional frame) activate)
;;                      ^^^^^^
  "Make it work on Cygwin."
  (unless (eq frame (selected-frame))
    (make-frame-invisible frame)
    (make-frame-visible frame)))

I found it through trial and trial and trial ... and error. ;)