From: floriansbriefe@gmail.com
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: frame.el: call before-make-frame-hook earlier in make-frame
Date: Fri, 31 Jul 2015 12:38:25 +0200 [thread overview]
Message-ID: <20150731103825.GB78288@csr-pc9.zib.de> (raw)
In-Reply-To: <55BB462C.5000401@gmx.at>
> > That is a viable solution, but it has the drawback that you have to override a
> > default key-binding (C-x 5 2) with your own make-frame function and that you do
> > not benefit from the nice things that 'make-frame-command' additionally does for
> > you a) at the moment (setting the focus to the new frame etc)
>
> Here `make-frame-command' does only
>
> (interactive)
> (if (display-graphic-p)
> (make-frame)
> (select-frame (make-frame))))
>
> and since you are not on a text terminal (on a text terminal you can
> hardly make a frame at the mouse position) `make-frame-command' is just
> an interactive wrapper for `make-frame'. Everything else (like
> redirecting focus to the new frame) is done inside `make-frame'.
The use case was just an example, other dynamic settings would be possible.
> > in future emacs releases. Thats why I would prefer using the hook. Thats what
> > hooks are for: Adjusting behaviour with minimal invasion.
>
> That hook would be run for any frames created by other packages, say for
> the speedbar or the ediff control window. Are you sure you want these
> to pop up at the mouse position? And how do you get the mouse position
> when it's outside of any emacs frame? Or do you want to position a new
> frame always inside an existing frame?
If the mouse position cannot be determined I used a default position value.
But you are completely right for frames opened by other packages (speedbar,
ediff control window). I missed those cases in my considerations.
So your proposal of a separate 'make-frame' command for interactively created
frames seems to be the right choice and I will follow this approach.
Thank you very much for your advice!
Florian
next prev parent reply other threads:[~2015-07-31 10:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 11:00 frame.el: call before-make-frame-hook earlier in make-frame Florian
2015-07-30 15:34 ` Stephen Leake
2015-07-31 7:09 ` martin rudalics
2015-07-31 7:40 ` floriansbriefe
2015-07-31 9:55 ` martin rudalics
2015-07-31 10:38 ` floriansbriefe [this message]
2015-08-01 10:50 ` martin rudalics
2015-08-03 9:16 ` Florian
2015-08-03 10:41 ` martin rudalics
2015-08-03 14:57 ` Eli Zaretskii
2015-08-03 21:14 ` Stefan Monnier
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=20150731103825.GB78288@csr-pc9.zib.de \
--to=floriansbriefe@gmail.com \
--cc=emacs-devel@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.