From: "Андрей Парамонов" <cmr.pent@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 7368@debbugs.gnu.org
Subject: bug#7368: display-buffer a softly dedicated window
Date: Wed, 17 Nov 2010 11:57:32 +0300 [thread overview]
Message-ID: <AANLkTimafMZG_ai9vnsy-XV+oxmaiWbh5=2LKf=rFLY8@mail.gmail.com> (raw)
In-Reply-To: <87y690q1qa.fsf@neo.paramonovs>
2010/11/17 Stefan Monnier <monnier@iro.umontreal.ca>:
>> 1) A "softly dedicated" window is a window tied to a certain buffer,
>> and when that buffer is destroyed the window is destroyed too.
>
> I think in general that would not be right (e.g. for my use of
> soft-dedicated windows).
I'm curious what is your use-case. Would truly-dedicated windows fit it?
> But I agree that display-buffer should
> probably override the soft-dedication in the case where it would
> otherwise have to create a new frame and the user has pop-up-frames set
> to nil.
>
I bevieve it's reasonable to override soft-dedication unconditionally.
The checks for dedicated != nil seem to be needed only because
switch-to-buffer would fail on a "truly dedicated" buffer. However,
switch-to-buffer would never fail on a "softly dedicated" buffer, only
on a "truly dedicated" one, so it seems logical to rather check for
dedicated = t.
I strongly believe display-buffer and switch-to-buffer should do the
same thing in the following minimal example:
(let ((foo (get-buffer-create "foo"))
(bar (get-buffer-create "bar"))
(baz (get-buffer-create "baz")))
(switch-to-buffer foo)
(delete-other-windows)
(let ((bar-window (display-buffer bar t)))
(set-window-dedicated-p bar-window 'soft)
(select-window bar-window)
(switch-to-buffer baz)))
(let ((foo (get-buffer-create "foo"))
(bar (get-buffer-create "bar"))
(baz (get-buffer-create "baz")))
(switch-to-buffer foo)
(delete-other-windows)
(let ((bar-window (display-buffer bar t)))
(set-window-dedicated-p bar-window 'soft))
(display-buffer baz t))
For that to work, only a small patch for get-lru-window and
get-largest-window is needed. However I understand that although
logical, this tiny change might break something. Should I relabel the
bug accordingly, or create a new one?
Best wishes,
Andrey Paramonov
next prev parent reply other threads:[~2010-11-17 8:57 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 21:59 bug#7368: 23.2; Python interpreter buffer should never appear in separate frame Andrey Paramonov
2010-11-13 6:36 ` bug#7368: Testcase Андрей Парамонов
2010-11-13 8:32 ` martin rudalics
2010-11-13 8:47 ` Андрей Парамонов
2010-11-13 9:55 ` martin rudalics
2010-11-15 22:42 ` Stefan Monnier
2010-11-16 20:19 ` Андрей Парамонов
2010-11-16 21:25 ` Stefan Monnier
2010-11-17 9:46 ` martin rudalics
2010-11-17 8:57 ` Андрей Парамонов [this message]
2010-11-17 9:46 ` bug#7368: display-buffer a softly dedicated window martin rudalics
2010-11-17 9:58 ` Андрей Парамонов
2010-11-17 14:16 ` martin rudalics
2010-11-17 15:09 ` Андрей Парамонов
2010-11-17 17:13 ` martin rudalics
2010-11-17 18:55 ` Андрей Парамонов
2010-11-18 8:03 ` martin rudalics
2010-11-18 8:32 ` Андрей Парамонов
2010-11-18 9:07 ` martin rudalics
2010-11-18 9:40 ` Андрей Парамонов
2010-11-18 10:27 ` martin rudalics
2010-11-18 10:36 ` Андрей Парамонов
2010-11-18 13:20 ` martin rudalics
2010-11-19 6:30 ` Андрей Парамонов
2011-07-13 2:07 ` Glenn Morris
2011-07-13 6:24 ` martin rudalics
2011-07-13 6:45 ` Glenn Morris
2011-07-13 8:37 ` martin rudalics
2011-07-13 16:07 ` Glenn Morris
2014-12-25 10:55 ` martin rudalics
2010-11-18 14:18 ` Stefan Monnier
2010-11-17 13:10 ` Stefan Monnier
2010-11-18 20:56 ` Lennart Borgman
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='AANLkTimafMZG_ai9vnsy-XV+oxmaiWbh5=2LKf=rFLY8@mail.gmail.com' \
--to=cmr.pent@gmail.com \
--cc=7368@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.