From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Preserve buffer point in windows by default (Bug#4041). Date: Fri, 27 May 2016 09:44:40 +0300 Message-ID: <83r3co0zl3.fsf@gnu.org> References: <20160519185838.GA16418@holos.localdomain> <20160527020629.GA5979@holos.localdomain> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1464331515 6122 80.91.229.3 (27 May 2016 06:45:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 May 2016 06:45:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: Mark Oteiza Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 27 08:45:08 2016 Return-path: Envelope-to: ged-emacs-devel@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 1b6BW8-0004ty-3D for ged-emacs-devel@m.gmane.org; Fri, 27 May 2016 08:45:08 +0200 Original-Received: from localhost ([::1]:44337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6BW6-000446-WD for ged-emacs-devel@m.gmane.org; Fri, 27 May 2016 02:45:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6BVc-00043m-U9 for emacs-devel@gnu.org; Fri, 27 May 2016 02:44:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6BVZ-0005WJ-OM for emacs-devel@gnu.org; Fri, 27 May 2016 02:44:36 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6BVZ-0005W6-LJ; Fri, 27 May 2016 02:44:33 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3002 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b6BVX-0002lk-Rw; Fri, 27 May 2016 02:44:32 -0400 In-reply-to: <20160527020629.GA5979@holos.localdomain> (message from Mark Oteiza on Thu, 26 May 2016 22:06:29 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:204067 Archived-At: > Date: Thu, 26 May 2016 22:06:29 -0400 > From: Mark Oteiza > > * doc/lispref/windows.texi: Mention new default. > * etc/NEWS: Mention new default. > * lisp/window.el (switch-to-buffer-preserve-window-point): Default to t. Looks good to me, thanks. One comment: > +By default, @code{switch-to-buffer} unconditionally tries to display > +the buffer at its previous position in the selected window. This > +behavior can be tuned using the following option. > [...] > +(defcustom switch-to-buffer-preserve-window-point t > "If non-nil, `switch-to-buffer' tries to preserve `window-point'. > If this is nil, `switch-to-buffer' displays the buffer at that > buffer's `point'. If this is `already-displayed', it tries to The "unconditionally" part in the first text and "tries to" in the second are somewhat at odds, IMO. I think the latter text is more accurate (because preserving window-point might not always work), so I think we should make the manual text closer in spirit to the doc string. Other than that, please push to master.