From: Stefan Monnier <monnier@iro.umontreal.ca>
To: martin rudalics <rudalics@gmx.at>
Cc: Stephen Leake <stephen_leake@stephe-leake.org>, emacs-devel@gnu.org
Subject: Re: managing windows in two frames
Date: Fri, 06 Sep 2013 15:00:40 -0400 [thread overview]
Message-ID: <jwv61ud23a0.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <522A0D72.5060204@gmx.at>
> That's irrational.
Not at all. It's a half-common need (tho most people don't realize
that other frames could be involved so they just use
save-window-excursion thinking it'll undo any damage).
> What's wrong with
> (let ((display-buffer-function 'ignore))
> (describe-function 'ignore))
Ah, indeed it's simpler. It does have the disadvantage of relying on an
obsolete variable, tho.
>> but it fails if the buffer ends up displayed in some other frame (or
>> worse, in a new frame), which can happen depending on the user's
>> settings. So Jorge really wants he code to work regardless of any
>> user's customization of display-buffer, in the same sense that
>> find-file-noselect does not pay attention to the user's
>> display-buffer settings.
> If he "sits close enough" to `display-buffer', Jorge can always (1) use
> `display-buffer-function', (2) `display-buffer-overriding-action', or
> (3) bind `display-buffer-alist' to do whatever he wants.
Of course a real fix is to change the code so that it provide
a "non-displaying" variant, but Jorge often doesn't have the necessary
control over that code. In the case of lisp--company-doc-buffer (in
lisp.el), Jorge actually does have this control but doesn't have the
energy to "do it right".
(1) uses an obsolete var.
(3) binds a user variable, which is bad karma.
(2) is good, but the question remains: "bind it to what?". You did
provide a answer to that question, admittedly, but it's a bit
longwinded, I think we should have a simpler answer.
Maybe we should define a new macro `with-inhibit-window-changes' which
could replace save-window-excursion for those uses (it might use
save-window-excursion internally, just in case, but would also try to
prevent creation of frames and window changes in other frames).
Stefan
next prev parent reply other threads:[~2013-09-06 19:00 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-03 9:11 managing windows in two frames Stephen Leake
2013-09-03 12:52 ` martin rudalics
2013-09-04 18:16 ` Stephen Leake
2013-09-04 18:24 ` Stephen Leake
2013-09-04 19:33 ` Stefan Monnier
2013-09-04 21:22 ` Stephen Leake
2013-09-06 10:53 ` martin rudalics
2013-09-07 8:49 ` Stephen Leake
2013-09-07 9:37 ` martin rudalics
2013-09-07 13:19 ` Stephen Leake
2013-09-08 7:56 ` martin rudalics
2013-09-04 21:33 ` Drew Adams
2013-09-06 10:52 ` martin rudalics
2013-09-06 13:22 ` Stefan Monnier
2013-09-06 10:52 ` martin rudalics
2013-09-07 8:56 ` Stephen Leake
2013-09-07 9:37 ` martin rudalics
2013-09-07 13:29 ` Stephen Leake
2013-09-03 13:59 ` Stefan Monnier
2013-09-03 14:15 ` martin rudalics
2013-09-03 14:30 ` Stefan Monnier
2013-09-03 16:23 ` martin rudalics
2013-09-03 20:34 ` Stefan Monnier
2013-09-04 6:25 ` martin rudalics
2013-09-04 13:24 ` Stefan Monnier
2013-09-04 15:04 ` martin rudalics
2013-09-04 17:44 ` Stefan Monnier
2013-09-06 10:53 ` martin rudalics
2013-09-06 13:44 ` Stefan Monnier
2013-09-06 17:14 ` martin rudalics
2013-09-06 19:00 ` Stefan Monnier [this message]
2013-09-07 9:37 ` martin rudalics
2013-09-08 17:55 ` Stefan Monnier
2013-09-09 8:10 ` martin rudalics
2013-09-09 14:05 ` Stefan Monnier
2013-09-04 18:19 ` Stephen Leake
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=jwv61ud23a0.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
--cc=stephen_leake@stephe-leake.org \
/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.