unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: nyc4bos@aol.com
To: Eli Zaretskii <eliz@gnu.org>
Cc: 13094@debbugs.gnu.org, lekktu@gmail.com, cyd@gnu.org
Subject: bug#13094: Problem with emacsclient not raising frame is back -- regression
Date: Fri, 01 Feb 2013 16:08:40 -0500	[thread overview]
Message-ID: <xl5zjzn4u93.fsf@aol.com> (raw)
In-Reply-To: <83txpyh6fm.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 30 Jan 2013 20:27:57 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

[...]

> My analysis of this is that it has nothing to do with emacsclient per
> se, and neither is it a regression since Emacs 24.1: I see the same
> behavior in stock 24.1 on 2 different Windows machines.  (It _is_ a
> regression from Emacs 23.3, though.)  So the old bug reports where you
> reported similar problems sound unrelated to this one, if indeed they
> were resolved (of which I'm not sure).
>
> The reason for this problem is that raise-frame on Windows does not
> raise the frame to the top of z-order, in this particular use case.
> It just gives that frame input focus (which you can see if you make
> the cursor of the Emacs frame visible before running the emacsclient
> command the 2nd time: you will see the cursor starts blinking).  To
> see that raise-frame is th culprit, modify your recipe like this,
> after step 4:
>
> 4.1. Type into the *scratch* buffer:
>
>   (defun raise-frame-by-name (name)
>     ""
>     (let* ((frame-names-alist (make-frame-names-alist))
> 	   (frame (cdr (assoc name frame-names-alist))))
>       (when frame
> 	(message "Raising %s..." frame)
> 	(raise-frame frame))))
>
> 4.2  Evaluate this function.
>
> 4.3  Click on the Command Prompt window to make it the foreground
> window.  Then move the Command Prompt window on display so that the
> echo area of the Emacs's frame is visible.
>
> 5. Execute the following command from the Command Prompt window:
>
>    C:\emacs-24.3.50\bin\emacsclient.exe -n
>        --eval "(raise-frame-by-name \"emacs@<SYSTEM>\")"
>
> You will see the "Raising" message in the echo area of Emacs, but the
> frame will not come to the forefront.
>
> Doing the same in Emacs 23.3 does bring the frame to the forefront.
>
> Conclusion: emacsclient does its job by telling Emacs to invoke
> raise-frame, and Emacs does.  But raise-frame does not produce the
> expected effect.
>
> I believe this change in behavior since 23.3 is a side effect of
> fixing another bug:
>
>  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11513
>
> That change fixed a similar, but evidently distinct aspect of
> raise-frame's behavior.  We could try reverting that change, but then
> there will be another user who will claim that a bug solved long ago
> "is back".
>
> It would be nice to solve this problem without un-fixing the other
> one.  But for this, Someone(TM) who knows much more than I do about
> Windows GUI should step forward and show us how to do that.  We don't
> have such a knowledgeable person on board at this time, unfortunately.
>
> As a temporary workaround, you could customize w32-grab-focus-on-raise
> to nil; my testing indicates that you will have the behavior you want
> then.

Thanks for your thorough analysis aand explanation.

Yes, this temporary workaround raises the frame.

Unfortunatly, it doesn't also gain focus like when it starts out
being iconified and then the command is invoked, at least not for me.








      reply	other threads:[~2013-02-01 21:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05 23:25 bug#13094: Problem with emacsclient not raising frame is back nyc4bos
2012-12-15 20:26 ` bug#13094: Problem with emacsclient not raising frame is back -- regression nyc4bos
2013-01-04  2:59   ` Chong Yidong
2013-01-04 21:07     ` nyc4bos
2013-01-29 20:50     ` nyc4bos
2013-01-30 18:27       ` Eli Zaretskii
2013-02-01 21:08         ` nyc4bos [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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=xl5zjzn4u93.fsf@aol.com \
    --to=nyc4bos@aol.com \
    --cc=13094@debbugs.gnu.org \
    --cc=cyd@gnu.org \
    --cc=eliz@gnu.org \
    --cc=lekktu@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).