unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, Thierry Volpiatto <thierry.volpiatto@gmail.com>
Subject: Re: window.el modify current emacs23 behavior of anything.
Date: Tue, 20 Sep 2011 18:07:37 +0200	[thread overview]
Message-ID: <4E78BA49.4070306@gmx.at> (raw)
In-Reply-To: <jwv39fsl44r.fsf-monnier+emacs@gnu.org>

 > So, IIUC this problem appears in a content where only one window is
 > involved, and the point movements are always applied to the
 > (window-buffer (selected-window)), is that right?
 >
 > I hope it's not, in which case it can be explained by the usual issue
 > that moving point won't affect window-point if the current-buffer is not
 > (window-buffer (selected-window)).

When `bury-buffer' restores the buffer previously shown in the selected
window, it also restores that buffer's `window-start' and `window-point'
position in the window.  If the window is selected, this implicitly
moves the buffer's point to the window's point.  This means that if the
restored buffer's point was changed before calling `bury-buffer', that
position is lost.

I don't know whether this is the cause of Thierry's problem.  If it is,
and people think it is the wrong thing to do in this case, I can make
`bury-buffer' (and `replace-buffer-in-windows') call `other-buffer' as
before.  Alternatively, I could try to not restore `window-start' and
`window-point' if the restored buffer does not appear on another window.
But I'm not sure how intuitive such a change would be.

martin



  reply	other threads:[~2011-09-20 16:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-12  6:04 window.el modify current emacs23 behavior of anything Thierry Volpiatto
2011-09-12  6:38 ` Thierry Volpiatto
2011-09-12  7:22   ` Thierry Volpiatto
2011-09-12  7:24   ` Eli Zaretskii
2011-09-12  8:52     ` Thierry Volpiatto
2011-09-12  9:03 ` martin rudalics
2011-09-12 23:26   ` Thierry Volpiatto
2011-09-13 18:28 ` martin rudalics
2011-09-13 19:12   ` Thierry Volpiatto
2011-09-16 16:36   ` Thierry Volpiatto
2011-09-16 17:10     ` martin rudalics
2011-09-16 19:34       ` Thierry Volpiatto
2011-09-17  8:42         ` martin rudalics
2011-09-17 17:06           ` Thierry Volpiatto
2011-09-17 17:28             ` martin rudalics
2011-09-18  9:08               ` Thierry Volpiatto
2011-09-19 19:35                 ` Stefan Monnier
2011-09-20 16:07                   ` martin rudalics [this message]
2011-09-20 22:08                     ` Stefan Monnier
2011-09-21  6:34                       ` Thierry Volpiatto
2011-09-21  8:35                         ` martin rudalics
2011-09-21  8:34                       ` martin rudalics
2011-09-21 12:59                         ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2011-09-16 14:23 Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E78BA49.4070306@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=thierry.volpiatto@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).