all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: martin rudalics <rudalics@gmx.at>
Cc: Juanma Barranquero <lekktu@gmail.com>, Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Wrong window end reported after splitting window
Date: Sun, 24 Feb 2008 10:34:21 -0500	[thread overview]
Message-ID: <jwvr6f22x6r.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <47C09FFA.4040604@gmx.at> (martin rudalics's message of "Sat, 23 Feb 2008 23:36:42 +0100")

> I suppose what you want is to investigate all affected windows when the
> corresponding configuration changes.  This means we'd have to change
> `delete-window', `enlarge-window', `shrink-window',
> `adjust-window-trailing-edge' and `set-window-configuration' as to walk
> all windows on the frame, check whether one of the associated buffers
> has a non-nil local value for `window-configuration-change-hook', and
> run that hook (in addition to a global hook).

Indeed, it may be "too much work" but might be worth the trouble.
Otherwise buffer-local settings for window-configuration-change-hook
simply don't make any sense.

> The question here is what
> to do when the same buffer is shown in two or more windows on the
> affected frame - should we call the hook twice in that case?

The behavior of window-configuration-change-hook is clearly documented
as being run "once per frame", so the hook function are currently
responsible for cycling through  the windows  of the frame
if/when needded.
[ This doesn't rule out running the hook twice or more, tho, since we
  don't specifically say how careful Emacs should be in avoiding to run
  it redundantly. ]

Looking at it again, maybe the right thing to do is to make the
window-configuration-change-hook be treated differently for buffer-local
vs global settings: the global settings are run like now, but we also
cycle through the windows looking for buffer-local settings and we run
each one of them "once per window".

At least for image-mode and doc-view-mode's use of
window-configuration-change-hook, this would do the right thing.


        Stefan




  parent reply	other threads:[~2008-02-24 15:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-23 15:50 Wrong window end reported after splitting window Juanma Barranquero
2008-02-23 18:52 ` martin rudalics
2008-02-23 20:47   ` Juanma Barranquero
2008-02-23 22:36     ` martin rudalics
2008-02-24  2:08       ` Juanma Barranquero
2008-02-24 15:34       ` Stefan Monnier [this message]
2008-02-24 22:33         ` martin rudalics
2008-02-25  2:33           ` Stefan Monnier
2008-02-25 14:07             ` martin rudalics
2008-02-25 16:09               ` 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=jwvr6f22x6r.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    --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.