From: martin rudalics <rudalics@gmx.at>
To: jay.p.belanger@gmail.com
Cc: emacs-devel@gnu.org
Subject: Re: save-window-excursion and window-configuration-change-hook interaction
Date: Thu, 20 May 2010 11:44:39 +0200 [thread overview]
Message-ID: <4BF50487.5060900@gmx.at> (raw)
In-Reply-To: <87hbm52fzu.fsf@gmail.com>
> I assure you, right now I like it less than you do.
It's next to impossible to get this right. If we don't move `point' to
the window's point we get non-standard semantics for the code run in the
hook. That is, we'd violate a basic invariant that with a window
selected and its buffer current, the window's point and the buffer's
point refer to the same position.
If we do move `point' we have two choices: If we restore `point' to its
previous value (using some sort of `save-excursion'), any `point'
changing operations run in the hook are lost and any calculations based
on `point' run in the hook are moot. If we don't restore `point' to its
previous value we get the current behavior.
martin
prev parent reply other threads:[~2010-05-20 9:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 19:55 save-window-excursion and window-configuration-change-hook interaction Jay Belanger
2010-05-18 12:06 ` martin rudalics
2010-05-18 18:59 ` Jay Belanger
2010-05-20 9:44 ` martin rudalics [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=4BF50487.5060900@gmx.at \
--to=rudalics@gmx.at \
--cc=emacs-devel@gnu.org \
--cc=jay.p.belanger@gmail.com \
/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.