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: Mon, 25 Feb 2008 11:09:31 -0500	[thread overview]
Message-ID: <jwvejb158m5.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <47C2CBB6.7020602@gmx.at> (martin rudalics's message of "Mon, 25 Feb 2008 15:07:50 +0100")

>> I was thining of passing it implicitly as the selected-window, just as
>> the selected-frame is passed implicitly for global
>> window-configuration-change-hooks.

> This would make it impossible for the function to guess which window is
> selected after the configuration change and/or set the selected window.

Right.  But note that even the global hook is not currently really able
to do that.  At least it can't guess and/or set the selected frame.
It hasn't been a problem AFAICT.  I don't think it's
a significant restriction.

> BTW `window-size-change-functions' also passes only the frame as
> argument.

Yup.  And it probably also fails to handle correctly buffer-local settings.

> `window-scroll-functions' appears more intelligent.

Because it does not apply to window-disposition so it only applies to
a single window at a time, so figuring out which buffer to consider is
immediately obvious.

>>> BTW, shall I run it for the buffers of deleted windows too?
>> I don't think it can be done (i.e. it would be a different hook).

> Not doing it would obscure the semantics considerably - the global hook
> gets run when a window is deleted, the local one not.

I'm not convinced it's a problem.  Again, it's a restriction but it's
not clear that it will pose problems for actual users.  After all, the
current competition is easy to beat: buffer-local settings just plain
fail to work reliably at all and they very much don't work for
window-deletion already.

>> They currently (incorrectly) use a buffer-local setting which needs to
>> be run whenever set-window-buffer is set to display those buffers (so
>> as to reset the [vh]scroll settings among other things).
>> Making the hook global would make the code work right, but with the
>> disadvantage that ...well... it would be global even though it's only
>> needed when/where those buffers are displayed.

> We should carefully reevaluate these hooks and how they are used.  Maybe
> it's better to provide a new hook then.

Maybe.


        Stefan




      reply	other threads:[~2008-02-25 16:09 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
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 [this message]

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=jwvejb158m5.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.