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: Mon, 29 Nov 2021 15:00:11 +0200 Message-ID: <83zgpnunfo.fsf@gnu.org> References: <87ilwd7zaq.fsf.ref@yahoo.com> <87ilwd7zaq.fsf@yahoo.com> <83bl24yaed.fsf@gnu.org> <87sfvg7l51.fsf@yahoo.com> <83zgpowu23.fsf@gnu.org> <87zgpo5tws.fsf@yahoo.com> <83pmqkwi6r.fsf@gnu.org> <87v90c5su6.fsf@yahoo.com> <83o864wg2a.fsf@gnu.org> <87ilwb68ck.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9149"; 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 Mon Nov 29 14:02:03 2021 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 1mrgIF-00023N-5h for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Nov 2021 14:02:03 +0100 Original-Received: from localhost ([::1]:40348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrgID-0005is-Il for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Nov 2021 08:02:01 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrgGJ-0003td-UV for emacs-devel@gnu.org; Mon, 29 Nov 2021 08:00:03 -0500 Original-Received: from [2001:470:142:3::e] (port=40816 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 1mrgGJ-0002U7-IZ; Mon, 29 Nov 2021 08:00:03 -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=ST2sJs4EL8VRez6vdzI9Cswi/eTVUeaoKjCYdNV/nMc=; b=pKEFducm2D80 NV6hZY7TnPGkSa2w34hsxDk9lHDZNIZFqqhOutZgboPDi9oKl9Ds+S3jpOSwLMWubjFmWUycZLte5 N8maGOJ5V8yRrlITs5TCYxVNnmuchLAjj4qeKIKpPoiMwFisK1Y5X2ssp9h20Tt2ftQRaQ8BPCZ7x bNj1BJZTsFKThwrH7XA5eUfhC1sbMwQJUDxzwjyzx5C8g4kYhmN0luWFNyBnhonycG5nkhqFrS5Rh ebEowAUyRWDaeRPUqQl3XlYH0n+dAq8Jdt3cawOO4zjhANMPh/qd2sB1vqj/cjpDTfwbP63mPa+VN 1qMW4xgrhZYYlsKlP+3SWw==; Original-Received: from [87.69.77.57] (port=2569 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 1mrgGG-0005DT-0A; Mon, 29 Nov 2021 08:00:03 -0500 In-Reply-To: <87ilwb68ck.fsf@yahoo.com> (message from Po Lu on Mon, 29 Nov 2021 09:47:39 +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:280466 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Mon, 29 Nov 2021 09:47:39 +0800 > > Eli Zaretskii writes: > > Hmm, thanks. Another question: is the only code that moves either point > or window start in order to constrain point into the window in > redisplay_window, under `recenter' and `try_to_scroll'? A $64M question ;-) Your opinion about my memory is too good. But in general, I think you are looking at a too-narrow aspect of this behavior. First, even in xdisp.c there are several places where we attempt to redisplay a window, and then reject the results because point is not fully visible in the window. "Reject" here sometimes mean another, fresh attempt of redisplaying the window with some conditions or variables modified to yield a success. These places should be audited in order to decide whether the rejection is justified under this new feature. Second, look at the scrolling code in window.c: under some conditions, it decides up front that point will be invisible, and then either moves point or modifies the scroll (i.e. the window-start). That, too, will have to be revisited and carefully audited. And there could be other places as well, I simply don't remember. So I think the answer to your question is, unfortunately, NO. The problem is wider and more complex than just the scrolling code in redisplay_window in these two places.