unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: martin rudalics <rudalics@gmx.at>, 19012@debbugs.gnu.org
Subject: bug#19012: 25.0.50; `help-window-select'
Date: Fri, 14 Nov 2014 13:21:18 -0800 (PST)	[thread overview]
Message-ID: <2b53c981-eaef-47f3-850a-6367b4cd5dc1@default> (raw)
In-Reply-To: <5466532C.2040003@gmx.at>

>  >> What does evaluating (selected-window) give when the *Help*
>  >> frame is raised while the *scratch* frame is focused?
>  >
>  > `M-: (selected-window)' at that point shows:
>  > #<window 3 on *scratch*>
> 
> Together this proves two things:
> 
> (1) `with-help-window' correctly selects the *Help* window.
> (2) `raise-frame' is far from "punctual" (takes place at a moment in
>      time) as you claimed earlier.

I won't argue about what it proves.  (I don't see how it proves
#2, but whatever.)  It might indicate only that `raise-frame' does
not necessarily do its "punctual" thing (raise the frame) exactly
when it is called, synchronously.  IOW, it might do that at some
later time, asynchronously.  Dunno.

My point about the interaction between `raise-frame' and
`with-help-window' was that the latter should try to ensure that
the window is selected when it *ends*, not at some earlier point.

But if `raise-frame' effectively does its thing *after*
`with-help-window' ends, even if called from within `w-h-w', then
that macro has no way to ensure selection after the actual effect
of `raise-frame'.

We can at least try to make sure that `w-h-w' selects the window
at the very end.

Of course, `w-h-w' should not affect selection for calls to
`raise-frame' (or other functions that select windows or focus)
that happen after it is done.  But if it can override any such
selections that take place within its scope/duration, that is good.

> You can try the following: In `temp-buffer-window-setup-hook' set
> `w32-grab-focus-on-raise' to t.  In `temp-buffer-window-show-hook'
> set it back to nil.

With the simple recipe I gave, that seems to fix things.  Thanks.
But:

1. The `temp-buffer-*-hook's are not only about showing *Help*.
   That workaround thus affects more than it should.

2. Users of `w32*' should not need to do that explicitly
   themselves.  Perhaps Emacs can do the equivalent, itself (but
   limited to *Help*, not affecting all temp buffer display).

> Meanwhile I seem to understand why I can't see the behavior you
> describe on my Windows XP.  I have both "Activation follows mouse"
> and "Autoraise when activating" set.  So apparently when the
> second frame is raised my mouse moves there and focuses the frame.
> This means that the rigmarole done by `w32-grab-focus-on-raise'
> nil has no effect here at all.

Dunno where those are set in Windows (I could google), but thanks
for the info.  (I do want the `w32*' effect, though.)





  reply	other threads:[~2014-11-14 21:21 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10 16:42 bug#19012: 25.0.50; `help-window-select' Drew Adams
2014-11-10 17:28 ` martin rudalics
2014-11-10 18:23   ` Drew Adams
2014-11-11  8:29     ` martin rudalics
2014-11-11 14:26       ` Drew Adams
2014-11-11 18:31         ` martin rudalics
2014-11-11 19:01           ` Drew Adams
2014-11-11 21:04             ` Drew Adams
2014-11-13  5:12               ` Drew Adams
2014-11-13  7:44                 ` martin rudalics
2014-11-13 15:23                   ` Drew Adams
2014-11-13 16:28                     ` martin rudalics
2014-11-13 16:56                       ` Drew Adams
2014-11-13 18:47                         ` martin rudalics
2014-11-13 19:21                           ` Drew Adams
2014-11-14 11:37                             ` martin rudalics
2014-11-14 15:11                               ` Drew Adams
2014-11-14 16:38                                 ` martin rudalics
2014-11-14 17:09                                   ` Drew Adams
2014-11-14 17:39                                     ` martin rudalics
2014-11-14 17:47                                       ` Drew Adams
2014-11-14 18:10                                         ` martin rudalics
2014-11-14 18:28                                           ` Drew Adams
2014-11-14 18:33                                             ` martin rudalics
2014-11-14 18:44                                               ` Drew Adams
2014-11-14 19:08                                                 ` martin rudalics
2014-11-14 21:21                                                   ` Drew Adams [this message]
2014-11-15 11:24                                                     ` martin rudalics
2014-11-15 14:40                                                       ` Drew Adams
2014-11-16 11:36                                                         ` martin rudalics
2014-11-16 16:20                                                           ` Drew Adams
2014-11-16 17:36                                                             ` martin rudalics
2014-11-16 20:06                                                               ` Drew Adams
2014-11-17  9:29                                                                 ` martin rudalics
2014-11-17 14:29                                                                   ` Drew Adams
2014-12-25 19:30                                                                     ` martin rudalics
2014-11-11 22:16             ` Stefan Monnier
2014-11-11 23:10               ` Drew Adams
2014-11-12  1:49                 ` Stefan Monnier
2014-11-12  2:36                   ` Drew Adams
2014-11-12  4:11                     ` Stefan Monnier
2014-11-12  7:18                       ` Drew Adams

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=2b53c981-eaef-47f3-850a-6367b4cd5dc1@default \
    --to=drew.adams@oracle.com \
    --cc=19012@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /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).