From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Allowing point to be outside the window? Date: Tue, 08 Feb 2022 19:08:25 +0200 Message-ID: <83bkzhwak6.fsf@gnu.org> References: <87ilwd7zaq.fsf.ref@yahoo.com> <877dcipjmk.fsf@yahoo.com> <83mtld254e.fsf@gnu.org> <87lf0xjgxu.fsf@yahoo.com> <83ilw0zg38.fsf@gnu.org> <87mtlbgajq.fsf@yahoo.com> <83czm7vx0s.fsf@gnu.org> <87mtlad3sv.fsf@yahoo.com> <83mtlaurxj.fsf@gnu.org> <87fsqh9o7s.fsf@yahoo.com> <878ruoqx0u.fsf@yahoo.com> <83h79cz0sm.fsf@gnu.org> <87leyonrp4.fsf@yahoo.com> <83fsowyzt9.fsf@gnu.org> <87pmo0mbig.fsf@yahoo.com> <8335kwynrp.fsf@gnu.org> <87y22nlbdg.fsf@yahoo.com> <87v8xri1ki.fsf@yahoo.com> <83fsouyetj.fsf@gnu.org> <871r0eg4o1.fsf@yahoo.com> <83a6f2ycsx.fsf@gnu.org> <877da6dvip.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14716"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 08 20:39:11 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHWKU-0003gt-Bu for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Feb 2022 20:39:10 +0100 Original-Received: from localhost ([::1]:41094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHWKT-0003b9-0q for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Feb 2022 14:39:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHTyn-0001x0-GV for emacs-devel@gnu.org; Tue, 08 Feb 2022 12:08:37 -0500 Original-Received: from [2001:470:142:3::e] (port=34924 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHTyn-00012V-58; Tue, 08 Feb 2022 12:08:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=36sJRxW2xcIZ/F09EAz1k6mVX1fXzNf2HAU9SQd7ONc=; b=EQLBAkKFJizJ oJSNwUTySgGE08hJ5lJ7sp4QatCWRKtMbGfH6vKeFpGesn2BlTVyCwRj65E92N3VHZOtUVobjTKkT dSdP6CkPbQyIF1L+u4SjftjWcBBkbIXtHa7RC0kQcHpylAHbaLCBB59vQh294/m+7ThrxE8j+JdBF +VUsSVbm5/U+e0Fjf2xcdwMcRnTOJ9CBxVqdfamm6pKLgFbBRiVer9cWdWqnmcYhxahJVEhI6+lOL Z/Mlv4SuVJi1WPvG98V0rfnV0ym5hmDWfNGXA2EP1CRrZpc8WaGLcUQPtWOba7YIKCIbvbfsEUc97 xDGRLLxpPwH8xPqarYlf0w==; Original-Received: from [87.69.77.57] (port=1340 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHTym-0006mU-Ex; Tue, 08 Feb 2022 12:08:36 -0500 In-Reply-To: <877da6dvip.fsf@yahoo.com> (message from Po Lu on Tue, 08 Feb 2022 08:58:22 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286080 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Tue, 08 Feb 2022 08:58:22 +0800 > > Eli Zaretskii writes: > > >> `scroll-move-point' doesn't affect redisplay; it only affects the > >> scrolling commands in window.c. > > > > It does affect redisplay: by not setting the force_start flag of the > > window. > > What about modifying the code under force_start to not move point if > `keep-point-visible' is nil? Since the point isn't required to be > visible anymore, there is no need to move the cursor there, I think. I don't think you can do that indiscriminately, because some of the places that set the window's force_start flag are unrelated to this feature. One example is set_window_buffer and its callers. Another example is the code in redisplay_window that ends with "goto force_start". And there are probably more. So if you want to do that, you'll need to carefully audit all those places, and make sure you avoid moving point only when force_start was set by scrolling commands or in some similar situations. Otherwise, users will complain that point goes out of view when they didn't expect it to. For example, "C-x 2" goes through that code, and I'm quite sure we don't want point to be left outside of the window in that case.