From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master c711991: Allow not erase output buffer in shell commands Date: Tue, 20 Sep 2016 12:22:45 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1474388379 4109 195.159.176.226 (20 Sep 2016 16:19:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Sep 2016 16:19:39 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: Emacs developers To: Tino Calancha Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 20 18:19:35 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmNlb-0008Q7-88 for ged-emacs-devel@m.gmane.org; Tue, 20 Sep 2016 18:19:31 +0200 Original-Received: from localhost ([::1]:36551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmNlZ-0002hJ-I4 for ged-emacs-devel@m.gmane.org; Tue, 20 Sep 2016 12:19:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmNlM-0002cv-MJ for emacs-devel@gnu.org; Tue, 20 Sep 2016 12:19:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmNlG-0000U9-V0 for emacs-devel@gnu.org; Tue, 20 Sep 2016 12:19:15 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:45525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmNlG-0000TX-QB for emacs-devel@gnu.org; Tue, 20 Sep 2016 12:19:10 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u8KGJ5oD024790; Tue, 20 Sep 2016 12:19:06 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 19C486045E; Tue, 20 Sep 2016 12:22:45 -0400 (EDT) In-Reply-To: (Tino Calancha's message of "Wed, 21 Sep 2016 00:10:58 +0900 (JST)") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5803=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5803> : inlines <5249> : streams <1703714> : uri <2292596> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207630 Archived-At: > I guess, in cases where the buffer is not displayed, (goto-char pos) > might not always work as `set-window-point': a posterior > display of the buffer maybe doesn't show point at pos. When a buffer is displayed in a window for the first time, the window's point is initialized from the buffer's point, so it should work for those cases. If the goto-char happens for a buffer that used to be displayed in a window and later gets displayed again in that window, it may be the case that we remember the old window-point somewhere and try to return to that, indeed. Let's not worry about it for now. Tho, maybe it would be a good idea to introduce a new function (not sure how to call it: window-goto-char? set-buffer-window-point?) which would work like set-window-point but takes a buffer as argument. After all, it's a fairly common need, and if we ever want to fix the corner case mentioned above, we could fix it there once and for all. Stefan PS: Haven't checked the new patch, sorry.