all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jay Belanger <jay.p.belanger@gmail.com>
To: emacs-devel@gnu.org
Cc: jay.p.belanger@gmail.com
Subject: save-window-excursion and window-configuration-change-hook interaction
Date: Mon, 17 May 2010 14:55:53 -0500	[thread overview]
Message-ID: <87mxvy5mly.fsf@vh213601.truman.edu> (raw)


I'm wondering if the following behavior is expected.

Suppose I have two windows; say the top window is active 
and the bottom window (window WIN, buffer BUF) has
===
a
b
c
===
in it, with point before the "a".
If I run the command aaa:

(defun aaa ()
  (interactive)
  (with-current-buffer BUF
    (save-window-excursion
      (select-window WIN)
      (search-forward "b"))
    (set-window-point WIN (point))))

then the point in the bottom window moves to after the "b", which is 
what I would expect.   However, if the bottom window (with point again
before the "a") has a non-nil window-configuration-change-hook, 
then running aaa does not move the point in the bottom window.  I would
expected the point in the bottom window to move as before.
(To add the hook, with the bottom window active I did
 M-: (add-hook 'window-configuration-change-hook (lambda () ()) nil t)
)

Thanks,
Jay




             reply	other threads:[~2010-05-17 19:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-17 19:55 Jay Belanger [this message]
2010-05-18 12:06 ` save-window-excursion and window-configuration-change-hook interaction martin rudalics
2010-05-18 18:59   ` Jay Belanger
2010-05-20  9:44     ` martin rudalics

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=87mxvy5mly.fsf@vh213601.truman.edu \
    --to=jay.p.belanger@gmail.com \
    --cc=emacs-devel@gnu.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.