From: Vitalie Spinu <spinuvit@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 13248@debbugs.gnu.org
Subject: bug#13248: 24.2.50; select-window moves point (in comint-postoutput-scroll-to-bottom)
Date: Fri, 21 Dec 2012 15:38:55 +0100 [thread overview]
Message-ID: <87623vbhc0.fsf@gmail.com> (raw)
In-Reply-To: <50D47143.40702@gmx.at> (martin rudalics's message of "Fri, 21 Dec 2012 15:25:07 +0100")
>> martin rudalics <rudalics@gmx.at>
>> on Fri, 21 Dec 2012 15:25:07 +0100 wrote:
>> Here is what I found during my investigation. It happens with
>> (select-window w) in the `comint-postoutput-scroll-to-bottom'
>> (reproduced below). I was monitoring the value of the (point) just
>> before and after it, and it looks like this:
>>
>> before (point):9943
>> after (point):8619
>>
>> So the point is clearly moved in select-window. Moreover the (point)
>> equals (window-end) just before select-window is called, so it is
>> visible. Consequently, the following (comint-adjust-point selected) is
>> completely screwed because it relies on point *not* being moved!
>>
> select_window (in window.c) has the following comment
> /* Go to the point recorded in the window.
> This is important when the buffer is in more
> than one window. It also matters when
> redisplay_window has altered point after scrolling,
> because it makes the change only in the window. */
> Is it this behavior that bothers you?
Yes, indeed this is precisely what happening. Thanks, it clarifies the
problem.
> IIUC what you want in `comint-postoutput-scroll-to-bottom' is to
> `set-window-point' of the respective window. If you really want to move
> `point' in a buffer _and_ show the effect in a window, do it with that
> window selected.
And this is what comint-postoutput-scroll-to-bottom fails to do.
Vitalie
next prev parent reply other threads:[~2012-12-21 14:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-21 13:14 bug#13248: 24.2.50; select-window moves point (in comint-postoutput-scroll-to-bottom) Vitalie Spinu
2012-12-21 14:25 ` martin rudalics
2012-12-21 14:38 ` Vitalie Spinu [this message]
2012-12-21 14:48 ` Vitalie Spinu
2012-12-22 10:18 ` martin rudalics
2012-12-25 0:18 ` bug#13248: [PATCH] " Vitalie Spinu
2012-12-25 18:09 ` martin rudalics
2012-12-25 22:28 ` Vitalie Spinu
2012-12-27 7:36 ` martin rudalics
2013-01-02 8:03 ` 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
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=87623vbhc0.fsf@gmail.com \
--to=spinuvit@gmail.com \
--cc=13248@debbugs.gnu.org \
--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 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).