all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 15133@debbugs.gnu.org
Subject: bug#15133: 24.3.50; REGRESSION: `after-make-frame-functions' now run with wrong frame	selected
Date: Mon, 19 Aug 2013 14:46:31 -0700 (PDT)	[thread overview]
Message-ID: <eab66360-c879-410a-8dd2-0a4e71c649c4@default> (raw)
In-Reply-To: <52127AEE.8010101@gmx.at>

>  > Sorry, I don't understand.  What "both" would you like me to try?  This
>  > needs to work as it did before the regression - both `pop-to-buffer'
>  > and `display-buffer'.
> 
> Did `display-buffer' work correctly?

Not sure what you mean.  I haven't seen a problem until this build.
Hence the report of this being a regression.

>  > But first, I don't understand either why there should be any difference.
>  > Why shouldn't functions on `after-make-frame-functions' always be passed
>  > the new frame as argument, as has been the case in the past?  There is a
>  > `before-make-frame-functions' hook for passing the originally selected
>  > frame.
> 
> The problem is that the new frame doesn't yet show the buffer you want
> to display when `after-make-frame-functions' is called.

I see.  So you are saying that the new frame object is passed to the hook
functions, but that new frame has not yet been displayed.  If so, that is
presumably the cause of the regression.

What's the point of passing the newly created frame object to hook functions
intended to act on it, if that frame has not yet been displayed so they can
do so?

Perhaps you are allowing for hook functions that do not assume the frame is
displayed.  Is that the point of this change?  Should I change the hook
function here to, say, (lambda (fr) (raise-frame fr) (fit-frame fr))?  Or
perhaps `make-frame-visible' instead of `raise-frame'?

I just tried those, and they does not work either.  If I want to apply a
function such as `fit-frame' to the new frame, and it is not yet displayed,
what do I need to call in the hook function to display it first?

The doc string of `make-frame' suggests, BTW, that it should both (a) make
a frame object and (b) display it, as I have always thought it did do and
should do.  It says: "Return a newly created frame displaying the current
buffer."

You will perhaps say that the PARAMETERS argument could include `invisible'
or `iconified' or some such that has the effect of creating a frame that
is not visible (displayed).  If that is the idea behind this change then
I might not have anything against it, provided the frame is in fact
displayed when PARAMETERS does not do something to make it invisible etc.

IOW, in the use cases I have, an ordinary frame is created displayed, and
after that happens I want to fit the frame.  `after-make-frame-functions'
has always been the right place to do that, in the past.  Seems like this
is being redefined now. 

Please advise.  This should be simple.  And it's still not clear to me
why it should not be as it was before (i.e., since forever).





  reply	other threads:[~2013-08-19 21:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19 15:01 bug#15133: 24.3.50; REGRESSION: `after-make-frame-functions' now run with wrong frame selected Drew Adams
2013-08-19 15:08 ` Drew Adams
2013-08-19 16:13 ` martin rudalics
2013-08-19 18:25   ` Drew Adams
2013-08-19 20:07     ` martin rudalics
2013-08-19 21:46       ` Drew Adams [this message]
2013-08-20  7:05         ` martin rudalics
2013-08-20 15:16           ` Drew Adams
2013-08-20 17:24             ` martin rudalics
2013-08-20 18:03               ` Drew Adams
2013-08-23  7:08           ` martin rudalics
2013-08-23  7:45             ` Drew Adams
2013-08-24  2:19               ` 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

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

  git send-email \
    --in-reply-to=eab66360-c879-410a-8dd2-0a4e71c649c4@default \
    --to=drew.adams@oracle.com \
    --cc=15133@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.