From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.bugs 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 Organization: EUR Message-ID: <87623vbhc0.fsf@gmail.com> References: <87a9t7bl8o.fsf@gmail.com> <50D47143.40702@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1356100801 31419 80.91.229.3 (21 Dec 2012 14:40:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Dec 2012 14:40:01 +0000 (UTC) Cc: 13248@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 21 15:40:15 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tm3lk-0004X3-Et for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Dec 2012 15:40:12 +0100 Original-Received: from localhost ([::1]:37446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm3lW-000305-Bc for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Dec 2012 09:39:58 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm3lQ-0002wX-60 for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2012 09:39:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tm3lN-0007k2-3N for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2012 09:39:52 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm3lM-0007jx-Va for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2012 09:39:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tm3la-00069T-1T for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2012 09:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Vitalie Spinu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Dec 2012 14:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13248 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13248-submit@debbugs.gnu.org id=B13248.135610075623583 (code B ref 13248); Fri, 21 Dec 2012 14:40:01 +0000 Original-Received: (at 13248) by debbugs.gnu.org; 21 Dec 2012 14:39:16 +0000 Original-Received: from localhost ([127.0.0.1]:53688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tm3kp-00068J-4x for submit@debbugs.gnu.org; Fri, 21 Dec 2012 09:39:16 -0500 Original-Received: from mail-ee0-f44.google.com ([74.125.83.44]:35649) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tm3kn-00068B-Ot for 13248@debbugs.gnu.org; Fri, 21 Dec 2012 09:39:14 -0500 Original-Received: by mail-ee0-f44.google.com with SMTP id b47so2412448eek.17 for <13248@debbugs.gnu.org>; Fri, 21 Dec 2012 06:38:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:organization:references:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=tGkqCSmBccSpBjr5vmDwj63g3q7TfhtMJKHBY45YfIQ=; b=pB8xBwtmVG1g+AUUCo2S9qaq55/o80c0BTEomXgL3lu0xQGRKaNsGhhQu2FA7KnqMa BraGwiPIfchWO6PZgdmPg7EvOyh4JCa/2LvENz6Z1K0HHoQQndrGFPsolw5nUTY0HX/t d7TMoVeL8P+RyJK/qlQlr/TIetPHttyf4m9FL0lwwtd1cHFj+TT4sA4ZCTE7G5yvMvNN 6WWIy2aUIpzBykAttFLq+SCJ4qCStssvqMKyOo3OKDhPewjuLAiCTaR0q+zzuFFiB32U xwVfxeiTW1d7G/PjpfGNYnoA83koXEbXFnfldAYJssBi65xd+wW8ZywLoNV9ES1+LCJk uVZw== X-Received: by 10.14.202.3 with SMTP id c3mr32652596eeo.4.1356100738217; Fri, 21 Dec 2012 06:38:58 -0800 (PST) Original-Received: from localhost (i108036.upc-i.chello.nl. [62.195.108.36]) by mx.google.com with ESMTPS id e2sm21989835eeo.8.2012.12.21.06.38.56 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 21 Dec 2012 06:38:57 -0800 (PST) In-Reply-To: <50D47143.40702@gmx.at> (martin rudalics's message of "Fri, 21 Dec 2012 15:25:07 +0100") User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.2.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:68857 Archived-At: >> martin rudalics >> 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